dongjoon-hyun commented on code in PR #38985:
URL: https://github.com/apache/spark/pull/38985#discussion_r1044222032


##########
resource-managers/kubernetes/core/src/main/scala/org/apache/spark/deploy/k8s/KubernetesConf.scala:
##########
@@ -266,16 +266,16 @@ private[spark] object KubernetesConf {
 
   def getAppNameLabel(appName: String): String = {
     // According to 
https://kubernetes.io/docs/concepts/overview/working-with-objects/labels,
-    // must be 63 characters or less to follow the DNS label standard, so take 
the 63 characters
-    // of the appName name as the label. In addition, label value must start 
and end with
-    // an alphanumeric character.
+    // must be 63 characters or less to follow the DNS label standard, for 
appName longer than
+    // 63 characters, replace the tail w/ "-abbr" as the label. In addition, 
label value must
+    // start and end with an alphanumeric character.
     StringUtils.abbreviate(
       s"$appName"
         .trim
         .toLowerCase(Locale.ROOT)
         .replaceAll("[^a-z0-9\\-]", "-")
         .replaceAll("-+", "-"),
-      "",
+      "-abbr",

Review Comment:
   Sorry, but this looks a little not good to me, @pan3793 .



-- 
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]

Reply via email to