Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 9 of 9 for validateFuncs (0.51 sec)

  1. staging/src/k8s.io/apiserver/pkg/admission/plugin/policy/validating/admission_test.go

    	}]
    }
    
    func (f *fakeCompiler) RegisterDefinition(definition *validating.Policy, vf validateFunc) {
    	if f.ValidateFuncs == nil {
    		f.ValidateFuncs = make(map[types.NamespacedName]validating.Validator)
    	}
    
    	f.ValidateFuncs[types.NamespacedName{
    		Name:      definition.Name,
    		Namespace: definition.Namespace,
    	}] = vf
    }
    
    func (f *fakeCompiler) CompilePolicy(policy *validating.Policy) validating.Validator {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Mar 25 01:39:01 UTC 2024
    - 63.8K bytes
    - Viewed (0)
  2. pkg/config/validation/validation.go

    func GetValidateFunc(name string) ValidateFunc {
    	return validateFuncs[name]
    }
    
    func RegisterValidateFunc(name string, f ValidateFunc) ValidateFunc {
    	// Wrap the original validate function with an extra validate function for object metadata
    	validate := validateMetadata(f)
    	validateFuncs[name] = validate
    	return validate
    }
    
    func validateMetadata(f ValidateFunc) ValidateFunc {
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Wed Jun 12 04:03:33 UTC 2024
    - 107.2K bytes
    - Viewed (0)
  3. staging/src/k8s.io/apiserver/pkg/cel/library/format.go

    		Name:         "DNS1035Label",
    		ValidateFunc: func(s string) []string { return apimachineryvalidation.NameIsDNS1035Label(s, false) },
    		MaxRegexSize: 30,
    	},
    	"qualifiedName": {
    		Name:         "QualifiedName",
    		ValidateFunc: validation.IsQualifiedName,
    		MaxRegexSize: 60, // uses subdomain regex
    	},
    
    	"dns1123LabelPrefix": {
    		Name:         "DNS1123LabelPrefix",
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Apr 23 17:22:44 UTC 2024
    - 8.2K bytes
    - Viewed (0)
  4. pkg/kubelet/kubelet_volumes_linux_test.go

    			},
    			validateFunc: func(kubelet *Kubelet) error {
    				podDir := kubelet.getPodDir("pod1uid")
    				return validateDirNotExists(podDir)
    			},
    		},
    		"pod-doesnot-exist-with-subpath-top": {
    			prepareFunc: func(kubelet *Kubelet) error {
    				podDir := kubelet.getPodDir("pod1uid")
    				return os.MkdirAll(filepath.Join(podDir, "volume-subpaths"), 0750)
    			},
    			validateFunc: func(kubelet *Kubelet) error {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Sat Jul 30 03:35:26 UTC 2022
    - 8.9K bytes
    - Viewed (0)
  5. cmd/kubeadm/app/phases/certs/certs_test.go

    		certstestutil.WritePKIFiles(t, dir, test.files)
    
    		err := test.validateFunc(test.loc)
    		if test.expectedSuccess && err != nil {
    			t.Errorf("expected success, error executing validateFunc: %v, %v", test.name, err)
    		} else if !test.expectedSuccess && err == nil {
    			t.Errorf("expected failure, no error executing validateFunc: %v", test.name)
    		}
    	}
    }
    
    func TestNewCSR(t *testing.T) {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Jan 31 21:49:21 UTC 2024
    - 23.3K bytes
    - Viewed (0)
  6. staging/src/k8s.io/apiserver/pkg/cel/format.go

    	FormatType   = cel.ObjectType("kubernetes.NamedFormat")
    )
    
    // Format provdes a CEL representation of kubernetes format
    type Format struct {
    	Name         string
    	ValidateFunc func(string) []string
    
    	// Size of the regex string or estimated equivalent regex string used
    	// for cost estimation
    	MaxRegexSize int
    }
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Apr 23 17:22:44 UTC 2024
    - 1.8K bytes
    - Viewed (0)
  7. pkg/scheduler/apis/config/validation/validation.go

    		} else if validateFunc, ok := m[name]; ok {
    			// type mismatch, no need to validate the `args`.
    			if reflect.TypeOf(args) != reflect.ValueOf(validateFunc).Type().In(1) {
    				errs = append(errs, field.Invalid(pluginConfigPath.Child("args"), args, "has to match plugin args"))
    			} else {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Apr 25 06:27:01 UTC 2024
    - 11.5K bytes
    - Viewed (0)
  8. staging/src/k8s.io/apiextensions-apiserver/pkg/apiserver/customresource_handler_test.go

    		u.SetName("marker")
    		if item, err := crdInfo.storages["v1beta1"].CustomResource.Create(ctx, u, validateFunc, &metav1.CreateOptions{}); err != nil {
    			t.Fatal(err)
    		} else {
    			startResourceVersion = item.(*unstructured.Unstructured).GetResourceVersion()
    		}
    		if _, _, err := crdInfo.storages["v1beta1"].CustomResource.Delete(ctx, u.GetName(), validateFunc, &metav1.DeleteOptions{}); err != nil {
    			t.Fatal(err)
    		}
    	}
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Apr 13 15:27:39 UTC 2023
    - 34.6K bytes
    - Viewed (0)
  9. pkg/config/schema/resource/schema.go

    	// StatusPackage refers to the name of the golang status package.
    	StatusPackage string
    
    	// ValidateProto performs validation on protobuf messages based on this schema.
    	ValidateProto validation.ValidateFunc
    }
    
    // Build a Schema instance.
    func (b Builder) Build() (Schema, error) {
    	s := b.BuildNoValidate()
    
    	// Validate the schema.
    	if err := s.Validate(); err != nil {
    		return nil, err
    	}
    
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Tue Dec 19 22:42:42 UTC 2023
    - 9.7K bytes
    - Viewed (0)
Back to top