diff --git a/crd/nodenetworkconfig/api/v1alpha/nodenetworkconfig.go b/crd/nodenetworkconfig/api/v1alpha/nodenetworkconfig.go index 02add068c0..91691d6548 100644 --- a/crd/nodenetworkconfig/api/v1alpha/nodenetworkconfig.go +++ b/crd/nodenetworkconfig/api/v1alpha/nodenetworkconfig.go @@ -16,6 +16,7 @@ import ( // +kubebuilder:resource:shortName=nnc // +kubebuilder:subresource:status // +kubebuilder:printcolumn:name="Requested IPs",type=integer,priority=1,JSONPath=`.spec.requestedIPCount` +// +kubebuilder:printcolumn:name="Availability Zone",type=string,priority=1,JSONPath=`.spec.availabilityZone` // +kubebuilder:printcolumn:name="Allocated IPs",type=integer,priority=0,JSONPath=`.status.assignedIPCount` // +kubebuilder:printcolumn:name="Subnet",type=string,priority=1,JSONPath=`.status.networkContainers[*].subnetName` // +kubebuilder:printcolumn:name="Subnet CIDR",type=string,priority=1,JSONPath=`.status.networkContainers[*].subnetAddressSpace` @@ -46,6 +47,9 @@ type NodeNetworkConfigSpec struct { // +kubebuilder:validation:Optional RequestedIPCount int64 `json:"requestedIPCount"` 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"` } // 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 f559351ff6..9368964675 100644 --- a/crd/nodenetworkconfig/manifests/acn.azure.com_nodenetworkconfigs.yaml +++ b/crd/nodenetworkconfig/manifests/acn.azure.com_nodenetworkconfigs.yaml @@ -21,6 +21,10 @@ spec: name: Requested IPs priority: 1 type: integer + - jsonPath: .spec.availabilityZone + name: Availability Zone + priority: 1 + type: string - jsonPath: .status.assignedIPCount name: Allocated IPs type: integer @@ -71,6 +75,10 @@ spec: spec: description: NodeNetworkConfigSpec defines the desired state of NetworkConfig properties: + availabilityZone: + description: AvailabilityZone contains the Azure availability zone + for the virtual machine where network containers are placed. + type: string ipsNotInUse: items: type: string