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

// MTPNCStatus indicates the high-level status of MultitenantPodNetworkConfig
// +kubebuilder:validation:Enum=Ready;InternalError;PodNotFound;PodFailed;NodeNameMissing;NodeUnreachable;PNINotFound;PNINotReady;CreateNCFailed;GetReservationSetFailed
type MTPNCStatus string

const (
MTPNCStatusReady MTPNCStatus = "Ready"
MTPNCStatusInternalError MTPNCStatus = "InternalError"
MTPNCStatusPodNotFound MTPNCStatus = "PodNotFound"
MTPNCStatusPodFailed MTPNCStatus = "PodFailed"
MTPNCStatusNodeNameMissing MTPNCStatus = "NodeNameMissing"
MTPNCStatusNodeUnreachable MTPNCStatus = "NodeUnreachable"
MTPNCStatusPNINotFound MTPNCStatus = "PNINotFound"
MTPNCStatusPNINotReady MTPNCStatus = "PNINotReady"
MTPNCStatusCreateNCFailed MTPNCStatus = "CreateNCFailed"
MTPNCStatusGetReservationFailed MTPNCStatus = "GetReservationSetFailed"
)

type InterfaceInfo struct {
// NCID is the network container id
NCID string `json:"ncID,omitempty"`
Expand Down Expand Up @@ -105,6 +122,13 @@ 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"`
// LastTransitionTime is the time when this error status last changed.
// If the current reconcile results in same MTPNCStatus, LastTransitionTime remains unchanged.
// +kubebuilder:validation:Optional
LastTransitionTime metav1.Time `json:"lastTransitionTime,omitempty"`
}

func init() {
Expand Down
Loading