hehuiyuan commented on a change in pull request #24839: [SPARK-27258][K8S]Deal
with the k8s resource names that don't match their own regular expression
URL: https://github.com/apache/spark/pull/24839#discussion_r294030214
##########
File path:
resource-managers/kubernetes/core/src/main/scala/org/apache/spark/deploy/k8s/KubernetesConf.scala
##########
@@ -198,6 +198,7 @@ private[spark] object KubernetesConf {
.replaceAll("\\.", "-")
.replaceAll("[^a-z0-9\\-]", "")
.replaceAll("-+", "-")
+ .replaceAll("^-", "")
Review comment:
> Is this still needed then, if you're simply validating and replacing the
name if it starts with "-"?
The '^-' is used for all kubernetes resources. If the resource name starts
with "-",we replace it with `""` ,which can run normally
----------------------------------------------------------------
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]