runtimeclass

package
v0.0.0-...-d88c8b5 Latest Latest
Warning

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

Go to latest
Published: Feb 9, 2021 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Overview

Package runtimeclass contains an admission controller for modifying and validating new Pods to take RuntimeClass into account. For RuntimeClass definitions which describe an overhead associated with running a pod, this admission controller will set the pod.Spec.Overhead field accordingly. This field should only be set through this controller, so vaidation will be carried out to ensure the pod's value matches what is defined in the coresponding RuntimeClass.

Index

Constants

View Source
const PluginName = "RuntimeClass"

PluginName indicates name of admission plugin.

Variables

This section is empty.

Functions

func Register

func Register(plugins *admission.Plugins)

Register registers a plugin

Types

type RuntimeClass

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

RuntimeClass is an implementation of admission.Interface. It looks at all new pods and sets pod.Spec.Overhead if a RuntimeClass is specified which defines an Overhead. If pod.Spec.Overhead is set but a RuntimeClass with matching overhead is not specified, the pod is rejected.

func NewRuntimeClass

func NewRuntimeClass() *RuntimeClass

NewRuntimeClass creates a new RuntimeClass admission control handler

func (*RuntimeClass) Admit

Admit makes an admission decision based on the request attributes

func (*RuntimeClass) InspectFeatureGates

func (r *RuntimeClass) InspectFeatureGates(featureGates featuregate.FeatureGate)

InspectFeatureGates allows setting bools without taking a dep on a global variable

func (*RuntimeClass) SetExternalKubeInformerFactory

func (r *RuntimeClass) SetExternalKubeInformerFactory(f informers.SharedInformerFactory)

SetExternalKubeInformerFactory implements the WantsExternalKubeInformerFactory interface.

func (*RuntimeClass) Validate

Validate makes sure that pod adhere's to RuntimeClass's definition

func (*RuntimeClass) ValidateInitialization

func (r *RuntimeClass) ValidateInitialization() error

ValidateInitialization implements the WantsExternalKubeInformerFactory interface.

Jump to

Keyboard shortcuts

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