@@ -61,6 +61,23 @@ const (
6161 Failed InfinibandStatus = "Failed"
6262)
6363
64+ // MTPNCStatus indicates the high-level status of MultitenantPodNetworkConfig
65+ // +kubebuilder:validation:Enum=Ready;InternalError;PodNotFound;PodFailed;NodeNameMissing;NodeUnreachable;PNINotFound;PNINotReady;CreateNCFailed;GetReservationSetFailed
66+ type MTPNCStatus string
67+
68+ const (
69+ MTPNCStatusReady MTPNCStatus = "Ready"
70+ MTPNCStatusInternalError MTPNCStatus = "InternalError"
71+ MTPNCStatusPodNotFound MTPNCStatus = "PodNotFound"
72+ MTPNCStatusPodFailed MTPNCStatus = "PodFailed"
73+ MTPNCStatusNodeNameMissing MTPNCStatus = "NodeNameMissing"
74+ MTPNCStatusNodeUnreachable MTPNCStatus = "NodeUnreachable"
75+ MTPNCStatusPNINotFound MTPNCStatus = "PNINotFound"
76+ MTPNCStatusPNINotReady MTPNCStatus = "PNINotReady"
77+ MTPNCStatusCreateNCFailed MTPNCStatus = "CreateNCFailed"
78+ MTPNCStatusGetReservationFailed MTPNCStatus = "GetReservationSetFailed"
79+ )
80+
6481type InterfaceInfo struct {
6582 // NCID is the network container id
6683 NCID string `json:"ncID,omitempty"`
@@ -105,6 +122,13 @@ type MultitenantPodNetworkConfigStatus struct {
105122 // DefaultDenyACL bool indicates whether default deny policy will be present on the pods upon pod creation
106123 // +kubebuilder:validation:Optional
107124 DefaultDenyACL bool `json:"defaultDenyACL"`
125+ // Status represents the overall status of the MTPNC
126+ // +kubebuilder:validation:Optional
127+ Status MTPNCStatus `json:"status,omitempty"`
128+ // LastTransitionTime is the time when this error status last changed.
129+ // If the current reconcile results in same MTPNCStatus, LastTransitionTime remains unchanged.
130+ // +kubebuilder:validation:Optional
131+ LastTransitionTime metav1.Time `json:"lastTransitionTime,omitempty"`
108132}
109133
110134func init () {
0 commit comments