kubernetes/plugin/pkg/admission/podnodeselector/admission.go

var NamespaceNodeSelectors

const PluginName

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

type Plugin

var _

var _

type pluginConfig

// readConfig reads default value of clusterDefaultNodeSelector
// from the file provided with --admission-control-config-file
// If the file is not supplied, it defaults to ""
// The format in a file:
// podNodeSelectorPluginConfig:
//
//	clusterDefaultNodeSelector: <node-selectors-labels>
//	namespace1: <node-selectors-labels>
//	namespace2: <node-selectors-labels>
func readConfig(config io.Reader) *pluginConfig {}

// Admit enforces that pod and its namespace node label selectors matches at least a node in the cluster.
func (p *Plugin) Admit(ctx context.Context, a admission.Attributes, o admission.ObjectInterfaces) error {}

// Validate ensures that the pod node selector is allowed
func (p *Plugin) Validate(ctx context.Context, a admission.Attributes, o admission.ObjectInterfaces) error {}

func (p *Plugin) getNamespaceNodeSelectorMap(namespaceName string) (labels.Set, error) {}

func shouldIgnore(a admission.Attributes) bool {}

// NewPodNodeSelector initializes a podNodeSelector
func NewPodNodeSelector(clusterNodeSelectors map[string]string) *Plugin {}

// SetExternalKubeClientSet sets the plugin's client
func (p *Plugin) SetExternalKubeClientSet(client kubernetes.Interface) {}

// SetExternalKubeInformerFactory configures the plugin's informer factory
func (p *Plugin) SetExternalKubeInformerFactory(f informers.SharedInformerFactory) {}

// ValidateInitialization verifies the object has been properly initialized
func (p *Plugin) ValidateInitialization() error {}

func (p *Plugin) defaultGetNamespace(name string) (*corev1.Namespace, error) {}

func (p *Plugin) getNodeSelectorMap(namespace *corev1.Namespace) (labels.Set, error) {}

func isSubset(subSet, superSet labels.Set) bool {}