Skip to content

Conversation

@gianlucam76
Copy link
Member

No description provided.

gianlucam76 and others added 4 commits August 12, 2025 22:18
When a cluster is registered with Sveltos, a Secret containing the cluster's
kubeconfig is created.
The kubeconfig is stored under the key __kubeconfig__ within this Secret.

If Sveltos renews the token, the key is updated to __re-kubeconfig__, and
the `SveltosCluster.Spec.KubeconfigKeyName` is updated to reflect this change.

If you run the `sveltosctl register cluster` command again, the Secret's data
is reset, and the cluster's kubeconfig is once again stored under the __kubeconfig__ key.

Previously, this would cause issues because the `SveltosCluster.Spec.KubeconfigKeyName`
was not updated back to __kubeconfig__.
This PR resolves that problem by ensuring that `SveltosCluster.Spec.KubeconfigKeyName`
is correctly updated to match the key in the Secret, preventing Sveltos components from
failing to find the cluster's kubeconfig.
(bug) Set SveltosCluster.Spec.KubeconfigKeyName
@gianlucam76 gianlucam76 merged commit 23937d4 into projectsveltos:release-1.0 Aug 15, 2025
4 checks passed
@gianlucam76 gianlucam76 deleted the release-1.0 branch August 15, 2025 15:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant