Documentation
¶
Index ¶
- func RegisterMutatingHandler(mgr manager.Manager)
- func RegisterValidatingHandler(mgr manager.Manager, _ controller.Args)
- func StepsCUEDepth(path *field.Path, steps []wfTypesv1alpha1.WorkflowStep) field.ErrorList
- func ValidateCUEDepth(app *v1beta1.Application) field.ErrorList
- type MutatingHandler
- type ReferencedObjectHandler
- type ValidatingHandler
- func (h *ValidatingHandler) Handle(ctx context.Context, req admission.Request) admission.Response
- func (h *ValidatingHandler) ValidateAnnotations(_ context.Context, app *v1beta1.Application) field.ErrorList
- func (h *ValidatingHandler) ValidateComponents(ctx context.Context, app *v1beta1.Application) field.ErrorList
- func (h *ValidatingHandler) ValidateCreate(ctx context.Context, app *v1beta1.Application, req admission.Request) field.ErrorList
- func (h *ValidatingHandler) ValidateDefinitionPermissions(ctx context.Context, app *v1beta1.Application, req admission.Request) field.ErrorList
- func (h *ValidatingHandler) ValidateTimeout(name, timeout string) field.ErrorList
- func (h *ValidatingHandler) ValidateUpdate(ctx context.Context, newApp, _ *v1beta1.Application, req admission.Request) field.ErrorList
- func (h *ValidatingHandler) ValidateWorkflow(_ context.Context, app *v1beta1.Application) field.ErrorList
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterMutatingHandler ¶
RegisterMutatingHandler will register component mutation handler to the webhook
func RegisterValidatingHandler ¶
func RegisterValidatingHandler(mgr manager.Manager, _ controller.Args)
RegisterValidatingHandler will register application validate handler to the webhook
func StepsCUEDepth ¶ added in v1.10.10
func StepsCUEDepth(path *field.Path, steps []wfTypesv1alpha1.WorkflowStep) field.ErrorList
StepsCUEDepth refuses workflow steps, and their sub-steps, whose condition or data passing carries CUE nested deeper than nesting.MaxDepth.
func ValidateCUEDepth ¶ added in v1.10.10
func ValidateCUEDepth(app *v1beta1.Application) field.ErrorList
ValidateCUEDepth refuses an Application whose workflow conditions or data passing carry CUE nested deeper than nesting.MaxDepth: the controller compiles them on every reconcile.
Types ¶
type MutatingHandler ¶
MutatingHandler adding user info to application annotations
type ReferencedObjectHandler ¶ added in v1.10.10
type ReferencedObjectHandler struct {
Decoder admission.Decoder
// contains filtered or unexported fields
}
ReferencedObjectHandler validates Workflow and Policy objects, which Applications reach by reference (spec.workflow.ref, a deploy step's policies). Whoever writes one must be able to use the definitions it names, as for an Application naming them inline; otherwise an Application admitted against a harmless object could have the object changed under it.
type ValidatingHandler ¶
type ValidatingHandler struct {
Client client.Client
// Decoder decodes objects
Decoder admission.Decoder
}
ValidatingHandler handles application
func (*ValidatingHandler) ValidateAnnotations ¶ added in v1.10.0
func (h *ValidatingHandler) ValidateAnnotations(_ context.Context, app *v1beta1.Application) field.ErrorList
ValidateAnnotations validates whether the application has both autoupdate and publish version annotations
func (*ValidatingHandler) ValidateComponents ¶
func (h *ValidatingHandler) ValidateComponents(ctx context.Context, app *v1beta1.Application) field.ErrorList
ValidateComponents validates the Application components
func (*ValidatingHandler) ValidateCreate ¶
func (h *ValidatingHandler) ValidateCreate(ctx context.Context, app *v1beta1.Application, req admission.Request) field.ErrorList
ValidateCreate validates the Application on creation
func (*ValidatingHandler) ValidateDefinitionPermissions ¶ added in v1.10.4
func (h *ValidatingHandler) ValidateDefinitionPermissions(ctx context.Context, app *v1beta1.Application, req admission.Request) field.ErrorList
ValidateDefinitionPermissions validates that the user has permissions to access all definition types
func (*ValidatingHandler) ValidateTimeout ¶
func (h *ValidatingHandler) ValidateTimeout(name, timeout string) field.ErrorList
ValidateTimeout validates the timeout of steps
func (*ValidatingHandler) ValidateUpdate ¶
func (h *ValidatingHandler) ValidateUpdate(ctx context.Context, newApp, _ *v1beta1.Application, req admission.Request) field.ErrorList
ValidateUpdate validates the Application on update
func (*ValidatingHandler) ValidateWorkflow ¶
func (h *ValidatingHandler) ValidateWorkflow(_ context.Context, app *v1beta1.Application) field.ErrorList
ValidateWorkflow validates the Application workflow