Documentation
¶
Overview ¶
Package webhook provides validating and defaulting admission webhooks for RCA Operator CRDs.
Index ¶
- func SetupRCAAgentWebhookWithManager(mgr ctrl.Manager) error
- func SetupRCACorrelationRuleWebhookWithManager(mgr ctrl.Manager) error
- type RCAAgentWebhook
- func (w *RCAAgentWebhook) Default(_ context.Context, agent *rcav1alpha1.RCAAgent) error
- func (w *RCAAgentWebhook) ValidateCreate(_ context.Context, agent *rcav1alpha1.RCAAgent) (admission.Warnings, error)
- func (w *RCAAgentWebhook) ValidateDelete(_ context.Context, _ *rcav1alpha1.RCAAgent) (admission.Warnings, error)
- func (w *RCAAgentWebhook) ValidateUpdate(_ context.Context, _, agent *rcav1alpha1.RCAAgent) (admission.Warnings, error)
- type RCACorrelationRuleWebhook
- func (w *RCACorrelationRuleWebhook) ValidateCreate(_ context.Context, rule *rcav1alpha1.RCACorrelationRule) (admission.Warnings, error)
- func (w *RCACorrelationRuleWebhook) ValidateDelete(_ context.Context, _ *rcav1alpha1.RCACorrelationRule) (admission.Warnings, error)
- func (w *RCACorrelationRuleWebhook) ValidateUpdate(_ context.Context, _, rule *rcav1alpha1.RCACorrelationRule) (admission.Warnings, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SetupRCAAgentWebhookWithManager ¶
SetupRCAAgentWebhookWithManager registers the webhook with the controller manager.
func SetupRCACorrelationRuleWebhookWithManager ¶
SetupRCACorrelationRuleWebhookWithManager registers the webhook.
Types ¶
type RCAAgentWebhook ¶
type RCAAgentWebhook struct{}
RCAAgentWebhook implements typed defaulting and validating webhooks for RCAAgent.
func (*RCAAgentWebhook) Default ¶
func (w *RCAAgentWebhook) Default(_ context.Context, agent *rcav1alpha1.RCAAgent) error
Default implements admission.Defaulter[*rcav1alpha1.RCAAgent].
func (*RCAAgentWebhook) ValidateCreate ¶
func (w *RCAAgentWebhook) ValidateCreate(_ context.Context, agent *rcav1alpha1.RCAAgent) (admission.Warnings, error)
ValidateCreate implements admission.Validator[*rcav1alpha1.RCAAgent].
func (*RCAAgentWebhook) ValidateDelete ¶
func (w *RCAAgentWebhook) ValidateDelete(_ context.Context, _ *rcav1alpha1.RCAAgent) (admission.Warnings, error)
ValidateDelete implements admission.Validator[*rcav1alpha1.RCAAgent].
func (*RCAAgentWebhook) ValidateUpdate ¶
func (w *RCAAgentWebhook) ValidateUpdate(_ context.Context, _, agent *rcav1alpha1.RCAAgent) (admission.Warnings, error)
ValidateUpdate implements admission.Validator[*rcav1alpha1.RCAAgent].
type RCACorrelationRuleWebhook ¶
type RCACorrelationRuleWebhook struct{}
RCACorrelationRuleWebhook implements typed validating webhook for RCACorrelationRule.
func (*RCACorrelationRuleWebhook) ValidateCreate ¶
func (w *RCACorrelationRuleWebhook) ValidateCreate(_ context.Context, rule *rcav1alpha1.RCACorrelationRule) (admission.Warnings, error)
ValidateCreate implements admission.Validator[*rcav1alpha1.RCACorrelationRule].
func (*RCACorrelationRuleWebhook) ValidateDelete ¶
func (w *RCACorrelationRuleWebhook) ValidateDelete(_ context.Context, _ *rcav1alpha1.RCACorrelationRule) (admission.Warnings, error)
ValidateDelete implements admission.Validator[*rcav1alpha1.RCACorrelationRule].
func (*RCACorrelationRuleWebhook) ValidateUpdate ¶
func (w *RCACorrelationRuleWebhook) ValidateUpdate(_ context.Context, _, rule *rcav1alpha1.RCACorrelationRule) (admission.Warnings, error)
ValidateUpdate implements admission.Validator[*rcav1alpha1.RCACorrelationRule].