From 6bdd904ec44ff30c48d50aa470408536f8636703 Mon Sep 17 00:00:00 2001 From: mgianluc Date: Mon, 5 Aug 2024 13:44:12 +0200 Subject: [PATCH] Add constants for ConnectionStatus --- api/v1alpha1/sveltoscluster_type.go | 8 ++++++++ api/v1beta1/sveltoscluster_type.go | 8 ++++++++ 2 files changed, 16 insertions(+) diff --git a/api/v1alpha1/sveltoscluster_type.go b/api/v1alpha1/sveltoscluster_type.go index 0fdf3f6..c93154b 100644 --- a/api/v1alpha1/sveltoscluster_type.go +++ b/api/v1alpha1/sveltoscluster_type.go @@ -40,6 +40,14 @@ type ActiveWindow struct { // +kubebuilder:validation:Enum:=Healthy;Down type ConnectionStatus string +const ( + // ConnectionHealthy indicates connection from management cluster to managed cluster is healthy + ConnectionHealthy = ConnectionStatus("Healthy") + + // ConnectionDown indicates connection from management cluster to managed cluster is down + ConnectionDown = ConnectionStatus("Down") +) + type TokenRequestRenewalOption struct { // RenewTokenRequestInterval is the interval at which to renew the TokenRequest RenewTokenRequestInterval metav1.Duration `json:"renewTokenRequestInterval"` diff --git a/api/v1beta1/sveltoscluster_type.go b/api/v1beta1/sveltoscluster_type.go index 888033e..706ff4a 100644 --- a/api/v1beta1/sveltoscluster_type.go +++ b/api/v1beta1/sveltoscluster_type.go @@ -40,6 +40,14 @@ type ActiveWindow struct { // +kubebuilder:validation:Enum:=Healthy;Down type ConnectionStatus string +const ( + // ConnectionHealthy indicates connection from management cluster to managed cluster is healthy + ConnectionHealthy = ConnectionStatus("Healthy") + + // ConnectionDown indicates connection from management cluster to managed cluster is down + ConnectionDown = ConnectionStatus("Down") +) + type TokenRequestRenewalOption struct { // RenewTokenRequestInterval is the interval at which to renew the TokenRequest RenewTokenRequestInterval metav1.Duration `json:"renewTokenRequestInterval"`