Documentation
¶
Index ¶
- func SetupAgentCredentialWebhookWithManager(mgr manager.Manager) error
- func SetupGrafanaOrganizationWebhookWithManager(mgr manager.Manager) error
- func SetupLogExportWebhookWithManager(mgr manager.Manager) error
- type AgentCredentialValidator
- func (v *AgentCredentialValidator) ValidateCreate(ctx context.Context, obj *observabilityv1alpha1.AgentCredential) (admission.Warnings, error)
- func (v *AgentCredentialValidator) ValidateDelete(ctx context.Context, obj *observabilityv1alpha1.AgentCredential) (admission.Warnings, error)
- func (v *AgentCredentialValidator) ValidateUpdate(ctx context.Context, oldObj, newObj *observabilityv1alpha1.AgentCredential) (admission.Warnings, error)
- type GrafanaOrganizationValidator
- func (v *GrafanaOrganizationValidator) ValidateCreate(ctx context.Context, obj *observabilityv1alpha1.GrafanaOrganization) (admission.Warnings, error)
- func (v *GrafanaOrganizationValidator) ValidateDelete(ctx context.Context, obj *observabilityv1alpha1.GrafanaOrganization) (admission.Warnings, error)
- func (v *GrafanaOrganizationValidator) ValidateUpdate(ctx context.Context, oldObj, newObj *observabilityv1alpha1.GrafanaOrganization) (admission.Warnings, error)
- type LogExportValidator
- func (v *LogExportValidator) ValidateCreate(ctx context.Context, obj *observabilityv1alpha1.LogExport) (admission.Warnings, error)
- func (v *LogExportValidator) ValidateDelete(ctx context.Context, obj *observabilityv1alpha1.LogExport) (admission.Warnings, error)
- func (v *LogExportValidator) ValidateUpdate(ctx context.Context, oldObj, newObj *observabilityv1alpha1.LogExport) (admission.Warnings, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SetupAgentCredentialWebhookWithManager ¶ added in v0.68.0
SetupAgentCredentialWebhookWithManager registers the webhook for AgentCredential.
func SetupGrafanaOrganizationWebhookWithManager ¶
SetupGrafanaOrganizationWebhookWithManager registers the webhook for GrafanaOrganization in the manager.
func SetupLogExportWebhookWithManager ¶ added in v0.75.0
SetupLogExportWebhookWithManager registers the webhook for LogExport.
Types ¶
type AgentCredentialValidator ¶ added in v0.68.0
AgentCredentialValidator validates AgentCredential resources on create/update.
+kubebuilder:object:generate=false
func (*AgentCredentialValidator) ValidateCreate ¶ added in v0.68.0
func (v *AgentCredentialValidator) ValidateCreate(ctx context.Context, obj *observabilityv1alpha1.AgentCredential) (admission.Warnings, error)
ValidateCreate enforces business rules beyond what kubebuilder markers can express.
func (*AgentCredentialValidator) ValidateDelete ¶ added in v0.68.0
func (v *AgentCredentialValidator) ValidateDelete(ctx context.Context, obj *observabilityv1alpha1.AgentCredential) (admission.Warnings, error)
ValidateDelete is a no-op.
func (*AgentCredentialValidator) ValidateUpdate ¶ added in v0.68.0
func (v *AgentCredentialValidator) ValidateUpdate(ctx context.Context, oldObj, newObj *observabilityv1alpha1.AgentCredential) (admission.Warnings, error)
ValidateUpdate enforces immutability of spec fields and uniqueness.
type GrafanaOrganizationValidator ¶
type GrafanaOrganizationValidator struct{}
GrafanaOrganizationValidator struct is responsible for validating the GrafanaOrganization 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.
+kubebuilder:object:generate=false
func (*GrafanaOrganizationValidator) ValidateCreate ¶
func (v *GrafanaOrganizationValidator) ValidateCreate(ctx context.Context, obj *observabilityv1alpha1.GrafanaOrganization) (admission.Warnings, error)
ValidateCreate implements admission.Validator so a webhook will be registered for the type GrafanaOrganization.
func (*GrafanaOrganizationValidator) ValidateDelete ¶
func (v *GrafanaOrganizationValidator) ValidateDelete(ctx context.Context, obj *observabilityv1alpha1.GrafanaOrganization) (admission.Warnings, error)
ValidateDelete implements admission.Validator so a webhook will be registered for the type GrafanaOrganization.
func (*GrafanaOrganizationValidator) ValidateUpdate ¶
func (v *GrafanaOrganizationValidator) ValidateUpdate(ctx context.Context, oldObj, newObj *observabilityv1alpha1.GrafanaOrganization) (admission.Warnings, error)
ValidateUpdate implements admission.Validator so a webhook will be registered for the type GrafanaOrganization.
type LogExportValidator ¶ added in v0.75.0
type LogExportValidator struct{}
LogExportValidator validates LogExport resources on create/update.
Rejecting a bad selector here rather than at reconcile time is deliberate: the exporter is shared by the whole installation and exits on a bad config, so one customer's mistake would otherwise stop every export on it.
+kubebuilder:object:generate=false
func (*LogExportValidator) ValidateCreate ¶ added in v0.75.0
func (v *LogExportValidator) ValidateCreate(ctx context.Context, obj *observabilityv1alpha1.LogExport) (admission.Warnings, error)
ValidateCreate enforces business rules beyond what kubebuilder markers can express.
func (*LogExportValidator) ValidateDelete ¶ added in v0.75.0
func (v *LogExportValidator) ValidateDelete(ctx context.Context, obj *observabilityv1alpha1.LogExport) (admission.Warnings, error)
ValidateDelete is a no-op.
func (*LogExportValidator) ValidateUpdate ¶ added in v0.75.0
func (v *LogExportValidator) ValidateUpdate(ctx context.Context, oldObj, newObj *observabilityv1alpha1.LogExport) (admission.Warnings, error)
ValidateUpdate applies the same rules as create.