- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 19 for IsDNS1123Subdomain (0.28 sec)
-
staging/src/k8s.io/apimachinery/pkg/util/validation/validation.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)) }
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Thu Mar 07 16:08:43 UTC 2024 - 19K bytes - Viewed (0) -
pkg/apis/core/validation/names.go
pathLabels := strings.Split(segments[1], ".") for _, lbl := range pathLabels { // use IsDNS1123Subdomain because it enforces a length restriction of 253 characters // which is required in order to fit a full resource name into a single 'label' if errs := validation.IsDNS1123Subdomain(lbl); len(errs) > 0 { for _, err := range errs {
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Fri Nov 03 18:40:48 UTC 2023 - 5.5K bytes - Viewed (0) -
pkg/apis/apiserverinternal/validation/validation.go
var allErrs []string idx := strings.LastIndex(name, ".") if idx < 0 { allErrs = append(allErrs, "name must be in the form of <group>.<resource>") } else { for _, msg := range utilvalidation.IsDNS1123Subdomain(name[:idx]) { allErrs = append(allErrs, "the group segment "+msg) } for _, msg := range utilvalidation.IsDNS1035Label(name[idx+1:]) { allErrs = append(allErrs, "the resource segment "+msg) } }
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Thu Jul 13 21:43:49 UTC 2023 - 9.1K bytes - Viewed (0) -
staging/src/k8s.io/apiserver/pkg/util/webhook/validation.go
for i, step := range steps { if len(step) == 0 { allErrors = append(allErrors, field.Invalid(fldPath.Child("path"), urlPath, fmt.Sprintf("segment[%d] may not be empty", i))) continue } failures := validation.IsDNS1123Subdomain(step) for _, failure := range failures { allErrors = append(allErrors, field.Invalid(fldPath.Child("path"), urlPath, fmt.Sprintf("segment[%d]: %v", i, failure))) } } return allErrors
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Mon Sep 19 23:14:37 UTC 2022 - 3.5K bytes - Viewed (0) -
staging/src/k8s.io/apimachinery/pkg/api/validation/generic.go
// NameIsDNSSubdomain is a ValidateNameFunc for names that must be a DNS subdomain. func NameIsDNSSubdomain(name string, prefix bool) []string { if prefix { name = maskTrailingDash(name) } return validation.IsDNS1123Subdomain(name) } // NameIsDNSLabel is a ValidateNameFunc for names that must be a DNS 1123 label. func NameIsDNSLabel(name string, prefix bool) []string { if prefix { name = maskTrailingDash(name) }
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Mon May 03 14:47:11 UTC 2021 - 3.2K bytes - Viewed (0) -
pkg/apis/networking/validation/validation.go
allErrs = append(allErrs, field.Invalid(fldPath.Index(tlsIndex).Child("hosts").Index(i), host, msg)) } continue } for _, msg := range validation.IsDNS1123Subdomain(host) { allErrs = append(allErrs, field.Invalid(fldPath.Index(tlsIndex).Child("hosts").Index(i), host, msg)) } } if !opts.AllowInvalidSecretName {
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Wed Feb 07 14:48:01 UTC 2024 - 31.5K bytes - Viewed (0) -
staging/src/k8s.io/apiserver/pkg/server/dynamiccertificates/named_certificates.go
func getCertificateNames(cert *x509.Certificate) []string { var names []string cn := cert.Subject.CommonName cnIsIP := netutils.ParseIPSloppy(cn) != nil cnIsValidDomain := cn == "*" || len(validation.IsDNS1123Subdomain(strings.TrimPrefix(cn, "*."))) == 0 // don't use the CN if it is a valid IP because our IP serving detection may unexpectedly use it to terminate the connection. if !cnIsIP && cnIsValidDomain { names = append(names, cn)
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Thu Jul 21 07:29:30 UTC 2022 - 3.2K bytes - Viewed (0) -
cmd/kubeadm/app/util/endpoint.go
// if host is a valid IP, returns it if ip := netutils.ParseIPSloppy(host); ip != nil { return host, port, nil } // if host is a validate RFC-1123 subdomain, returns it if errs := validation.IsDNS1123Subdomain(host); len(errs) == 0 { return host, port, nil } return "", "", errors.Errorf("hostport %s: host '%s' must be a valid IP address or a valid RFC-1123 DNS subdomain", hostport, host) }
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Tue Jan 11 15:08:59 UTC 2022 - 5.3K bytes - Viewed (0) -
pkg/apis/core/validation/events.go
allErrs = append(allErrs, field.Invalid(field.NewPath("message"), "", fmt.Sprintf("can have at most %v characters", NoteLengthLimit))) } } for _, msg := range validation.IsDNS1123Subdomain(event.Namespace) { allErrs = append(allErrs, field.Invalid(field.NewPath("namespace"), event.Namespace, msg)) } return allErrs
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Thu Sep 01 19:47:37 UTC 2022 - 9.2K bytes - Viewed (0) -
cmd/kubeadm/app/apis/kubeadm/validation/validation.go
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Wed May 01 16:01:49 UTC 2024 - 33.4K bytes - Viewed (0)