Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 13 additions & 2 deletions crd/nodenetworkconfig/api/v1alpha/nodenetworkconfig.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,20 @@ type NodeNetworkConfigSpec struct {
IPsNotInUse []string `json:"ipsNotInUse,omitempty"`
}

// Mode is the type of Pod Subnet we are operating in
// +kubebuilder:validation:Enum=swift;overlay
type Mode string

const (
Overlay Mode = "overlay"
Swift Mode = "swift"
)

// NodeNetworkConfigStatus defines the observed state of NetworkConfig
type NodeNetworkConfigStatus struct {
AssignedIPCount int `json:"assignedIPCount,omitempty"`
AssignedIPCount int `json:"assignedIPCount,omitempty"`
// +kubebuilder:default=swift
Mode Mode `json:"mode,omitempty"`
Scaler Scaler `json:"scaler,omitempty"`
Status Status `json:"status,omitempty"`
NetworkContainers []NetworkContainer `json:"networkContainers,omitempty"`
Expand All @@ -62,7 +73,7 @@ type Scaler struct {
}

// Status indicates the NNC reconcile status
// +kubebuilder:validation:Enum=Updating;Update;Error
// +kubebuilder:validation:Enum=Updating;Updated;Error
type Status string

const (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,13 @@ spec:
properties:
assignedIPCount:
type: integer
mode:
default: swift
description: Mode is the type of Pod Subnet we are operating in
enum:
- swift
- overlay
type: string
networkContainers:
items:
description: NetworkContainer defines the structure of a Network
Expand Down Expand Up @@ -134,7 +141,7 @@ spec:
description: Status indicates the NNC reconcile status
enum:
- Updating
- Update
- Updated
- Error
type: string
type: object
Expand Down