-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
When the sveltos-agent runs in the management cluster, it receives the managed cluster's kubeconfig from a Secret. These kubeconfigs can expire (e.g., GKE tokens have a maximum lifespan of 48 hours). Sveltos includes a mechanism to proactively renew these tokens. The SveltosCluster controller can be configured to periodically refresh tokens before they expire, preventing disruptions. However, prior to this change, the sveltos-agent, when deployed in the management cluster, lacked the ability to retrieve an updated kubeconfig. Consequently, upon kubeconfig expiration, the agent encountered numerous authorization errors, effectively ceasing operation. This pull request addresses this issue by implementing a mechanism to detect kubeconfig expiration. Upon detection, the sveltos-agent retrieves a fresh, valid kubeconfig. This triggers a restart of the controller-runtime manager (and all associated controllers) as well as the evaluation manager, ensuring continued operation.
- Loading branch information
1 parent
267a044
commit 4537ba6
Showing
7 changed files
with
329 additions
and
240 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.