Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for validateHostUsers (0.24 sec)

  1. pkg/apis/core/validation/validation.go

    	allErrs = append(allErrs, ValidateSecurityContext(ctr.SecurityContext, path.Child("securityContext"), hostUsers)...)
    	return allErrs
    }
    
    func validateHostUsers(spec *core.PodSpec, fldPath *field.Path) field.ErrorList {
    	allErrs := field.ErrorList{}
    
    	// Only make the following checks if hostUsers is false (otherwise, the container uses the
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed May 29 22:40:29 UTC 2024
    - 349.5K bytes
    - Viewed (0)
  2. pkg/apis/core/validation/validation_test.go

    				HostIPC:   true,
    			},
    		},
    	},
    	}
    
    	for _, tc := range cases {
    		t.Run(tc.name, func(t *testing.T) {
    			fPath := field.NewPath("spec")
    
    			allErrs := validateHostUsers(tc.spec, fPath)
    			if !tc.success && len(allErrs) == 0 {
    				t.Errorf("Unexpected success")
    			}
    			if tc.success && len(allErrs) != 0 {
    				t.Errorf("Unexpected error(s): %v", allErrs)
    			}
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed May 29 22:40:29 UTC 2024
    - 857.7K bytes
    - Viewed (0)
Back to top