podnodeselector

package
v1.21.8 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 15, 2021 License: Apache-2.0 Imports: 16 Imported by: 41

Documentation

Index

Constants

View Source
const PluginName = "PodNodeSelector"

PluginName is a string with the name of the plugin

Variables

View Source
var NamespaceNodeSelectors = []string{"scheduler.alpha.kubernetes.io/node-selector"}

NamespaceNodeSelectors is for assigning node selectors labels to namespaces. Default value is the annotation key scheduler.alpha.kubernetes.io/node-selector

Functions

func Register added in v1.7.0

func Register(plugins *admission.Plugins)

Register registers a plugin

Types

type Plugin added in v1.15.0

type Plugin struct {
	*admission.Handler
	// contains filtered or unexported fields
}

Plugin is an implementation of admission.Interface.

func NewPodNodeSelector

func NewPodNodeSelector(clusterNodeSelectors map[string]string) *Plugin

NewPodNodeSelector initializes a podNodeSelector

func (*Plugin) Admit added in v1.15.0

Admit enforces that pod and its namespace node label selectors matches at least a node in the cluster.

func (*Plugin) SetExternalKubeClientSet added in v1.15.0

func (p *Plugin) SetExternalKubeClientSet(client kubernetes.Interface)

SetExternalKubeClientSet sets the plugin's client

func (*Plugin) SetExternalKubeInformerFactory added in v1.15.0

func (p *Plugin) SetExternalKubeInformerFactory(f informers.SharedInformerFactory)

SetExternalKubeInformerFactory configures the plugin's informer factory

func (*Plugin) Validate added in v1.15.0

Validate ensures that the pod node selector is allowed

func (*Plugin) ValidateInitialization added in v1.15.0

func (p *Plugin) ValidateInitialization() error

ValidateInitialization verifies the object has been properly initialized

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL