keunseob commented on a change in pull request #3961: Add length of podName 
checking code for K8s
URL: 
https://github.com/apache/incubator-openwhisk/pull/3961#discussion_r209194261
 
 

 ##########
 File path: 
core/invoker/src/main/scala/whisk/core/containerpool/kubernetes/KubernetesContainer.scala
 ##########
 @@ -63,7 +63,9 @@ object KubernetesContainer {
                                                       log: Logging): 
Future[KubernetesContainer] = {
     implicit val tid = transid
 
-    val podName = name.replace("_", "-").replaceAll("[()]", "").toLowerCase()
+    // Kubernetes naming rule allows maximum length of 63 character.
+    val origName = name.replace("_", "-").replaceAll("[()]", "").toLowerCase()
+    val podName = if (origName.length() > 63) origName.substring(0, 63) else 
origName
 
 Review comment:
   very helpful. thx:)

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to