feat: add the renew kubeconfigs command - #745
Open
ralgozino wants to merge 4 commits into
Open
Conversation
Add the furyctl renew kubeconfigs command. It renews the kubeconfig file of the admin and the kubeconfig files of the users in spec.kubernetes.advanced.users.names. It writes them to the working directory, with the names that furyctl apply uses. A list of names renews only some of them. A space or a comma separates the names. Merge CertificatesRenewer into Renewer, which now has RenewCertificates and RenewKubeconfigs. One registry and one implementation for each kind serve both operations. A private render method holds the template rendering that the two operations share. This removes a second factory registry and about 90 duplicated lines for each kind. The behavior of renew certificates does not change. Move the bootstrap that the renew subcommands share into cmd/renew/renew.go. RunPlaybook looks for the playbook before it calls ansible. An older SD then gives a clear message instead of a raw ansible error. Closes #575
ralgozino
marked this pull request as ready for review
August 7, 2026 18:50
ralgozino
requested review from
marcopaggioro,
mimnix,
nutellinoit,
smerlos and
stefanoghinelli
and removed request for
marcopaggioro
August 7, 2026 18:50
The render method's parameter shadowed the persistent c.workDir field but is actually the ephemeral temp render dir. Rename to renderDir to end the confusion; no behavior change.
Mention the new `renew kubeconfig` command in the `get kubeconfig` existing command, to help discoverability. Improve help `get kubeconfig` overall help message.
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary 💡
Add
furyctl renew kubeconfigscommand. It renews the kubeconfig file of the admin and the kubeconfig files of the users inspec.kubernetes.advanced.users.namesusing new Ansible playbooks from the Distribution.Closes: #575
Relates: sighupio/distribution#588
Description 📝
The command writes the renewed files to the current directory, with the names that
furyctl applyuses:kubeconfigfor the admin and<user>.kubeconfigfor each user.Refactor in the same PR.
CertificatesRenewerbecameRenewer, which hasRenewCertificates()andRenewKubeconfigs(users). One registry and one implementation for each kind serve both operations, and a privaterendermethod holds the template rendering that the two operations share. This removes a second parallel factory registry and about 90 duplicated lines for each kind. The behavior ofrenew certificatesdoes not change.cmd/renew/renew.gonow holds the bootstrap that the two subcommands share.Cluster kinds. OnPremises and Immutable renew the kubeconfig files. EKSCluster and KFDDistribution give
renew is not supported for the <kind> kind, from one sharedUnsupportedRenewer.Some notes for the reviewers:
furyctl renew kubeconfigs#575 asked for a comma separated list. The command takes a space separated list, which is the usual form for a CLI, and accepts commas too.furyctl renew kubeconfigs#575 asked for asecrets/userssubdirectory. The files go to the working directory instead, wherefuryctl applyalready writes them, thus a renew overwrites the files that the administrator already has.RunPlaybooklooks for the playbook before it calls ansible. An older SD then gives the message:Breaking Changes 💔
None.
renew certificateskeeps its behavior, its flags, and its output.Tests performed 🧪
kubectl --kubeconfigFuture work 🔧
docs/furyctl/cli-reference/renew/in thedocsrepo needs afuryctl dump cli-referenceregen, forfuryctl_renew_kubeconfigs.mdand the rewordedcertificateshelp.The kubeconfig tasks are duplicated between this playbook and the
kube-control-planerole. Moving them into the role needs the renew path to vendor (download) the installers for OnPremises and to render outside a temporary directory, becauseroles_pathis relative. It is worth doing when a third operation needs the same tasks.Self-assessment checklist 🏁
Important
Make sure that you completed this checklist before asking for review.
PRs that do not have this checklist ready won't be reviewed.
docs/releases/unreleased.mdfile (or equivalent)