Documentation
¶
Index ¶
- func SetupAuthzRoleBindingWebhookWithManager(mgr ctrl.Manager) error
- func ValidateCondition(cond openchoreodevv1alpha1.AuthzCondition, fieldPath *field.Path) field.ErrorList
- type AuthzRoleBindingValidator
- func (v *AuthzRoleBindingValidator) ValidateCreate(_ context.Context, obj runtime.Object) (admission.Warnings, error)
- func (v *AuthzRoleBindingValidator) ValidateDelete(_ context.Context, obj runtime.Object) (admission.Warnings, error)
- func (v *AuthzRoleBindingValidator) ValidateUpdate(_ context.Context, _, newObj runtime.Object) (admission.Warnings, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SetupAuthzRoleBindingWebhookWithManager ¶
SetupAuthzRoleBindingWebhookWithManager registers the validating webhook for AuthzRoleBinding.
func ValidateCondition ¶
func ValidateCondition(cond openchoreodevv1alpha1.AuthzCondition, fieldPath *field.Path) field.ErrorList
ValidateCondition checks that a single AuthzCondition is well-formed:
- actions and expression are non-empty.
- The CEL expression compiles and returns bool.
- Every <root>.<leaf> attribute access in the expression is in the intersection of allowed attributes for all listed actions.
All validation errors are collected and returned together.
Types ¶
type AuthzRoleBindingValidator ¶
AuthzRoleBindingValidator validates AuthzRoleBinding resources.
NOTE: The +kubebuilder:object:generate=false marker prevents controller-gen from generating DeepCopy methods, as this struct is used only for temporary operations and does not need to be deeply copied.
func (*AuthzRoleBindingValidator) ValidateCreate ¶
func (*AuthzRoleBindingValidator) ValidateDelete ¶
func (*AuthzRoleBindingValidator) ValidateUpdate ¶
Click to show internal directories.
Click to hide internal directories.