You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
### What changes were proposed in this pull request?
This PR adds support for configuring the ttl for Spark apps after it stops. Working with the `resourceRetainPolicy` and `resourceRetainDurationMillis`, it enhances the garbage collection mechanism at the custom resource level.
### Why are the changes needed?
Introducing TTL helps user to more effectively configure the garbage collection for apps.
### Does this PR introduce _any_ user-facing change?
New configurable field spec.applicationTolerations.ttlAfterStopMillis added to SparkApplication CRD
### How was this patch tested?
CIs - including new unit test and revised e2e scenario
### Was this patch authored or co-authored using generative AI tooling?
No
Closesapache#290 from jiangzho/resource_ttl.
Authored-by: Zhou JIANG <[email protected]>
Signed-off-by: Peter Toth <[email protected]>
| .spec.applicationTolerations.resourceRetainPolicy | `Always` / `OnFailure` / `Never` | Never | Configure operator to delete / retain secondary resources for an app after it terminates. |
348
+
| .spec.applicationTolerations.resourceRetainDurationMillis | integer | -1 | Time to wait in milliseconds for releasing **secondary resources** after termination. Setting to negative value would disable the retention duration check for secondary resources after termination. |
349
+
| .spec.applicationTolerations.ttlAfterStopMillis | integer | -1 | Time-to-live in milliseconds for SparkApplication and **all its associated secondary resources**. If set to a negative value, the application would be retained and not be garbage collected by operator. |
350
+
351
+
Note that `ttlAfterStopMillis` applies to the app as well as its secondary resources. If both
352
+
`resourceRetainDurationMillis`and `ttlAfterStopMillis` are set to non-negative value and the
353
+
latter is smaller, then it takes higher precedence: operator would remove all resources related
0 commit comments