Documentation
¶
Index ¶
- func SetupNetworkPolicyWebhookWithManager(mgr ctrl.Manager) error
- type NetworkPolicyCustomDefaulter
- type NetworkPolicyCustomValidator
- func (v *NetworkPolicyCustomValidator) ValidateCreate(_ context.Context, obj runtime.Object) (admission.Warnings, error)
- func (v *NetworkPolicyCustomValidator) ValidateDelete(ctx context.Context, obj runtime.Object) (admission.Warnings, error)
- func (v *NetworkPolicyCustomValidator) ValidateUpdate(_ context.Context, oldObj, newObj runtime.Object) (admission.Warnings, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SetupNetworkPolicyWebhookWithManager ¶
SetupNetworkPolicyWebhookWithManager registers the webhook for NetworkPolicy in the manager.
Types ¶
type NetworkPolicyCustomDefaulter ¶
type NetworkPolicyCustomDefaulter struct { }
NetworkPolicyCustomDefaulter struct is responsible for setting default values on the custom resource of the Kind NetworkPolicy when those are created or updated.
NOTE: The +kubebuilder:object:generate=false marker prevents controller-gen from generating DeepCopy methods, as it is used only for temporary operations and does not need to be deeply copied.
type NetworkPolicyCustomValidator ¶
type NetworkPolicyCustomValidator struct { }
NetworkPolicyCustomValidator struct is responsible for validating the NetworkPolicy resource when it is created, updated, or deleted.
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 (*NetworkPolicyCustomValidator) ValidateCreate ¶
func (v *NetworkPolicyCustomValidator) ValidateCreate(_ context.Context, obj runtime.Object) (admission.Warnings, error)
ValidateCreate implements webhook.CustomValidator so a webhook will be registered for the type FQDNNetworkPolicy.
func (*NetworkPolicyCustomValidator) ValidateDelete ¶
func (v *NetworkPolicyCustomValidator) ValidateDelete(ctx context.Context, obj runtime.Object) (admission.Warnings, error)
ValidateDelete implements webhook.CustomValidator so a webhook will be registered for the type NetworkPolicy.
func (*NetworkPolicyCustomValidator) ValidateUpdate ¶
func (v *NetworkPolicyCustomValidator) ValidateUpdate(_ context.Context, oldObj, newObj runtime.Object) (admission.Warnings, error)
ValidateUpdate implements webhook.CustomValidator so a webhook will be registered for the type FQDNNetworkPolicy.