mutating

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Dec 21, 2023 License: Apache-2.0 Imports: 27 Imported by: 0

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-v1-statefulset":               &WorkloadHandler{},
		"mutate-apps-kruise-io-statefulset":        &WorkloadHandler{},
		"mutate-unified-workload":                  &WorkloadHandler{},
		"mutate-apps-kruise-io-v1alpha1-daemonset": &WorkloadHandler{},
	}
)

Functions

This section is empty.

Types

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) Handle

Handle handles admission requests.

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

Jump to

Keyboard shortcuts

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