Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Release-1.21] Add cert rotation command #4632

Merged

Conversation

galal-hussein
Copy link
Contributor

Signed-off-by: galal-hussein hussein.galal.ahmed.11@gmail.com

Proposed Changes

  • Adding cert command to k3s plus adding subcommand rotate
  • Upgrading dynamic listener to add support for cert rotate

Types of Changes

New Feature

Verification

  • start k3s server
  • stop k3s
  • run cert rotate k3s cert rotate

This command will back up tls certs for server and agent excepts for CA certs and service key, and then remove these files allowing k3s on the next restart to regenerate the files.

  • restart k3s, and make sure that certificates are rotated successfully

Linked Issues

User-Facing Change

A new command is added to k3s cert which supposed to contain subcommands for certificate management, this PR include the rotate subcommand which will rotate the TLS certs for server or agent.

* Add cert rotation command

Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com>

* add function to check for dynamic listener file

Signed-off-by: Brian Downs <brian.downs@gmail.com>

* Add dynamiclistener cert rotation support

Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com>

* fixes to the cert rotation

Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com>

* fix ci tests

Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com>

* fixes to certificate rotation command

Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com>

* more fixes

Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com>

Co-authored-by: Brian Downs <brian.downs@gmail.com>
@galal-hussein galal-hussein requested a review from a team as a code owner December 2, 2021 21:56
Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com>
Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com>
@galal-hussein galal-hussein merged commit 7b62900 into k3s-io:release-1.21 Dec 6, 2021
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.

None yet

2 participants