Documentation ¶
Index ¶
- Variables
- type CreateUpdatePodForSchedulingHandler
- func (a *CreateUpdatePodForSchedulingHandler) AddScheduleInfoToPod(pod *corev1.Pod, namespace string) (err error)
- func (a *CreateUpdatePodForSchedulingHandler) Handle(ctx context.Context, req admission.Request) admission.Response
- func (a *CreateUpdatePodForSchedulingHandler) InjectDecoder(d *admission.Decoder) error
- func (a *CreateUpdatePodForSchedulingHandler) Setup(client client.Client)
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // HandlerMap contains admission webhook handlers HandlerMap = map[string]common.AdmissionHandler{ common.WebhookSchedulePodPath: &CreateUpdatePodForSchedulingHandler{}, } )
Functions ¶
This section is empty.
Types ¶
type CreateUpdatePodForSchedulingHandler ¶
type CreateUpdatePodForSchedulingHandler struct { Client client.Client // contains filtered or unexported fields }
CreateUpdatePodForSchedulingHandler mutates a pod and has implemented admission.DecoderInjector
func (*CreateUpdatePodForSchedulingHandler) AddScheduleInfoToPod ¶
func (a *CreateUpdatePodForSchedulingHandler) AddScheduleInfoToPod(pod *corev1.Pod, namespace string) (err error)
AddScheduleInfoToPod will call all plugins to get total prefer info
func (*CreateUpdatePodForSchedulingHandler) Handle ¶
func (a *CreateUpdatePodForSchedulingHandler) Handle(ctx context.Context, req admission.Request) admission.Response
Handle is the mutating logic of pod
func (*CreateUpdatePodForSchedulingHandler) InjectDecoder ¶
func (a *CreateUpdatePodForSchedulingHandler) InjectDecoder(d *admission.Decoder) error
InjectDecoder injects the decoder.
func (*CreateUpdatePodForSchedulingHandler) Setup ¶
func (a *CreateUpdatePodForSchedulingHandler) Setup(client client.Client)
Click to show internal directories.
Click to hide internal directories.