Repository navigation
Conversation
a9c859a to
7b2771a
Compare
sbernauer
left a comment
There was a problem hiding this comment.
Your CRD docs state
How long the spark-submit Job, the driver Pod and the objects the operator created for the application are kept after the Job finished
With that argumentation, I would have expected this to be a "clusterConfig" and not on the job "role". As there is no "clusterConfig" on the SparkApp, I would propse putting it below .spec.config (normally it's .spec.clusterConfig). One additional argument is that we likely get rid of the Job in the future (e.g. for streaming applications) and still want a TTL.
I also left two comments about not supporting spark.kubernetes.submission.waitAppCompletion and spark.kubernetes.driver.pod.name to make our lives easier.
@sbernauer I moved it in 7b2771a I put it into Regarding the two spark conf entries: I think stopping to support them is the right direction, however I would avoid doing it right now as we do not have a good default configuration for streaming applications and my guess is that both settings might be used in streaming workloads. I would suggest to get rid of them when we tackle a redesign for Spark streaming applications. If we are confident that support for those will be removed in the future, we can add a deprecation warning right now. |
|
Thanks for addressing the change! Putting it top level below |
|
Just a random brain fart: Shouldn't we have different TTLs for successful and failed Jobs? A successful Job can be typically cleaned up fast, logs for a failed one are much valuable. Or at least design the CRD in such a way that we can add that later? |
53273ba to
a78ef58
Compare
|
General change was approved in the daily today, |
Description
Closes #774
Adds the field
cleanupto set how long the spark-submit Job is kept around. This is useful, because the operator now moves the ownership of driver pod, serviceaccount, role binding and config maps that were created for this SparkApplication to the Job, once the driver pod finishes (either with Succeeded or Failed). There are two subfields that govern how to handle succeeded and failed jobs, as it is quite often to require longer TTLs for failed jobs.There are
threetwo possible values forafterSucceededandafterFailed:never: The Job never gets deleted and sticks around until the SparkApplication (its owner) gets deleted.10m(which is the default): The job sticks around for the specified duration and then gets deleted - this then also deletes the mentioned resources that have the job as owner.0s: Or any other variant that results in a duration of0s- this deletes the Job and the other resources right away.Before this change, driver pods get deleted right after the driver finishes. Users want to change this have enough time to look at driver logs of failed applications before these are removed. This also enables interactions with other products, e.g. Airflow where the logs can be copied into the task logs for a better user experience.
The pod-driver controller needs two more permissions for this:
patchon Pods andgeton Jobs.Definition of Done Checklist
Author
Reviewer
Acceptance
type/deprecationlabel & add to the deprecation scheduletype/experimentallabel & add to the experimental features tracker