Documentation ¶
Index ¶
- Constants
- Variables
- func Register(plugins *admission.Plugins)
- type Plugin
- func (p *Plugin) Admit(ctx context.Context, a admission.Attributes, o admission.ObjectInterfaces) error
- func (p *Plugin) SetExternalKubeClientSet(client kubernetes.Interface)
- func (p *Plugin) SetExternalKubeInformerFactory(f informers.SharedInformerFactory)
- func (p *Plugin) Validate(ctx context.Context, a admission.Attributes, o admission.ObjectInterfaces) error
- func (p *Plugin) ValidateInitialization() error
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 ¶
Types ¶
type Plugin ¶ added in v1.15.0
Plugin is an implementation of admission.Interface.
func NewPodNodeSelector ¶
NewPodNodeSelector initializes a podNodeSelector
func (*Plugin) Admit ¶ added in v1.15.0
func (p *Plugin) Admit(ctx context.Context, a admission.Attributes, o admission.ObjectInterfaces) error
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
func (p *Plugin) Validate(ctx context.Context, a admission.Attributes, o admission.ObjectInterfaces) error
Validate ensures that the pod node selector is allowed
func (*Plugin) ValidateInitialization ¶ added in v1.15.0
ValidateInitialization verifies the object has been properly initialized
Click to show internal directories.
Click to hide internal directories.