Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for IsWildcardDNS1123Label (0.27 sec)

  1. pkg/config/labels/instance.go

    	return len(value) <= DNS1123LabelMaxLength && dns1123LabelRegexp.MatchString(value)
    }
    
    // IsWildcardDNS1123Label tests for a string that conforms to the definition of a label in DNS (RFC 1123), but allows
    // the wildcard label (`*`), and typical labels with a leading astrisk instead of alphabetic character (e.g. "*-foo")
    func IsWildcardDNS1123Label(value string) bool {
    	return len(value) <= DNS1123LabelMaxLength && wildcardPrefixRegexp.MatchString(value)
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Fri Jun 16 06:54:36 UTC 2023
    - 5K bytes
    - Viewed (0)
  2. pkg/config/validation/agent/validation.go

    		return err
    	}
    	// We only allow wildcards in the first label; split off the first label (parts[0]) from the rest of the host (parts[1])
    	parts := strings.SplitN(domain, ".", 2)
    	if !labels.IsWildcardDNS1123Label(parts[0]) {
    		return fmt.Errorf("domain name %q invalid (label %q invalid)", domain, parts[0])
    	} else if len(parts) > 1 {
    		return ValidateDNS1123Labels(parts[1])
    	}
    	return nil
    }
    
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Wed Apr 17 20:06:41 UTC 2024
    - 30.9K bytes
    - Viewed (0)
Back to top