Documentation ¶
Index ¶
- Constants
- func RegisterMutatingHandler(mgr manager.Manager, args controller.Args)
- func RegisterValidatingHandler(mgr manager.Manager)
- func ValidateComponentObject(obj *v1alpha2.Component) field.ErrorList
- type MutatingHandler
- func (h *MutatingHandler) Handle(ctx context.Context, req admission.Request) admission.Response
- func (h *MutatingHandler) InjectClient(c client.Client) error
- func (h *MutatingHandler) InjectDecoder(d *admission.Decoder) error
- func (h *MutatingHandler) Mutate(ctx context.Context, obj *v1alpha2.Component) error
- type ValidatingHandler
Constants ¶
View Source
const (
// TypeField is the special field indicate the type of the workloadDefinition
TypeField = "type"
)
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 ¶
RegisterValidatingHandler will regsiter component mutation handler to the webhook
Types ¶
type MutatingHandler ¶
type MutatingHandler struct { Client client.Client Mapper discoverymapper.DiscoveryMapper // Decoder decodes objects Decoder *admission.Decoder }
MutatingHandler handles Component
func (*MutatingHandler) InjectClient ¶
func (h *MutatingHandler) InjectClient(c client.Client) error
InjectClient injects the client into the ComponentMutatingHandler
func (*MutatingHandler) InjectDecoder ¶
func (h *MutatingHandler) InjectDecoder(d *admission.Decoder) error
InjectDecoder injects the decoder into the ComponentMutatingHandler
type ValidatingHandler ¶
ValidatingHandler handles Component
func (*ValidatingHandler) InjectDecoder ¶
func (h *ValidatingHandler) InjectDecoder(d *admission.Decoder) error
InjectDecoder injects the decoder into the ComponentValidatingHandler
Click to show internal directories.
Click to hide internal directories.