zhengchenyu opened a new pull request, #57349: URL: https://github.com/apache/spark/pull/57349
### What changes were proposed in this pull request? `BasicDriverFeatureStep` skips `containerPort` entries whose port is 0. ### Why are the changes needed? When we use host network, we want to resolve port conflicts by binding port 0. But setting `spark.driver.port` / `spark.driver.blockManager.port` / `spark.ui.port` / `spark.connect.grpc.binding.port` to 0 makes driver Pod creation fail. The error log is as follows: ``` Exception in thread "main" io.fabric8.kubernetes.client.KubernetesClientException: Failure executing: POST at: https://XX.XX.XX.XX:443/api/v1/namespaces/default/pods. Message: Pod "xxx-driver" is invalid: [spec.containers[0].ports[0].containerPort: Required value, spec.containers[0].ports[1].containerPort: Required value ... ``` BasicExecutorFeatureStep already skips the entry when the port is 0. The driver side should follow the same pattern. ### Does this PR introduce _any_ user-facing change? No ### How was this patch tested? * Unit tests in `BasicDriverFeatureStepSuite`. * Test in kubernetes cluster. -- 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]
