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 2022/06/27 05:21:42 UTC

[GitHub] [spark] dongjoon-hyun commented on pull request #32610: [SPARK-35460][K8S] verify the content of`spark.kubernetes.executor.podNamePrefix` before post it to k8s api-server

dongjoon-hyun commented on PR #32610:
URL: https://github.com/apache/spark/pull/32610#issuecomment-1166883262

   Hi, @yaooqinn .
   
   K8s code itself has several constraint constant and it seems that we referred a wrong place.
   
   In the PR description, the error message referred DNS-1123. And, the following is the real DNS-1123 validation code. Please see that the Max Length is 253 instead of 63.
   
   https://github.com/kubernetes/apimachinery/blame/master/pkg/util/validation/validation.go#L203-L218
   ```go
   const DNS1123SubdomainMaxLength int = 253
   
   var dns1123SubdomainRegexp = regexp.MustCompile("^" + dns1123SubdomainFmt + "$")
   
   // IsDNS1123Subdomain tests for a string that conforms to the definition of a
   // subdomain in DNS (RFC 1123).
   func IsDNS1123Subdomain(value string) []string {
   	var errs []string
   	if len(value) > DNS1123SubdomainMaxLength {
   		errs = append(errs, MaxLenError(DNS1123SubdomainMaxLength))
   	}
   	if !dns1123SubdomainRegexp.MatchString(value) {
   		errs = append(errs, RegexError(dns1123SubdomainErrorMsg, dns1123SubdomainFmt, "example.com"))
   	}
   	return errs
   }
   ```


-- 
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: reviews-unsubscribe@spark.apache.org

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