Skip to content

Commit 19156a7

Browse files
Adding availability zone to nnc spec (#3092)
* adding availability zone to nnc spec * adding optional kubebuilder annotation
1 parent 423a1c7 commit 19156a7

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

crd/nodenetworkconfig/api/v1alpha/nodenetworkconfig.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ import (
1616
// +kubebuilder:resource:shortName=nnc
1717
// +kubebuilder:subresource:status
1818
// +kubebuilder:printcolumn:name="Requested IPs",type=integer,priority=1,JSONPath=`.spec.requestedIPCount`
19+
// +kubebuilder:printcolumn:name="Availability Zone",type=string,priority=1,JSONPath=`.spec.availabilityZone`
1920
// +kubebuilder:printcolumn:name="Allocated IPs",type=integer,priority=0,JSONPath=`.status.assignedIPCount`
2021
// +kubebuilder:printcolumn:name="Subnet",type=string,priority=1,JSONPath=`.status.networkContainers[*].subnetName`
2122
// +kubebuilder:printcolumn:name="Subnet CIDR",type=string,priority=1,JSONPath=`.status.networkContainers[*].subnetAddressSpace`
@@ -46,6 +47,9 @@ type NodeNetworkConfigSpec struct {
4647
// +kubebuilder:validation:Optional
4748
RequestedIPCount int64 `json:"requestedIPCount"`
4849
IPsNotInUse []string `json:"ipsNotInUse,omitempty"`
50+
// AvailabilityZone contains the Azure availability zone for the virtual machine where network containers are placed.
51+
// +kubebuilder:validation:Optional
52+
AvailabilityZone string `json:"availabilityZone,omitempty"`
4953
}
5054

5155
// Status indicates the NNC reconcile status

crd/nodenetworkconfig/manifests/acn.azure.com_nodenetworkconfigs.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,10 @@ spec:
2121
name: Requested IPs
2222
priority: 1
2323
type: integer
24+
- jsonPath: .spec.availabilityZone
25+
name: Availability Zone
26+
priority: 1
27+
type: string
2428
- jsonPath: .status.assignedIPCount
2529
name: Allocated IPs
2630
type: integer
@@ -71,6 +75,10 @@ spec:
7175
spec:
7276
description: NodeNetworkConfigSpec defines the desired state of NetworkConfig
7377
properties:
78+
availabilityZone:
79+
description: AvailabilityZone contains the Azure availability zone
80+
for the virtual machine where network containers are placed.
81+
type: string
7482
ipsNotInUse:
7583
items:
7684
type: string

0 commit comments

Comments
 (0)