- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 17 for IsDNS1123Subdomain (0.24 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) -
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) -
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) -
pkg/apis/resource/validation/validation.go
if ref == nil { return allErrs } // group is required but the Core group is the empty value, so it can not be enforced. if ref.APIGroup != "" { for _, msg := range utilvalidation.IsDNS1123Subdomain(ref.APIGroup) { allErrs = append(allErrs, field.Invalid(fldPath.Child("apiGroup"), ref.APIGroup, msg)) } } if ref.Kind == "" { allErrs = append(allErrs, field.Required(fldPath.Child("kind"), ""))
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Fri Jun 07 09:18:10 UTC 2024 - 28.3K bytes - Viewed (0) -
staging/src/k8s.io/apimachinery/pkg/util/validation/validation_test.go
"0.1", "01.1", "012.1", "1a.1", "1-a.1", "1--a--b--2.1", "a.b.c.d.e", "aa.bb.cc.dd.ee", "1.2.3.4.5", "11.22.33.44.55", strings.Repeat("a", 253), } for _, val := range goodValues { if msgs := IsDNS1123Subdomain(val); len(msgs) != 0 { t.Errorf("expected true for '%s': %v", val, msgs) } } badValues := []string{ "", "A", "ABC", "aBc", "A1", "A-1", "1-A", "-", "a-", "-a", "1-", "-1",
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Tue Mar 05 04:51:54 UTC 2024 - 22.3K bytes - Viewed (0)