[SPARK-42060][K8S][WIP] add new config to override driver/executor k8s containers names#39563
[SPARK-42060][K8S][WIP] add new config to override driver/executor k8s containers names#39563hussein-awala wants to merge 1 commit intoapache:masterfrom
Conversation
dongjoon-hyun
left a comment
There was a problem hiding this comment.
Thank you for making a PR, but Apache Spark already supports container name overriding via the more general way, spark.kubernetes.driver.podTemplateFile and spark.kubernetes.executor.podTemplateFile. Please use the existing ones.
|
@dongjoon-hyun as I mentioned in my PR, we have more than 500 jobs, and providing a different pod template for each job just to override the container name is very complicated. |
|
Are annotations and labels not enough for your goals? That's the recommended way in K8s eco-system. We want to keep a single and simple way as much as possible instead of duplicating all K8s spec. |
|
We have other services running on the same cluster, and some of their pods have multiple containers. Using annotations and labels in this case is not enough to separate containers logs. |
What changes were proposed in this pull request?
Adding two new config
spark.kubernetes.driver.container.nameandspark.kubernetes.executor.container.nameto override the default containers names.Why are the changes needed?
We are using CloudWatch to collect the pods logs, and we partition/group the logs by the container name. Providing a pod template for each job just to override the container name is complicated where we have more than 500 different job, so the best solution is overriding the default containers names when the pod template is not provided, or when it is provided but without forcing a container name.
Does this PR introduce any user-facing change?
How was this patch tested?