Documentation ¶
Index ¶
- func DefaultAppRollout(obj *v1beta1.AppRollout)
- func FindCommonComponent(targetApp, sourceApp []*types.ComponentManifest) []string
- func FindCommonComponentWithManifest(target, source map[string]*unstructured.Unstructured) []string
- func RegisterMutatingHandler(mgr manager.Manager)
- func RegisterValidatingHandler(mgr manager.Manager)
- type MutatingHandler
- type ValidatingHandler
- func (h *ValidatingHandler) Handle(ctx context.Context, req admission.Request) admission.Response
- func (h *ValidatingHandler) InjectClient(c client.Client) error
- func (h *ValidatingHandler) InjectDecoder(d *admission.Decoder) error
- func (h *ValidatingHandler) ValidateCreate(appRollout *v1beta1.AppRollout) field.ErrorList
- func (h *ValidatingHandler) ValidateUpdate(new, old *v1beta1.AppRollout) field.ErrorList
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DefaultAppRollout ¶
func DefaultAppRollout(obj *v1beta1.AppRollout)
DefaultAppRollout will set the default value for the AppRollout®
func FindCommonComponent ¶
func FindCommonComponent(targetApp, sourceApp []*types.ComponentManifest) []string
FindCommonComponent finds the common components in both the source and target application only used for rollout webhook, will delete after refactor rollout webhook
func FindCommonComponentWithManifest ¶ added in v1.1.0
func FindCommonComponentWithManifest(target, source map[string]*unstructured.Unstructured) []string
FindCommonComponentWithManifest finds the common components in both the source and target workloads the source can be nil
func RegisterMutatingHandler ¶
RegisterMutatingHandler will register component mutation handler to the webhook
func RegisterValidatingHandler ¶
RegisterValidatingHandler will register application configuration validation to webhook
Types ¶
type MutatingHandler ¶
type MutatingHandler struct { Client client.Client // Decoder decodes objects Decoder *admission.Decoder }
MutatingHandler handles AppRollout
func (*MutatingHandler) InjectClient ¶
func (h *MutatingHandler) InjectClient(c client.Client) error
InjectClient injects the client into the MutatingHandler
func (*MutatingHandler) InjectDecoder ¶
func (h *MutatingHandler) InjectDecoder(d *admission.Decoder) error
InjectDecoder injects the decoder into the MutatingHandler
type ValidatingHandler ¶
type ValidatingHandler struct { client.Client // Decoder decodes objects Decoder *admission.Decoder }
ValidatingHandler handles AppRollout
func (*ValidatingHandler) InjectClient ¶
func (h *ValidatingHandler) InjectClient(c client.Client) error
InjectClient injects the client into the ValidatingHandler
func (*ValidatingHandler) InjectDecoder ¶
func (h *ValidatingHandler) InjectDecoder(d *admission.Decoder) error
InjectDecoder injects the decoder into the ValidatingHandler
func (*ValidatingHandler) ValidateCreate ¶
func (h *ValidatingHandler) ValidateCreate(appRollout *v1beta1.AppRollout) field.ErrorList
ValidateCreate validates the AppRollout on creation
func (*ValidatingHandler) ValidateUpdate ¶
func (h *ValidatingHandler) ValidateUpdate(new, old *v1beta1.AppRollout) field.ErrorList
ValidateUpdate validates the AppRollout on update