componentdefinition

package
v1.9.11 Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2024 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterMutatingHandler

func RegisterMutatingHandler(mgr manager.Manager, args controller.Args)

RegisterMutatingHandler will register component mutation handler to the webhook

func RegisterValidatingHandler

func RegisterValidatingHandler(mgr manager.Manager)

RegisterValidatingHandler will register ComponentDefinition validation to webhook

func ValidateWorkload

func ValidateWorkload(mapper meta.RESTMapper, cd *v1beta1.ComponentDefinition) error

ValidateWorkload validates whether the Workload field is valid

Types

type MutatingHandler

type MutatingHandler struct {
	Client client.Client
	// Decoder decodes objects
	Decoder *admission.Decoder
	// AutoGenWorkloadDef indicates whether create workloadDef which componentDef refers to
	AutoGenWorkloadDef bool
}

MutatingHandler handles ComponentDefinition

func (*MutatingHandler) Handle

Handle handles admission requests.

func (*MutatingHandler) InjectClient

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

InjectClient injects the client into the ApplicationValidateHandler

func (*MutatingHandler) InjectDecoder

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

InjectDecoder injects the decoder into the ComponentDefinitionMutatingHandler

func (*MutatingHandler) Mutate

Mutate sets all the default value for the ComponentDefinition

type ValidatingHandler

type ValidatingHandler struct {
	// Decoder decodes object
	Decoder *admission.Decoder
	Client  client.Client
}

ValidatingHandler handles validation of component definition

func (*ValidatingHandler) Handle

Handle validate component definition

func (*ValidatingHandler) InjectClient

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

InjectClient injects the client into the ApplicationValidateHandler

func (*ValidatingHandler) InjectDecoder

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

InjectDecoder injects the decoder into the ValidatingHandler

Jump to

Keyboard shortcuts

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