From 2e12043918ac0d68b49c94ca8edcf13a6dcf08cd Mon Sep 17 00:00:00 2001 From: m00g3n Date: Tue, 14 Nov 2023 11:48:21 +0100 Subject: [PATCH] refactor kubeconfig status --- internal/controller/gardener_cluster_controller.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/internal/controller/gardener_cluster_controller.go b/internal/controller/gardener_cluster_controller.go index 8476fea2..de902ca9 100644 --- a/internal/controller/gardener_cluster_controller.go +++ b/internal/controller/gardener_cluster_controller.go @@ -104,7 +104,7 @@ func (controller *GardenerClusterController) Reconcile(ctx context.Context, req } // there was a request to rotate the kubeconfig - if kubeconfigStatus == ksRevoked { + if kubeconfigStatus == ksRotated { err = controller.removeForceRotationAnnotation(ctx, &cluster) if err != nil { return controller.resultWithoutRequeue(), err @@ -211,7 +211,7 @@ const ( ksZero kubeconfigStatus = iota ksCreated ksModified - ksRevoked + ksRotated ) func (controller *GardenerClusterController) handleKubeconfig(ctx context.Context, cluster *imv1.GardenerCluster, lastSyncTime time.Time) (kubeconfigStatus, error) { @@ -237,7 +237,7 @@ func (controller *GardenerClusterController) handleKubeconfig(ctx context.Contex return ksZero, err } - return ksRevoked, nil + return ksRotated, nil } if !secretNeedsToBeRotated(cluster, existingSecret, controller.rotationPeriod) {