Skip to content

Commit

Permalink
Reverting changes
Browse files Browse the repository at this point in the history
Signed-off-by: PrimalPimmy <Prashant20.pm@gmail.com>
  • Loading branch information
PrimalPimmy committed Jul 24, 2024
1 parent 4dd0f46 commit 430f6ae
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions controllers/pkg/reconcilers/spire-bootstrap/reconciler.go
Original file line number Diff line number Diff line change
Expand Up @@ -368,7 +368,7 @@ func (r *reconciler) createKubeconfigConfigMap(ctx context.Context, clientset *k
}
caCert := configMap.Data["ca.crt"]

kubeconfig := fmt.Sprintf(`
kubeconfig := strings.TrimSpace(fmt.Sprintf(`
apiVersion: v1
kind: Config
clusters:
Expand All @@ -386,7 +386,7 @@ func (r *reconciler) createKubeconfigConfigMap(ctx context.Context, clientset *k
- name: spire-kubeconfig
user:
token: %s
`, base64.StdEncoding.EncodeToString([]byte(caCert)), clientset.RESTClient().Get().URL().String(), clustername, token)
`, base64.StdEncoding.EncodeToString([]byte(caCert)), clientset.RESTClient().Get().URL().String(), clustername, token))

// Generate a unique key for the new kubeconfig
newConfigKey := fmt.Sprintf("kubeconfig-%s", clustername)
Expand Down

0 comments on commit 430f6ae

Please sign in to comment.