-
Notifications
You must be signed in to change notification settings - Fork 48
[SPARK-52648] Add support for maximal retain duration for Spark application resources #268
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -289,12 +289,17 @@ On the other hand, when developing an application, it's possible to configure | |
| ```yaml | ||
| applicationTolerations: | ||
| # Acceptable values are 'Always', 'OnFailure', 'Never' | ||
| # Setting this to 'OnFailure' would retain secondary resources if and only if the app fails | ||
| resourceRetainPolicy: OnFailure | ||
jiangzho marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| # Secondary resources would be garbage collected 10 minutes after app termination | ||
| resourceRetainDurationMillis: 600000 | ||
| ``` | ||
|
|
||
| to avoid operator attempt to delete driver pod and driver resources if app fails. Similarly, | ||
| if resourceRetainPolicy is set to `Always`, operator would not delete driver resources | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ditto. Please handle this typo-fix PR independently,
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Removed the unrelated typo fixes and raised #284
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I merged #284 . |
||
| when app ends. Note that this applies only to operator-created resources (driver pod, SparkConf | ||
| when app ends. They would be by default kept with the same lifecycle as the App. It's also | ||
| possible to configure `resourceRetainDurationMillis` to define the maximal retain duration for | ||
| these resources. Note that this applies only to operator-created resources (driver pod, SparkConf | ||
| configmap .etc). You may also want to tune `spark.kubernetes.driver.service.deleteOnTermination` | ||
| and `spark.kubernetes.executor.deleteOnTermination` to control the behavior of driver-created | ||
| resources. | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What will going to happen for the old CRDs (v1alpha and v1beta)?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The first commit introduces the feature to v1 only and usee would need to upgrade to v1.
I do agree that technically our operator still supports all versions and this can be introduced to all versions. I'll upgrade all them.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Applied the same to all versions
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, no, it seems that you misunderstood the comment, @jiangzho .
They are immutable. You should not change them.
What I asked is that the real time behavior inside K8s cluster.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To be clear, we load the old CRDs and store in
v1format. I was wondering what was the default stored value for the old CRDs.Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sorry for the confusion - I'll ensure a default value for them to keep the behavior consistent
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the default
-1would give unlimited retention duration for old custom resources, as previouslyThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for confirming, @jiangzho .