From 4b93cc2655619b74c1898b54e71d13f6f74b95d6 Mon Sep 17 00:00:00 2001 From: Mickael Stanislas Date: Mon, 7 Oct 2024 15:48:35 +0200 Subject: [PATCH] fix: unused field in alertConfig discord --- api/v1alpha1/alert_config_types.go | 11 +---------- api/v1alpha1/zz_generated.deepcopy.go | 5 ----- .../crd/bases/kimup.cloudavenue.io_alertconfig.yaml | 8 +------- 3 files changed, 2 insertions(+), 22 deletions(-) diff --git a/api/v1alpha1/alert_config_types.go b/api/v1alpha1/alert_config_types.go index 1ed39ca..fbecbe8 100644 --- a/api/v1alpha1/alert_config_types.go +++ b/api/v1alpha1/alert_config_types.go @@ -15,15 +15,6 @@ type ( // +kubebuilder:validation:Required WebhookURL ValueOrValueFrom `json:"webhookURL"` - // +kubebuilder:validation:Optional - // +kubebuilder:description:List of users or roles to notify. - Mentions []string `json:"mentions,omitempty"` - - // +kubebuilder:validation:Optional - // +kubebuilder:description:Timeout specifies a time limit for the request to be made. - // +kubebuilder:default:10s - Timeout string `json:"timeout,omitempty"` - // +kubebuilder:validation:Optional // +kubebuilder:validation:Schemaless // +kubebuilder:validation:Type=string @@ -36,7 +27,7 @@ type ( // +kubebuilder:object:root=true // +kubebuilder:subresource:status -// +kubebuilder:resource:path=alertconfig,scope=Cluster +// +kubebuilder:resource:path=alertconfig,scope=Namespaced type AlertConfig struct { metav1.TypeMeta `json:",inline"` diff --git a/api/v1alpha1/zz_generated.deepcopy.go b/api/v1alpha1/zz_generated.deepcopy.go index aa98d34..087a7c9 100644 --- a/api/v1alpha1/zz_generated.deepcopy.go +++ b/api/v1alpha1/zz_generated.deepcopy.go @@ -153,11 +153,6 @@ func (in *AlertCoreStatus) DeepCopy() *AlertCoreStatus { func (in *AlertDiscordSpec) DeepCopyInto(out *AlertDiscordSpec) { *out = *in in.WebhookURL.DeepCopyInto(&out.WebhookURL) - if in.Mentions != nil { - in, out := &in.Mentions, &out.Mentions - *out = make([]string, len(*in)) - copy(*out, *in) - } } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AlertDiscordSpec. diff --git a/config/crd/bases/kimup.cloudavenue.io_alertconfig.yaml b/config/crd/bases/kimup.cloudavenue.io_alertconfig.yaml index cb5e676..f71b8af 100644 --- a/config/crd/bases/kimup.cloudavenue.io_alertconfig.yaml +++ b/config/crd/bases/kimup.cloudavenue.io_alertconfig.yaml @@ -12,7 +12,7 @@ spec: listKind: AlertConfigList plural: alertconfig singular: alertconfig - scope: Cluster + scope: Namespaced versions: - name: v1alpha1 schema: @@ -40,14 +40,8 @@ spec: discord: description: AlertDiscordSpec defines the desired state of AlertDiscord properties: - mentions: - items: - type: string - type: array templateBody: type: string - timeout: - type: string webhookURL: properties: value: