Documentation ¶
Index ¶
- Constants
- Variables
- func Register(plugins *admission.Plugins)
- type PriorityPlugin
- func (p *PriorityPlugin) Admit(a admission.Attributes) error
- func (p *PriorityPlugin) SetInternalKubeClientSet(client internalclientset.Interface)
- func (p *PriorityPlugin) SetInternalKubeInformerFactory(f informers.SharedInformerFactory)
- func (p *PriorityPlugin) Validate(a admission.Attributes) error
- func (p *PriorityPlugin) ValidateInitialization() error
Constants ¶
const ( // HighestUserDefinablePriority is the highest priority for user defined priority classes. Priority values larger than 1 billion are reserved for Kubernetes system use. HighestUserDefinablePriority = 1000000000 // SystemCriticalPriority is the beginning of the range of priority values for critical system components. SystemCriticalPriority = 2 * HighestUserDefinablePriority )
Variables ¶
var SystemPriorityClasses = map[string]int32{ "system-cluster-critical": SystemCriticalPriority, "system-node-critical": SystemCriticalPriority + 1000, }
SystemPriorityClasses defines special priority classes which are used by system critical pods that should not be preempted by workload pods.
Functions ¶
Types ¶
type PriorityPlugin ¶ added in v1.9.0
PriorityPlugin is an implementation of admission.Interface.
func NewPlugin ¶
func NewPlugin() *PriorityPlugin
NewPlugin creates a new priority admission plugin.
func (*PriorityPlugin) Admit ¶ added in v1.9.0
func (p *PriorityPlugin) Admit(a admission.Attributes) error
Admit checks Pods and admits or rejects them. It also resolves the priority of pods based on their PriorityClass. Note that pod validation mechanism prevents update of a pod priority.
func (*PriorityPlugin) SetInternalKubeClientSet ¶ added in v1.9.0
func (p *PriorityPlugin) SetInternalKubeClientSet(client internalclientset.Interface)
SetInternalKubeClientSet implements the WantsInternalKubeClientSet interface.
func (*PriorityPlugin) SetInternalKubeInformerFactory ¶ added in v1.9.0
func (p *PriorityPlugin) SetInternalKubeInformerFactory(f informers.SharedInformerFactory)
SetInternalKubeInformerFactory implements the WantsInternalKubeInformerFactory interface.
func (*PriorityPlugin) Validate ¶ added in v1.9.0
func (p *PriorityPlugin) Validate(a admission.Attributes) error
Validate checks PriorityClasses and admits or rejects them.
func (*PriorityPlugin) ValidateInitialization ¶ added in v1.9.0
func (p *PriorityPlugin) ValidateInitialization() error
ValidateInitialization implements the InitializationValidator interface.