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 ¶
- type PodSchedulerSetter
- func (p *PodSchedulerSetter) Handle(ctx context.Context, req types.Request) types.Response
- func (p *PodSchedulerSetter) InjectClient(c client.Client) error
- func (p *PodSchedulerSetter) InjectDecoder(d types.Decoder) error
- func (p *PodSchedulerSetter) IsManagedVolume(volume corev1.Volume, namespace string) (bool, error)
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 ¶
IsManagedVolume inspects a given volume to find if it's managed by the given provisioners.