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 2019/05/14 03:29:23 UTC

[GitHub] [spark] hehuiyuan commented on issue #24219: [SPARK-27258][K8S]Deal with the k8s resource names that don't match their own regular expression

hehuiyuan commented 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-492065168
 
 
   > There are some public utility methods that could be used offered by the fabric8io client for this purprose:
   > https://github.com/fabric8io/kubernetes-client/blob/v4.2.2/kubernetes-client/src/main/java/io/fabric8/kubernetes/client/utils/KubernetesResourceUtil.java
   > For example `io.fabric8.kubernetes.client.utils.KubernetesResourceUtil.{sanitizeName(),isValidName()}` methods etc.
   > This way code is cleaner and we dont need to maintain changes as K8s evolves.
   
   Hi, that sounds good. This class supports many methods.  But  I don't found the method that processes the first character of resourceName is `-` and  checks the name of Service in KubernetesResourceUtil .
   
   Service  is different from the others.
   
   ```
   The regex of Servive is ^[a-z]([-a-z0-9]*[a-z0-9])?.
   The regex of Pod is ^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*.
   The regex of Secret is ^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*.
   ```

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


With regards,
Apache Git Services

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