Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // HandlerMap contains admission webhook handlers HandlerMap = map[string]admission.Handler{ "mutate-apps-kruise-io-v1alpha1-cloneset": &WorkloadHandler{}, "mutate-apps-v1-deployment": &WorkloadHandler{}, "mutate-apps-kruise-io-v1alpha1-daemonset": &WorkloadHandler{}, "mutate-unified-workload": &UnifiedWorkloadHandler{}, } )
Functions ¶
This section is empty.
Types ¶
type UnifiedWorkloadHandler ¶ added in v0.6.0
type UnifiedWorkloadHandler struct {
// To use the client, you need to do the following:
// - uncomment it
// - import sigs.k8s.io/controller-runtime/pkg/client
// - uncomment the InjectClient method at the bottom of this file.
Client client.Client
// Decoder decodes objects
Decoder *admission.Decoder
Finder *util.ControllerFinder
}
UnifiedWorkloadHandler handles Pod
func (*UnifiedWorkloadHandler) Handle ¶ added in v0.6.0
func (h *UnifiedWorkloadHandler) Handle(ctx context.Context, req admission.Request) admission.Response
Handle handles admission requests.
func (*UnifiedWorkloadHandler) InjectClient ¶ added in v0.6.0
func (h *UnifiedWorkloadHandler) InjectClient(c client.Client) error
InjectClient injects the client into the UnifiedWorkloadHandler
func (*UnifiedWorkloadHandler) InjectDecoder ¶ added in v0.6.0
func (h *UnifiedWorkloadHandler) InjectDecoder(d *admission.Decoder) error
InjectDecoder injects the decoder into the UnifiedWorkloadHandler
type WorkloadHandler ¶
type WorkloadHandler struct {
// To use the client, you need to do the following:
// - uncomment it
// - import sigs.k8s.io/controller-runtime/pkg/client
// - uncomment the InjectClient method at the bottom of this file.
Client client.Client
// Decoder decodes objects
Decoder *admission.Decoder
Finder *util.ControllerFinder
}
WorkloadHandler handles Pod
func (*WorkloadHandler) InjectClient ¶
func (h *WorkloadHandler) InjectClient(c client.Client) error
InjectClient injects the client into the WorkloadHandler
func (*WorkloadHandler) InjectDecoder ¶
func (h *WorkloadHandler) InjectDecoder(d *admission.Decoder) error
InjectDecoder injects the decoder into the WorkloadHandler
Click to show internal directories.
Click to hide internal directories.