Skip to content

Commit 739c1a2

Browse files
authored
add mode to nnc (#1309)
Signed-off-by: Evan Baker <[email protected]>
1 parent 77dfdcf commit 739c1a2

File tree

2 files changed

+21
-3
lines changed

2 files changed

+21
-3
lines changed

crd/nodenetworkconfig/api/v1alpha/nodenetworkconfig.go

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,20 @@ type NodeNetworkConfigSpec struct {
4545
IPsNotInUse []string `json:"ipsNotInUse,omitempty"`
4646
}
4747

48+
// Mode is the type of Pod Subnet we are operating in
49+
// +kubebuilder:validation:Enum=swift;overlay
50+
type Mode string
51+
52+
const (
53+
Overlay Mode = "overlay"
54+
Swift Mode = "swift"
55+
)
56+
4857
// NodeNetworkConfigStatus defines the observed state of NetworkConfig
4958
type NodeNetworkConfigStatus struct {
50-
AssignedIPCount int `json:"assignedIPCount,omitempty"`
59+
AssignedIPCount int `json:"assignedIPCount,omitempty"`
60+
// +kubebuilder:default=swift
61+
Mode Mode `json:"mode,omitempty"`
5162
Scaler Scaler `json:"scaler,omitempty"`
5263
Status Status `json:"status,omitempty"`
5364
NetworkContainers []NetworkContainer `json:"networkContainers,omitempty"`
@@ -62,7 +73,7 @@ type Scaler struct {
6273
}
6374

6475
// Status indicates the NNC reconcile status
65-
// +kubebuilder:validation:Enum=Updating;Update;Error
76+
// +kubebuilder:validation:Enum=Updating;Updated;Error
6677
type Status string
6778

6879
const (

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

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,13 @@ spec:
7373
properties:
7474
assignedIPCount:
7575
type: integer
76+
mode:
77+
default: swift
78+
description: Mode is the type of Pod Subnet we are operating in
79+
enum:
80+
- swift
81+
- overlay
82+
type: string
7683
networkContainers:
7784
items:
7885
description: NetworkContainer defines the structure of a Network
@@ -134,7 +141,7 @@ spec:
134141
description: Status indicates the NNC reconcile status
135142
enum:
136143
- Updating
137-
- Update
144+
- Updated
138145
- Error
139146
type: string
140147
type: object

0 commit comments

Comments
 (0)