Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor kubeconfig status #64

Merged
merged 1 commit into from
Nov 14, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions internal/controller/gardener_cluster_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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) {
Expand All @@ -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) {
Expand Down
Loading