skonto edited a comment 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-492152585 `isValidName()` method uses `"[a-z0-9]([-a-z0-9]*[a-z0-9])?"` which is in compliance with the[ k8s codebase](https://github.com/kubernetes/kubernetes/blob/6902f3112d98eb6bd0894886ff9cd3fbd03a7f79/staging/src/k8s.io/apimachinery/pkg/util/validation/validation.go#L110) for DNS-1123 labels and works for service names. Sanitize 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). So I think its not just dash that needs to be removed from the beginning of the name.
---------------------------------------------------------------- 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]
