Skip to content

Allow defining a time to live for finished SparkApplication driver pods #774

Description

@sweb

While looking into why the sensor in https://docs.stackable.tech/home/stable/airflow/usage-guide/applying-custom-resources/#_dag_code is not able to pull driver logs, I noticed that there is no way to stop driver / executor pods from being immediately deleted after the spark application finishes.

There is a sparkConf value for executors (spark.kubernetes.executor.deleteOnTermination - not considered by the operator and which cannot be acted upon by spark itself because the driver immediately terminates) but nothing comparable for drivers. We could define a new field:

spec:
  driver:
    ttlSecondsAfterFinished: 600   # default 0 = delete immediately, as today

To enable to sensor use case or allow better debugging. When set to a value > 0, the executor pods should also be kept around as long as deleteOnTermination is not set to false.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions