Skip to content

Commit a6974e0

Browse files
author
Ashish Nair
committed
upadte: Fixing the type for the Availability zone for the NNC to uint type
1 parent 8671c34 commit a6974e0

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

cns/service/main.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1306,8 +1306,8 @@ func InitializeCRDState(ctx context.Context, httpRestService cns.HTTPService, cn
13061306
// Create the base NNC CRD if HomeAz is enabled
13071307
if cnsconfig.EnableHomeAz {
13081308
homeAzResponse := httpRestServiceImplementation.GetHomeAz(ctx)
1309-
az := int64(homeAzResponse.HomeAzResponse.HomeAz)
1310-
logger.Printf("[Azure CNS] HomeAz: %s", strconv.FormatInt(az, 10))
1309+
az := homeAzResponse.HomeAzResponse.HomeAz
1310+
logger.Printf("[Azure CNS] HomeAz: %d", az)
13111311
// Create Node Network Config CRD and update the Home Az field with the cache value from the HomeAz Monitor
13121312
var nnc *v1alpha.NodeNetworkConfig
13131313
if nnc, err = directnnccli.Get(ctx, types.NamespacedName{Namespace: "kube-system", Name: nodeName}); err != nil {

crd/nodenetworkconfig/api/v1alpha/nodenetworkconfig.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ type NodeNetworkConfigSpec struct {
5050
// AvailabilityZone contains the Azure availability zone for the virtual machine where network containers are placed.
5151
// NMA returns an int value for the availability zone.
5252
// +kubebuilder:validation:Optional
53-
AvailabilityZone int64 `json:"availabilityZone,omitempty"`
53+
AvailabilityZone uint `json:"availabilityZone,omitempty"`
5454
}
5555

5656
// Status indicates the NNC reconcile status

0 commit comments

Comments
 (0)