dongjoon-hyun opened a new pull request, #975: URL: https://github.com/apache/spark-kubernetes-operator/pull/975
### What changes were proposed in this pull request? This PR aims to observe only the driver container of the driver pod, like Apache Spark, so that sidecar containers do not decide the state of `SparkApplication`. - `ModelUtils.findDriverMainContainerStatus` finds the driver container even if `spark.kubernetes.driver.podTemplateContainerName` is not set. It picks the container which the property names in the driver pod template, or else the first container of the template. Without a pod template, it picks `spark-kubernetes-driver`. If no such container exists, it returns all containers like before. - `BaseAppDriverObserver` ignores the failure of sidecar containers, i.e. init containers with `restartPolicy: Always`. ### Why are the changes needed? Without `spark.kubernetes.driver.podTemplateContainerName`, a sidecar container which exits first, e.g. a log collector or `istio-proxy`, moves the application to `Succeeded` or `Failed`. Then, the operator deletes the driver pod while the driver is still running. Similarly, a sidecar init container which exits with a non-zero code fails the application, although Kubernetes restarts it. Apache Spark ([v4.2.0](https://github.com/apache/spark/releases/tag/v4.2.0), 2026-07-11) has a single driver container, which [KubernetesUtils.selectSparkContainer](https://github.com/apache/spark/blob/v4.2.0/resource-managers/kubernetes/core/src/main/scala/org/apache/spark/deploy/k8s/KubernetesUtils.scala#L116-L141) selects from the pod template. ### Does this PR introduce _any_ user-facing change? Yes. This fixes a bug in driver pods with sidecar containers. The change is documented in the migration guide. ### How was this patch tested? Pass the CIs with the newly added test cases in `ModelUtilsTest`, `AppDriverReadyObserverTest` and `AppDriverStartObserverTest`. ### Was this patch authored or co-authored using generative AI tooling? Generated-by: Claude Opus 5.5 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
