From b780cd78cd7a25893af66081747e48bc6e3f2a7b Mon Sep 17 00:00:00 2001 From: Arkadiusz Galwas Date: Tue, 24 Oct 2023 13:26:34 +0200 Subject: [PATCH] Setting status message fixed --- api/v1/gardenercluster_types.go | 9 +++++++++ cmd/main.go | 1 - 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/api/v1/gardenercluster_types.go b/api/v1/gardenercluster_types.go index 3bacd7d5..8bb14034 100644 --- a/api/v1/gardenercluster_types.go +++ b/api/v1/gardenercluster_types.go @@ -136,8 +136,17 @@ func getMessage(reason ConditionReason) string { switch reason { case ConditionReasonKubeconfigSecretCreated: return "Secret created successfully." + case ConditionReasonKubeconfigSecretRotated: + return "Secret rotated successfully." + case ConditionReasonFailedToCreateSecret: + return "Failed to create secret." + case ConditionReasonFailedToUpdateSecret: + return "Failed to rotate secret." case ConditionReasonFailedToGetSecret: return "Failed to get secret." + case ConditionReasonFailedToGetKubeconfig: + return "Failed to get kubeconfig." + default: return "Unknown condition" } diff --git a/cmd/main.go b/cmd/main.go index 07c3588e..9fd21517 100644 --- a/cmd/main.go +++ b/cmd/main.go @@ -134,7 +134,6 @@ func main() { setupLog.Info("Starting Manager", "kubeconfigExpirationTime", expirationTime, "kubeconfigRotationPeriod", rotationPeriod) - setupLog.Info("starting manager") if err := mgr.Start(ctrl.SetupSignalHandler()); err != nil { setupLog.Error(err, "problem running manager") os.Exit(1)