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 74c1a99 commit bfb1d5b
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 @@ -115,7 +115,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 bfb1d5b

Please sign in to comment.