kubernetes: k8s.io/kubernetes/plugin/pkg/admission/podnodeselector Index | Files

package podnodeselector

import "k8s.io/kubernetes/plugin/pkg/admission/podnodeselector"

Index

Package Files

admission.go

Constants

const PluginName = "PodNodeSelector"

PluginName is a string with the name of the plugin

Variables

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

func Register Uses

func Register(plugins *admission.Plugins)

Register registers a plugin

type Plugin Uses

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

Plugin is an implementation of admission.Interface.

func NewPodNodeSelector Uses

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

NewPodNodeSelector initializes a podNodeSelector

func (*Plugin) Admit Uses

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 Uses

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

SetExternalKubeClientSet sets the plugin's client

func (*Plugin) SetExternalKubeInformerFactory Uses

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

SetExternalKubeInformerFactory configures the plugin's informer factory

func (*Plugin) Validate Uses

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 Uses

func (p *Plugin) ValidateInitialization() error

ValidateInitialization verifies the object has been properly initialized

Package podnodeselector imports 16 packages (graph) and is imported by 33 packages. Updated 2019-09-12. Refresh now. Tools for package owners.