Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add restartPolicy field to SparkApplication Driver/Executor initContainers CRDs #2022

Merged

Conversation

mschroering
Copy link
Contributor

@mschroering mschroering commented May 10, 2024

Purpose of this PR

InitContainers can now specify a restartPolicy with a value of Always to make the init container act like a sidecar. This PR updates the CRDs to allow this field to be present.

https://kubernetes.io/docs/reference/kubernetes-api/workload-resources/pod-v1/#lifecycle
https://kubernetes.io/docs/concepts/workloads/pods/init-containers/

Proposed changes:

  • Adds restartPolicy to driver.initContainers and executor.initContainers for both SparkApplication and ScheduledSparkApplication.

Change Category

Indicate the type of change by marking the applicable boxes:

  • Bugfix (non-breaking change which fixes an issue)
  • Feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that could affect existing functionality)
  • Documentation update

Rationale

This allows users of the helm chart to set restartPolicy: "Always" for init containers on the executor and driver pods.

Checklist

Before submitting your PR, please review the following:

  • I have conducted a self-review of my own code.
  • I have updated documentation accordingly.
  • I have added tests that prove my changes are effective or that my feature works.
  • Existing unit tests pass locally with my changes.

Signed-off-by: Mark Schroering <mark.schroering@gmail.com>
Signed-off-by: Mark Schroering <mark.schroering@gmail.com>
@google-oss-prow google-oss-prow bot added size/M and removed size/S labels May 13, 2024
Signed-off-by: Mark Schroering <mark.schroering@gmail.com>
@google-oss-prow google-oss-prow bot added size/S and removed size/M labels May 13, 2024
@mjtieman
Copy link

+1 this will be very helpful.

@macnaughton
Copy link

+1 as well, we could use this

@GeorgiiKolpakov
Copy link

Good feature, would love to use it for our logging sidecar

Copy link
Contributor

@vara-bonthu vara-bonthu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@yuchaoran2011 FYI

@mschroering
Copy link
Contributor Author

/assign mwielgus

@mschroering
Copy link
Contributor Author

/assign yuchaoran2011

Copy link
Contributor

@vara-bonthu vara-bonthu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Contributor

@yuchaoran2011 yuchaoran2011 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

@google-oss-prow google-oss-prow bot added the lgtm label Jun 4, 2024
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: vara-bonthu, yuchaoran2011

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:
  • OWNERS [vara-bonthu,yuchaoran2011]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@google-oss-prow google-oss-prow bot merged commit 0573222 into kubeflow:master Jun 4, 2024
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants