From 31ce1967f4d0360e069cec046e79266ff8d5f713 Mon Sep 17 00:00:00 2001 From: Fred Rolland Date: Mon, 20 Nov 2023 14:48:28 +0200 Subject: [PATCH] chore: Remove config from NVIPAM spec Signed-off-by: Fred Rolland --- api/v1alpha1/nicclusterpolicy_types.go | 4 ++-- api/v1alpha1/nicclusterpolicy_webhook_test.go | 12 +++++------- api/v1alpha1/zz_generated.deepcopy.go | 2 +- .../crd/bases/mellanox.com_nicclusterpolicies.yaml | 2 -- .../crds/mellanox.com_nicclusterpolicies.yaml | 2 -- 5 files changed, 8 insertions(+), 14 deletions(-) diff --git a/api/v1alpha1/nicclusterpolicy_types.go b/api/v1alpha1/nicclusterpolicy_types.go index 9cd126e61..f24be2760 100644 --- a/api/v1alpha1/nicclusterpolicy_types.go +++ b/api/v1alpha1/nicclusterpolicy_types.go @@ -211,8 +211,8 @@ type IBKubernetesSpec struct { type NVIPAMSpec struct { // Enable deployment of the validation webhook // +kubebuilder:default:=false - EnableWebhook bool `json:"enableWebhook,omitempty"` - ImageSpecWithConfig `json:""` + EnableWebhook bool `json:"enableWebhook,omitempty"` + ImageSpec `json:""` } // NicFeatureDiscoverySpec describes configuration options for nic-feature-discovery diff --git a/api/v1alpha1/nicclusterpolicy_webhook_test.go b/api/v1alpha1/nicclusterpolicy_webhook_test.go index 0861c7b0c..907c6f27c 100644 --- a/api/v1alpha1/nicclusterpolicy_webhook_test.go +++ b/api/v1alpha1/nicclusterpolicy_webhook_test.go @@ -405,13 +405,11 @@ var _ = Describe("Validate", func() { ObjectMeta: metav1.ObjectMeta{Name: "test"}, Spec: NicClusterPolicySpec{ NvIpam: &NVIPAMSpec{ - ImageSpecWithConfig: ImageSpecWithConfig{ - ImageSpec: ImageSpec{ - Image: "mofed", - Repository: "ghcr.io/mellanox!@!#$!", - Version: "23.10-0.2.2.0", - ImagePullSecrets: []string{}, - }, + ImageSpec: ImageSpec{ + Image: "mofed", + Repository: "ghcr.io/mellanox!@!#$!", + Version: "23.10-0.2.2.0", + ImagePullSecrets: []string{}, }, }, }, diff --git a/api/v1alpha1/zz_generated.deepcopy.go b/api/v1alpha1/zz_generated.deepcopy.go index f22338132..82f18d322 100644 --- a/api/v1alpha1/zz_generated.deepcopy.go +++ b/api/v1alpha1/zz_generated.deepcopy.go @@ -476,7 +476,7 @@ func (in *NICFeatureDiscoverySpec) DeepCopy() *NICFeatureDiscoverySpec { // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *NVIPAMSpec) DeepCopyInto(out *NVIPAMSpec) { *out = *in - in.ImageSpecWithConfig.DeepCopyInto(&out.ImageSpecWithConfig) + in.ImageSpec.DeepCopyInto(&out.ImageSpec) } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NVIPAMSpec. diff --git a/config/crd/bases/mellanox.com_nicclusterpolicies.yaml b/config/crd/bases/mellanox.com_nicclusterpolicies.yaml index 6e9afd6cd..7f335399d 100644 --- a/config/crd/bases/mellanox.com_nicclusterpolicies.yaml +++ b/config/crd/bases/mellanox.com_nicclusterpolicies.yaml @@ -301,8 +301,6 @@ spec: description: NVIPAMSpec describes configuration options for nv-ipam 1. Image information for nv-ipam 2. Configuration for nv-ipam properties: - config: - type: string enableWebhook: default: false description: Enable deployment of the validation webhook diff --git a/deployment/network-operator/crds/mellanox.com_nicclusterpolicies.yaml b/deployment/network-operator/crds/mellanox.com_nicclusterpolicies.yaml index 6e9afd6cd..7f335399d 100644 --- a/deployment/network-operator/crds/mellanox.com_nicclusterpolicies.yaml +++ b/deployment/network-operator/crds/mellanox.com_nicclusterpolicies.yaml @@ -301,8 +301,6 @@ spec: description: NVIPAMSpec describes configuration options for nv-ipam 1. Image information for nv-ipam 2. Configuration for nv-ipam properties: - config: - type: string enableWebhook: default: false description: Enable deployment of the validation webhook