Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 6 of 6 for ValidateConfig (0.32 sec)

  1. pkg/config/schema/resource/schema.go

    	MustNewInstance() config.Spec
    
    	// Validate this schema.
    	Validate() error
    
    	// ValidateConfig validates that the given config message is of the correct type for this schema
    	// and that the contents are valid.
    	ValidateConfig(cfg config.Config) (validation.Warning, error)
    
    	// Equal is a helper function for testing equality between Schema instances. This supports comparison
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Tue Dec 19 22:42:42 UTC 2023
    - 9.7K bytes
    - Viewed (0)
  2. pilot/pkg/config/memory/store.go

    	kind := cfg.GroupVersionKind
    	s, ok := cr.schemas.FindByGroupVersionKind(kind)
    	if !ok {
    		return "", fmt.Errorf("unknown type %v", kind)
    	}
    	if !cr.skipValidation {
    		if _, err := s.ValidateConfig(cfg); err != nil {
    			return "", err
    		}
    	}
    	ns, exists := cr.data[kind][cfg.Namespace]
    	if !exists {
    		ns = map[string]any{}
    		cr.data[kind][cfg.Namespace] = ns
    	}
    
    	_, exists = ns[cfg.Name]
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Tue Dec 26 01:14:27 UTC 2023
    - 6.3K bytes
    - Viewed (0)
  3. tests/fuzz/config_validation_fuzzer.go

    	if err != nil {
    		return 0
    	}
    
    	err = f.GenerateStruct(&object)
    	if err != nil {
    		return 0
    	}
    
    	iobj := crdclient.TranslateObject(object, gvk, "cluster.local")
    	_, _ = r.ValidateConfig(iobj)
    	return 1
    }
    
    // FuzzConfigValidation2 implements a second fuzzer for config validation.
    // The fuzzer targets the same API as FuzzConfigValidation above,
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Sat Mar 30 00:31:03 UTC 2024
    - 5.3K bytes
    - Viewed (0)
  4. pkg/config/analysis/analyzers/schema/validation.go

    	gv := a.s.GroupVersionKind()
    	ctx.ForEach(gv, func(r *resource.Instance) bool {
    		ns := r.Metadata.FullName.Namespace
    		name := r.Metadata.FullName.Name
    
    		warnings, err := a.s.ValidateConfig(config.Config{
    			Meta: config.Meta{
    				Name:      string(name),
    				Namespace: string(ns),
    			},
    			Spec: r.Message,
    		})
    		if err != nil {
    			if multiErr, ok := err.(*multierror.Error); ok {
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Mon Jan 08 07:38:28 UTC 2024
    - 3.6K bytes
    - Viewed (0)
  5. pilot/pkg/config/kube/crd/conversion.go

    		}
    
    		cfg, err := ConvertObject(s, &obj, "")
    		if err != nil {
    			return nil, nil, fmt.Errorf("cannot parse proto message for %v: %v", obj.Name, err)
    		}
    
    		if withValidate {
    			if _, err := s.ValidateConfig(*cfg); err != nil {
    				return nil, nil, fmt.Errorf("configuration is invalid: %v", err)
    			}
    		}
    
    		varr = append(varr, *cfg)
    	}
    
    	return varr, others, nil
    }
    
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Thu Apr 25 18:26:16 UTC 2024
    - 6.3K bytes
    - Viewed (0)
  6. pkg/webhooks/validation/server/server.go

    		reportValidationFailed(request, reasonCRDConversionError, isDryRun)
    		return toAdmissionResponse(fmt.Errorf("error decoding configuration: %v", err))
    	}
    
    	warnings, err := s.ValidateConfig(*out)
    	if err != nil {
    		if _, f := out.Annotations[constants.AlwaysReject]; !f {
    			// Hide error message if it was intentionally rejected (by our own internal call)
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Sat May 04 06:13:56 UTC 2024
    - 9.3K bytes
    - Viewed (0)
Back to top