Feat: Created a Network Container Status Section to be updated with the latest error code (#2193)
* Added Network Conatiner Status to include the latest error code for a Network Container * Updated the crd to have the Status field included into the Network Container * Updated the names and added Status and ErrorText as two fields in NC Status * Fixed the casing and json values for these variables * Added error code to the NC Status and removed the latest prefix from the varibale names * Removed the timestamp variable from the NC Status * Moved the Status object inside the NC Status to be able to accurately define the status of each NC for the node * Changed to having an enum representing the NC Status which DNC-RC will update after inferring the error and CNS can use this field to propagate and NCRequest failures * Made the validation of the new enum optional to keep it backward compatible
This commit is contained in:
Родитель
a90a77e0fe
Коммит
210fe86a97
|
@ -58,6 +58,15 @@ const (
|
|||
Error Status = "Error"
|
||||
)
|
||||
|
||||
// NCStatus indicates the latest NC request status
|
||||
// +kubebuilder:validation:Enum=SubnetFull
|
||||
// +kubebuilder:validation:Optional
|
||||
type NCStatus string
|
||||
|
||||
const (
|
||||
NCStatusSubnetFull NCStatus = "SubnetFull"
|
||||
)
|
||||
|
||||
// NodeNetworkConfigStatus defines the observed state of NetworkConfig
|
||||
type NodeNetworkConfigStatus struct {
|
||||
// +kubebuilder:default=0
|
||||
|
@ -114,6 +123,7 @@ type NetworkContainer struct {
|
|||
ResourceGroupID string `json:"resourceGroupID,omitempty"`
|
||||
VNETID string `json:"vnetID,omitempty"`
|
||||
SubnetID string `json:"subnetID,omitempty"`
|
||||
Status NCStatus `json:"status,omitempty"`
|
||||
}
|
||||
|
||||
// IPAssignment groups an IP address and Name. Name is a UUID set by the the IP address assigner.
|
||||
|
|
|
@ -115,6 +115,11 @@ spec:
|
|||
type: string
|
||||
resourceGroupID:
|
||||
type: string
|
||||
status:
|
||||
description: NCStatus indicates the latest NC request status
|
||||
enum:
|
||||
- SubnetFull
|
||||
type: string
|
||||
subcriptionID:
|
||||
type: string
|
||||
subnetAddressSpace:
|
||||
|
|
Загрузка…
Ссылка в новой задаче