Skip to content

Commit

Permalink
feat(clusters) RenewRemoteClusterBearerTokenAfter to current value in…
Browse files Browse the repository at this point in the history
… reconciler
  • Loading branch information
gciezkowski-acc committed Oct 28, 2024
1 parent cf6fa10 commit 67c2565
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/controllers/cluster/cluster_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ func (r *RemoteClusterReconciler) EnsureCreated(ctx context.Context, resource li
var tokenRequest = &tokenHelper{
Client: r.Client,
RemoteClusterBearerTokenValidity: time.Duration(cluster.Spec.KubeConfig.MaxTokenValidity) * time.Hour,
RenewRemoteClusterBearerTokenAfter: (time.Duration(cluster.Spec.KubeConfig.MaxTokenValidity) * time.Hour) - (24 * time.Hour),
RenewRemoteClusterBearerTokenAfter: r.RenewRemoteClusterBearerTokenAfter,
}
if err := tokenRequest.ReconcileServiceAccountToken(ctx, restClientGetter, cluster); err != nil {
return ctrl.Result{}, lifecycle.Failed, err
Expand Down

0 comments on commit 67c2565

Please sign in to comment.