You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2021/05/20 15:57:24 UTC

[GitHub] [spark] dongjoon-hyun commented on a change in pull request #32610: [SPARK-35460][K8S] invalid `spark.kubernetes.executor.podNamePrefix` causes app to hang

dongjoon-hyun commented on a change in pull request #32610:
URL: https://github.com/apache/spark/pull/32610#discussion_r636238110



##########
File path: resource-managers/kubernetes/core/src/main/scala/org/apache/spark/deploy/k8s/Config.scala
##########
@@ -250,11 +250,21 @@ private[spark] object Config extends Logging {
       .stringConf
       .createOptional
 
+  private val podConfValidator =
+    "^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$".r.pattern
+
   val KUBERNETES_EXECUTOR_POD_NAME_PREFIX =
     ConfigBuilder("spark.kubernetes.executor.podNamePrefix")
-      .doc("Prefix to use in front of the executor pod names.")
+      .doc("Prefix to use in front of the executor pod names. Note that pod names must consist" +
+        " of lower case alphanumeric characters, '-' or '.', and must start and end with an" +
+        " alphanumeric character (e.g. 'example.com', regex used for validation is:" +
+        s" ${podConfValidator.toString}")

Review comment:
       Hi, @yaooqinn . Thank you, but this is still incomplete because we don't check `contain at most 63 characters` rule.
   
   If they change, this will become wrong again. So, we had better give the official reference because this is not defined by Apache Spark. We just follow K8s's rule. Technically, the official definition is `RFC 1123` in K8s document, https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#dns-subdomain-names, isn't it?




-- 
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:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org