Skip to content
Merged
Show file tree
Hide file tree
Changes from 5 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
16 changes: 16 additions & 0 deletions crd/multitenancy/api/v1alpha1/multitenantpodnetworkconfig.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,19 @@ const (
Failed InfinibandStatus = "Failed"
)

// MTPNCStatus indicates the high-level status of MultitenantPodNetworkConfig
// +kubebuilder:validation:Enum=Ready;Pending;InternalError;NodeCapacityExceeded;SubnetExhaustionError;NodeLinkedToAnotherMTPNC
type MTPNCStatus string

const (
MTPNCStatusReady MTPNCStatus = "Ready"
MTPNCStatusPending MTPNCStatus = "Pending"
MTPNCStatusInternalError MTPNCStatus = "InternalError"
MTPNCStatusNodeCapacityExceeded MTPNCStatus = "NodeCapacityExceeded"
MTPNCStatusSubnetExhaustionError MTPNCStatus = "SubnetExhaustionError"
MTPNCStatusNodeLinkedToAnotherMTPNC MTPNCStatus = "NodeLinkedToAnotherMTPNC"
)

type InterfaceInfo struct {
// NCID is the network container id
NCID string `json:"ncID,omitempty"`
Expand Down Expand Up @@ -105,6 +118,9 @@ type MultitenantPodNetworkConfigStatus struct {
// DefaultDenyACL bool indicates whether default deny policy will be present on the pods upon pod creation
// +kubebuilder:validation:Optional
DefaultDenyACL bool `json:"defaultDenyACL"`
// Status represents the overall status of the MTPNC
// +kubebuilder:validation:Optional
Status MTPNCStatus `json:"status,omitempty"`
}

func init() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,16 @@ spec:
primaryIP:
description: Deprecated - use InterfaceInfos
type: string
status:
description: Status represents the overall status of the MTPNC
enum:
- Ready
- Pending
- InternalError
- NodeCapacityExceeded
- SubnetExhaustionError
- NodeLinkedToAnotherMTPNC
type: string
type: object
type: object
served: true
Expand Down
Loading