Add status conditions to namespaces
This commit is contained in:
@@ -4006,6 +4006,8 @@ type NamespaceStatus struct {
|
||||
// Phase is the current lifecycle phase of the namespace.
|
||||
// +optional
|
||||
Phase NamespacePhase
|
||||
// +optional
|
||||
Conditions []NamespaceCondition
|
||||
}
|
||||
|
||||
type NamespacePhase string
|
||||
@@ -4018,6 +4020,30 @@ const (
|
||||
NamespaceTerminating NamespacePhase = "Terminating"
|
||||
)
|
||||
|
||||
// NamespaceConditionType defines constants reporting on status during namespace lifetime and deletion progress
|
||||
type NamespaceConditionType string
|
||||
|
||||
// These are valid conditions of a namespace.
|
||||
const (
|
||||
NamespaceDeletionDiscoveryFailure NamespaceConditionType = "NamespaceDeletionDiscoveryFailure"
|
||||
NamespaceDeletionContentFailure NamespaceConditionType = "NamespaceDeletionContentFailure"
|
||||
NamespaceDeletionGVParsingFailure NamespaceConditionType = "NamespaceDeletionGroupVersionParsingFailure"
|
||||
)
|
||||
|
||||
// NamespaceCondition contains details about state of namespace.
|
||||
type NamespaceCondition struct {
|
||||
// Type of namespace controller condition.
|
||||
Type NamespaceConditionType
|
||||
// Status of the condition, one of True, False, Unknown.
|
||||
Status ConditionStatus
|
||||
// +optional
|
||||
LastTransitionTime metav1.Time
|
||||
// +optional
|
||||
Reason string
|
||||
// +optional
|
||||
Message string
|
||||
}
|
||||
|
||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
||||
|
||||
// A namespace provides a scope for Names.
|
||||
|
Reference in New Issue
Block a user