Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 4 of 4 for ValidatePriorityClass (0.22 sec)

  1. pkg/apis/scheduling/validation/validation.go

    	"k8s.io/kubernetes/pkg/apis/scheduling"
    	schedulingapiv1 "k8s.io/kubernetes/pkg/apis/scheduling/v1"
    )
    
    // ValidatePriorityClass tests whether required fields in the PriorityClass are
    // set correctly.
    func ValidatePriorityClass(pc *scheduling.PriorityClass) field.ErrorList {
    	allErrs := field.ErrorList{}
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Jul 27 07:30:47 UTC 2022
    - 3K bytes
    - Viewed (0)
  2. pkg/apis/scheduling/validation/validation_test.go

    			Value:         spcs[0].Value,
    			GlobalDefault: spcs[0].GlobalDefault,
    			Description:   "system priority class 0",
    		},
    	}
    
    	for k, v := range successCases {
    		if errs := ValidatePriorityClass(&v); len(errs) != 0 {
    			t.Errorf("Expected success for %s, got %v", k, errs)
    		}
    	}
    
    	errorCases := map[string]scheduling.PriorityClass{
    		"with namespace": {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Jul 27 07:30:47 UTC 2022
    - 5.5K bytes
    - Viewed (0)
  3. plugin/pkg/admission/priority/admission.go

    			}
    			pod.Spec.PreemptionPolicy = &corePolicy
    		}
    	}
    	return nil
    }
    
    // validatePriorityClass ensures that the value field is not larger than the highest user definable priority. If the GlobalDefault is set, it ensures that there is no other PriorityClass whose GlobalDefault is set.
    func (p *Plugin) validatePriorityClass(a admission.Attributes) error {
    	operation := a.GetOperation()
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Feb 08 10:11:23 UTC 2022
    - 9K bytes
    - Viewed (0)
  4. pkg/registry/scheduling/priorityclass/strategy.go

    // Validate validates a new PriorityClass.
    func (priorityClassStrategy) Validate(ctx context.Context, obj runtime.Object) field.ErrorList {
    	pc := obj.(*scheduling.PriorityClass)
    	return validation.ValidatePriorityClass(pc)
    }
    
    // WarningsOnCreate returns warnings for the creation of the given object.
    func (priorityClassStrategy) WarningsOnCreate(ctx context.Context, obj runtime.Object) []string {
    	return nil
    }
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Feb 08 10:11:23 UTC 2022
    - 3K bytes
    - Viewed (0)
Back to top