From d7dbdaaf867bedcfba12c4c309da8784d02510b4 Mon Sep 17 00:00:00 2001 From: David van der Spek Date: Fri, 14 Jul 2023 14:26:16 +0200 Subject: [PATCH] fix: yet more types Signed-off-by: David van der Spek --- api/observability/v1alpha1/tempo_limit_types.go | 6 ++---- api/observability/v1alpha1/zz_generated.deepcopy.go | 10 +--------- .../bases/observability.traceshield.io_tenants.yaml | 6 ++++++ 3 files changed, 9 insertions(+), 13 deletions(-) diff --git a/api/observability/v1alpha1/tempo_limit_types.go b/api/observability/v1alpha1/tempo_limit_types.go index 1785a8b..3138542 100644 --- a/api/observability/v1alpha1/tempo_limit_types.go +++ b/api/observability/v1alpha1/tempo_limit_types.go @@ -171,14 +171,12 @@ type PolicyMatch struct { } type MatchPolicyAttribute struct { - // +kubebuilder:validation:Optional - Key *string `yaml:"key,omitempty" json:"key,omitempty"` + Key string `yaml:"key" json:"key"` - // +kubebuilder:validation:Optional // +kubebuilder:pruning:PreserveUnknownFields // +kubebuilder:validation:Schemaless // +kubebuilder:validation:Type=object - Value *WrappedMap `yaml:"value,omitempty" json:"value,omitempty"` + Value WrappedMap `yaml:"value" json:"value"` } type WrappedMap struct { diff --git a/api/observability/v1alpha1/zz_generated.deepcopy.go b/api/observability/v1alpha1/zz_generated.deepcopy.go index 104fb1a..42f05bd 100644 --- a/api/observability/v1alpha1/zz_generated.deepcopy.go +++ b/api/observability/v1alpha1/zz_generated.deepcopy.go @@ -1048,15 +1048,7 @@ func (in *LokiSpec) DeepCopy() *LokiSpec { // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *MatchPolicyAttribute) DeepCopyInto(out *MatchPolicyAttribute) { *out = *in - if in.Key != nil { - in, out := &in.Key, &out.Key - *out = new(string) - **out = **in - } - if in.Value != nil { - in, out := &in.Value, &out.Value - *out = (*in).DeepCopy() - } + in.Value.DeepCopyInto(&out.Value) } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MatchPolicyAttribute. diff --git a/config/crd/bases/observability.traceshield.io_tenants.yaml b/config/crd/bases/observability.traceshield.io_tenants.yaml index 216961c..cd8627d 100644 --- a/config/crd/bases/observability.traceshield.io_tenants.yaml +++ b/config/crd/bases/observability.traceshield.io_tenants.yaml @@ -1091,6 +1091,9 @@ spec: value: type: object x-kubernetes-preserve-unknown-fields: true + required: + - key + - value type: object type: array match_type: @@ -1109,6 +1112,9 @@ spec: value: type: object x-kubernetes-preserve-unknown-fields: true + required: + - key + - value type: object type: array match_type: