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, args controller.Args)
RegisterValidatingHandler will register TraitDefinition validation to webhook
func ValidateWorkload ¶
func ValidateWorkload(dm discoverymapper.DiscoveryMapper, cd *v1beta1.ComponentDefinition) error
ValidateWorkload validates whether the Workload field is valid
Types ¶
type MutatingHandler ¶
type MutatingHandler struct { Mapper discoverymapper.DiscoveryMapper Client client.Client // Decoder decodes objects Decoder *admission.Decoder }
MutatingHandler handles ComponentDefinition
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 ¶
func (h *MutatingHandler) Mutate(obj *v1beta1.ComponentDefinition) error
Mutate sets all the default value for the ComponentDefinition
type ValidatingHandler ¶
type ValidatingHandler struct { Mapper discoverymapper.DiscoveryMapper // Decoder decodes object Decoder *admission.Decoder }
ValidatingHandler handles validation of component definition
func (*ValidatingHandler) InjectDecoder ¶
func (h *ValidatingHandler) InjectDecoder(d *admission.Decoder) error
InjectDecoder injects the decoder into the ValidatingHandler
Click to show internal directories.
Click to hide internal directories.