hehuiyuan commented on issue #24219: [SPARK-27258][K8S]Deal with the k8s resource names that don't match their own regular expression URL: https://github.com/apache/spark/pull/24219#issuecomment-492174857 > `sanitize()` method does not fix the dash issue as a first character I agree, btw this happened before because of [truncation](https://github.com/apache/spark/pull/23781), but the sanitize method could be improved or re-use the logic for the executor pod names [here](https://github.com/apache/spark/blob/master/resource-managers/kubernetes/core/src/main/scala/org/apache/spark/deploy/k8s/features/BasicExecutorFeatureStep.scala#L87) and create one re-usable method. Pod names for example can be set in different ways eg via `spark.kubernetes.driver.pod.name`, scenario currently not covered. Code should be refactored isolating the logic in new methods like getPodName, getServiceName and so on, so validation and sanitization/truncation can happen in one place for the final string. I general I dont think these details should be managed by user code, they should be offered by the client (we could create a PR against fabric8io if makes sense but anyway). That sounds good.
---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: [email protected] With regards, Apache Git Services --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
