Skip to content

Commit

Permalink
Merge pull request #95 from Disper/rotation_regression
Browse files Browse the repository at this point in the history
fixes rotation regression
  • Loading branch information
kyma-bot authored Dec 11, 2023
2 parents ad7688f + 0993fd6 commit 26c38ea
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions internal/controller/gardener_cluster_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -120,9 +120,8 @@ func (controller *GardenerClusterController) Reconcile(ctx context.Context, req
}
}

if kubeconfigStatus == ksCreated || kubeconfigStatus == ksModified {
_ = controller.persistStatusChange(ctx, &cluster)
return controller.resultWithoutRequeue(&cluster), nil
if err := controller.persistStatusChange(ctx, &cluster); err != nil {
return controller.resultWithoutRequeue(&cluster), err
}

return controller.resultWithRequeue(&cluster), nil
Expand Down Expand Up @@ -245,6 +244,7 @@ func (controller *GardenerClusterController) handleKubeconfig(ctx context.Contex
if !secretNeedsToBeRotated(cluster, existingSecret, controller.rotationPeriod) {
message := fmt.Sprintf("Secret %s in namespace %s does not need to be rotated yet.", cluster.Spec.Kubeconfig.Secret.Name, cluster.Spec.Kubeconfig.Secret.Namespace)
controller.log.Info(message, loggingContextFromCluster(cluster)...)
cluster.UpdateConditionForReadyState(imv1.ConditionTypeKubeconfigManagement, imv1.ConditionReasonKubeconfigSecretCreated, metav1.ConditionTrue)
return ksZero, nil
}

Expand Down

0 comments on commit 26c38ea

Please sign in to comment.