Skip to content

Commit

Permalink
Add enum annotations
Browse files Browse the repository at this point in the history
Signed-off-by: Tamal Saha <[email protected]>
  • Loading branch information
tamalsaha committed Oct 9, 2023
1 parent 70d9638 commit f90c55e
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions apis/meta/v1alpha1/clusterstatus_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ type ClusterStatusResponse struct {
ClusterAPI *kmapi.CAPIClusterInfo `json:"clusterAPI,omitempty"`
}

// +kubebuilder:validation:Enum=Active;Inactive;NotReady;NotConnected;Registered;NotImported
type ClusterPhase string

const (
Expand All @@ -68,11 +69,12 @@ const (
ClusterPhaseNotImported ClusterPhase = "NotImported"
)

// +kubebuilder:validation:Enum=Unknown;ClusterNotFound;AuthIssue;MissingComponent
type ClusterPhaseReason string

const (
ClusterNotFound ClusterPhaseReason = "ClusterNotFound"
AuthIssue ClusterPhaseReason = "AuthIssue"
MissingComponent ClusterPhaseReason = "MissingComponent"
ReasonUnknown ClusterPhaseReason = "Unknown"
ClusterPhaseReasonReasonUnknown ClusterPhaseReason = "Unknown"
ClusterPhaseReasonClusterNotFound ClusterPhaseReason = "ClusterNotFound"
ClusterPhaseReasonAuthIssue ClusterPhaseReason = "AuthIssue"
ClusterPhaseReasonMissingComponent ClusterPhaseReason = "MissingComponent"
)

0 comments on commit f90c55e

Please sign in to comment.