From 14c8d9180d10fa30cd502efa7702198a66a2a568 Mon Sep 17 00:00:00 2001 From: Ashish Nair Date: Tue, 7 Jan 2025 11:21:53 -0800 Subject: [PATCH 1/3] fix: Updating the AvailabilityZone field in the NNC to be a int value as the return from NMA is an int value --- crd/nodenetworkconfig/api/v1alpha/nodenetworkconfig.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crd/nodenetworkconfig/api/v1alpha/nodenetworkconfig.go b/crd/nodenetworkconfig/api/v1alpha/nodenetworkconfig.go index 91691d6548..3e63f09131 100644 --- a/crd/nodenetworkconfig/api/v1alpha/nodenetworkconfig.go +++ b/crd/nodenetworkconfig/api/v1alpha/nodenetworkconfig.go @@ -49,7 +49,7 @@ type NodeNetworkConfigSpec struct { IPsNotInUse []string `json:"ipsNotInUse,omitempty"` // AvailabilityZone contains the Azure availability zone for the virtual machine where network containers are placed. // +kubebuilder:validation:Optional - AvailabilityZone string `json:"availabilityZone,omitempty"` + AvailabilityZone int64 `json:"availabilityZone,omitempty"` } // Status indicates the NNC reconcile status From bfb7ee0023b3638bcc10fa35ecfb4c1e28becdf1 Mon Sep 17 00:00:00 2001 From: Ashish Nair Date: Tue, 7 Jan 2025 13:50:44 -0800 Subject: [PATCH 2/3] fix: Updated the maifest as well --- .../manifests/acn.azure.com_nodenetworkconfigs.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/crd/nodenetworkconfig/manifests/acn.azure.com_nodenetworkconfigs.yaml b/crd/nodenetworkconfig/manifests/acn.azure.com_nodenetworkconfigs.yaml index 9368964675..d4afb8ce8b 100644 --- a/crd/nodenetworkconfig/manifests/acn.azure.com_nodenetworkconfigs.yaml +++ b/crd/nodenetworkconfig/manifests/acn.azure.com_nodenetworkconfigs.yaml @@ -78,7 +78,8 @@ spec: availabilityZone: description: AvailabilityZone contains the Azure availability zone for the virtual machine where network containers are placed. - type: string + format: int64 + type: integer ipsNotInUse: items: type: string From 1b7885c45615b53de157bd791286af5e95713ceb Mon Sep 17 00:00:00 2001 From: Ashish Nair Date: Tue, 7 Jan 2025 13:56:45 -0800 Subject: [PATCH 3/3] Keeping the version as uint to avoid casting it multiple times and DNC has NCGoalstate as uint --- crd/nodenetworkconfig/api/v1alpha/nodenetworkconfig.go | 2 +- .../manifests/acn.azure.com_nodenetworkconfigs.yaml | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/crd/nodenetworkconfig/api/v1alpha/nodenetworkconfig.go b/crd/nodenetworkconfig/api/v1alpha/nodenetworkconfig.go index 3e63f09131..1137b28e96 100644 --- a/crd/nodenetworkconfig/api/v1alpha/nodenetworkconfig.go +++ b/crd/nodenetworkconfig/api/v1alpha/nodenetworkconfig.go @@ -49,7 +49,7 @@ type NodeNetworkConfigSpec struct { IPsNotInUse []string `json:"ipsNotInUse,omitempty"` // AvailabilityZone contains the Azure availability zone for the virtual machine where network containers are placed. // +kubebuilder:validation:Optional - AvailabilityZone int64 `json:"availabilityZone,omitempty"` + AvailabilityZone uint `json:"availabilityZone,omitempty"` } // Status indicates the NNC reconcile status diff --git a/crd/nodenetworkconfig/manifests/acn.azure.com_nodenetworkconfigs.yaml b/crd/nodenetworkconfig/manifests/acn.azure.com_nodenetworkconfigs.yaml index d4afb8ce8b..1410a85e2a 100644 --- a/crd/nodenetworkconfig/manifests/acn.azure.com_nodenetworkconfigs.yaml +++ b/crd/nodenetworkconfig/manifests/acn.azure.com_nodenetworkconfigs.yaml @@ -78,7 +78,6 @@ spec: availabilityZone: description: AvailabilityZone contains the Azure availability zone for the virtual machine where network containers are placed. - format: int64 type: integer ipsNotInUse: items: