Documentation
¶
Index ¶
- func SetupResourceReleaseWebhookWithManager(mgr ctrl.Manager) error
- type Validator
- func (v *Validator) ValidateCreate(_ context.Context, obj runtime.Object) (admission.Warnings, error)
- func (v *Validator) ValidateDelete(_ context.Context, obj runtime.Object) (admission.Warnings, error)
- func (v *Validator) ValidateUpdate(_ context.Context, oldObj, newObj runtime.Object) (admission.Warnings, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SetupResourceReleaseWebhookWithManager ¶
SetupResourceReleaseWebhookWithManager registers the validating webhook for ResourceRelease in the manager.
Types ¶
type Validator ¶
type Validator struct{}
Validator validates ResourceRelease resources. +kubebuilder:object:generate=false
func (*Validator) ValidateCreate ¶
func (v *Validator) ValidateCreate(_ context.Context, obj runtime.Object) (admission.Warnings, error)
ValidateCreate runs the on-snapshot checks: parameters against the embedded (Cluster)ResourceType.Spec.Parameters schema, and a re-validation of the embedded ResourceType.Spec for schema drift since the release was cut.
func (*Validator) ValidateDelete ¶
func (v *Validator) ValidateDelete(_ context.Context, obj runtime.Object) (admission.Warnings, error)
ValidateDelete is a no-op. ResourceRelease deletion is driven by the owning Resource's finalizer.
func (*Validator) ValidateUpdate ¶
func (v *Validator) ValidateUpdate(_ context.Context, oldObj, newObj runtime.Object) (admission.Warnings, error)
ValidateUpdate is a no-op. ResourceRelease.spec is immutable via a spec-level CEL XValidation marker (api/v1alpha1/resourcerelease_types.go:16); any update either matches the existing spec or is rejected at the CRD layer before reaching this webhook.