Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 3 of 3 for ValidateWildcardDomain (0.22 sec)

  1. pkg/config/validation/agent/validation.go

    		for _, h := range s.Hosts {
    			if err := ValidateWildcardDomain(h); err != nil {
    				errs = multierror.Append(errs, fmt.Errorf("serviceSettings[%d], host `%s`: %v", sIndex, h, err))
    			}
    		}
    	}
    	return
    }
    
    // ValidateWildcardDomain checks that a domain is a valid FQDN, but also allows wildcard prefixes.
    func ValidateWildcardDomain(domain string) error {
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Wed Apr 17 20:06:41 UTC 2024
    - 30.9K bytes
    - Viewed (0)
  2. pkg/config/validation/agent/validation_test.go

    		t.Run(tt.name, func(t *testing.T) {
    			err := ValidateWildcardDomain(tt.in)
    			if err == nil && tt.out != "" {
    				t.Fatalf("ValidateWildcardDomain(%v) = nil, wanted %q", tt.in, tt.out)
    			} else if err != nil && tt.out == "" {
    				t.Fatalf("ValidateWildcardDomain(%v) = %v, wanted nil", tt.in, err)
    			} else if err != nil && !strings.Contains(err.Error(), tt.out) {
    				t.Fatalf("ValidateWildcardDomain(%v) = %v, wanted %q", tt.in, err, tt.out)
    			}
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Wed Apr 17 20:06:41 UTC 2024
    - 39.1K bytes
    - Viewed (0)
  3. pkg/config/validation/validation.go

    		rule, ok := cfg.Spec.(*networking.DestinationRule)
    		if !ok {
    			return nil, fmt.Errorf("cannot cast to destination rule")
    		}
    		v := Validation{}
    		v = AppendValidation(v,
    			agent.ValidateWildcardDomain(rule.Host),
    			validateTrafficPolicy(rule.TrafficPolicy))
    
    		subsets := sets.String{}
    		for _, subset := range rule.Subsets {
    			if subset == nil {
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Wed Jun 12 04:03:33 UTC 2024
    - 107.2K bytes
    - Viewed (0)
Back to top