code: func (p *priorityPlugin) Validate(a admission.Attributes, o admission.ObjectInterfaces) error {
  	operation := a.GetOperation()
  	// Ignore all calls to subresources
  	if len(a.GetSubresource()) != 0 {
  		return nil
  	}
  
  	switch a.GetResource().GroupResource() {
  	case priorityClassResource:
  		if operation == admission.Create || operation == admission.Update {
  			return p.validatePriorityClass(a)
  		}
  		return nil
  
  	default:
  		return nil
  	}
  }
docs: // Validate checks PriorityClasses and admits or rejects them.