scheduler

package
v2.1.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Jun 24, 2020 License: MIT Imports: 14 Imported by: 0

Documentation

Overview

Package scheduler contains mutating admission controller webhook handlers for pod scheduler. The handler mutates a given pod if the pod has any volume that's managed by the given volume provisioners in PodSchedulerSetter.Provisioners and the associated scheduler is enabled. The scheduler name is set in PodSchedulerSetter.SchedulerName.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PodSchedulerSetter

type PodSchedulerSetter struct {

	// Provisioners is a list of storage provisioners to check a pod volume
	// against.
	Provisioners []string
	// SchedulerName is the name of the scheduler to mutate pods with.
	SchedulerName string
	// SchedulerAnnotationKey is the pod annotation that can be set to skip or
	// apply the mutation.
	SchedulerAnnotationKey string
	// contains filtered or unexported fields
}

PodSchedulerSetter is responsible for mutating and setting pod scheduler name.

func (*PodSchedulerSetter) Handle

Handle handles an admission request and mutates a pod object in the request.

func (*PodSchedulerSetter) InjectClient

func (p *PodSchedulerSetter) InjectClient(c client.Client) error

InjectClient injects a client into object.

func (*PodSchedulerSetter) InjectDecoder

func (p *PodSchedulerSetter) InjectDecoder(d types.Decoder) error

InjectDecoder injects a decoder into the object.

func (*PodSchedulerSetter) IsManagedVolume

func (p *PodSchedulerSetter) IsManagedVolume(volume corev1.Volume, namespace string) (bool, error)

IsManagedVolume inspects a given volume to find if it's managed by the given provisioners.

Jump to

Keyboard shortcuts

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