mutating

package
v1.6.2 Latest Latest
Warning

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

Go to latest
Published: Apr 3, 2024 License: Apache-2.0 Imports: 32 Imported by: 2

Documentation

Index

Constants

View Source
const (
	InjectedPersistentPodStateKey = "kruise.io/injected-persistent-pod-state"
)

Variables

View Source
var (
	// HandlerMap contains admission webhook handlers
	HandlerMap = map[string]admission.Handler{
		"mutate-pod": &PodCreateHandler{},
	}
)

Functions

func SelectorPersistentPodState added in v1.2.0

func SelectorPersistentPodState(reader client.Reader, ref appsv1alpha1.TargetReference, ns string) *appsv1alpha1.PersistentPodState

Types

type PodCreateHandler

type PodCreateHandler 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
	// contains filtered or unexported fields
}

PodCreateHandler handles Pod

func (*PodCreateHandler) Handle

Handle handles admission requests.

func (*PodCreateHandler) InjectClient

func (h *PodCreateHandler) InjectClient(c client.Client) error

InjectClient injects the client into the PodCreateHandler

func (*PodCreateHandler) InjectDecoder

func (h *PodCreateHandler) InjectDecoder(d *admission.Decoder) error

InjectDecoder injects the decoder into the PodCreateHandler

Jump to

Keyboard shortcuts

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