kubernetes/plugin/pkg/admission/noderestriction/admission.go

const PluginName

// Register registers a plugin
func Register(plugins *admission.Plugins) {}

// NewPlugin creates a new NodeRestriction admission plugin.
// This plugin identifies requests from nodes
func NewPlugin(nodeIdentifier nodeidentifier.NodeIdentifier) *Plugin {}

type Plugin

var _

var _

var _

// InspectFeatureGates allows setting bools without taking a dep on a global variable
func (p *Plugin) InspectFeatureGates(featureGates featuregate.FeatureGate) {}

// SetExternalKubeInformerFactory registers an informer factory into Plugin
func (p *Plugin) SetExternalKubeInformerFactory(f informers.SharedInformerFactory) {}

// ValidateInitialization validates the Plugin was initialized properly
func (p *Plugin) ValidateInitialization() error {}

var podResource

var nodeResource

var pvcResource

var svcacctResource

var leaseResource

var csiNodeResource

var resourceSliceResource

var csrResource

// Admit checks the admission policy and triggers corresponding actions
func (p *Plugin) Admit(ctx context.Context, a admission.Attributes, o admission.ObjectInterfaces) error {}

// admitPod allows creating or deleting a pod if it is assigned to the
// current node and fulfills related criteria.
func (p *Plugin) admitPod(nodeName string, a admission.Attributes) error {}

func (p *Plugin) admitPodCreate(nodeName string, a admission.Attributes) error {}

// admitPodStatus allows to update the status of a pod if it is
// assigned to the current node.
func (p *Plugin) admitPodStatus(nodeName string, a admission.Attributes) error {}

func resourceClaimStatusesEqual(statusA, statusB []api.PodResourceClaimStatus) bool {}

// admitPodEviction allows to evict a pod if it is assigned to the current node.
func (p *Plugin) admitPodEviction(nodeName string, a admission.Attributes) error {}

func (p *Plugin) admitPVCStatus(nodeName string, a admission.Attributes) error {}

func (p *Plugin) admitNode(nodeName string, a admission.Attributes) error {}

// getModifiedLabels returns the set of label keys that are different between the two maps
func getModifiedLabels(a, b map[string]string) sets.String {}

func isKubernetesLabel(key string) bool {}

func getLabelNamespace(key string) string {}

// getForbiddenLabels returns the set of labels that may not be added, removed, or modified by the node on create or update.
func (p *Plugin) getForbiddenLabels(modifiedLabels sets.String) sets.String {}

func (p *Plugin) admitServiceAccount(nodeName string, a admission.Attributes) error {}

func (p *Plugin) admitLease(nodeName string, a admission.Attributes) error {}

func (p *Plugin) admitCSINode(nodeName string, a admission.Attributes) error {}

func (p *Plugin) admitResourceSlice(nodeName string, a admission.Attributes) error {}

func (p *Plugin) admitCSR(nodeName string, a admission.Attributes) error {}