kubernetesk8s.io/kubernetes/plugin/pkg/admission/defaulttolerationseconds Index | Files

package defaulttolerationseconds

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

Index

Constants

const PluginName = "DefaultTolerationSeconds"

PluginName indicates name of admission plugin.

Functions

func Register

func Register(plugins *admission.Plugins)

Register registers a plugin

Types

type Plugin

type Plugin struct {
	*admission.Handler
}

Plugin contains the client used by the admission controller It will add default tolerations for every pod that tolerate taints `notReady:NoExecute` and `unreachable:NoExecute`, with tolerationSeconds of 300s. If the pod already specifies a toleration for taint `notReady:NoExecute` or `unreachable:NoExecute`, the plugin won't touch it.

func NewDefaultTolerationSeconds

func NewDefaultTolerationSeconds() *Plugin

NewDefaultTolerationSeconds creates a new instance of the DefaultTolerationSeconds admission controller

func (*Plugin) Admit

func (p *Plugin) Admit(ctx context.Context, attributes admission.Attributes, o admission.ObjectInterfaces) (err error)

Admit makes an admission decision based on the request attributes

Source Files

admission.go

Version
v1.33.0 (latest)
Published
Apr 23, 2025
Platform
linux/amd64
Imports
8 packages
Last checked
3 hours ago

Tools for package owners.