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

Fix subcommand mapping for rke2 certificate #5750

Merged
merged 1 commit into from
Apr 12, 2024

Conversation

brandond
Copy link
Contributor

@brandond brandond commented Apr 12, 2024

Proposed Changes

Fix incorrect mapping of subcommands introduced in recent k3s bump: #5714

Types of Changes

bugfix

Verification

make sure subcommands to the right thing, not like this:

root@rke2-server-1:/# rke2 certificate rotate
FATA[0000] only https:// URLs are supported, invalid scheme:

root@rke2-server-1:/# rke2 certificate check
INFO[0000] Server detected, rotating agent and server certificates
INFO[0000] Rotating dynamic listener certificate
INFO[0000] Rotating certificates for cloud-controller
INFO[0000] Rotating certificates for etcd
INFO[0000] Rotating certificates for scheduler
INFO[0000] Rotating certificates for supervisor
INFO[0000] Rotating certificates for kubelet
INFO[0000] Rotating certificates for rke2-controller
INFO[0000] Rotating certificates for api-server
INFO[0000] Rotating certificates for admin
INFO[0000] Rotating certificates for auth-proxy
INFO[0000] Rotating certificates for controller-manager
INFO[0000] Rotating certificates for kube-proxy
INFO[0000] Successfully backed up certificates to /var/lib/rancher/rke2/server/tls-1712938036, please restart rke2 server or agent to rotate certificates

Testing

Linked Issues

User-Facing Change

Further Comments

Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
@brandond brandond requested a review from a team as a code owner April 12, 2024 16:13
@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 26.46%. Comparing base (2083e9d) to head (2a10241).

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #5750   +/-   ##
=======================================
  Coverage   26.46%   26.46%           
=======================================
  Files          30       30           
  Lines        2649     2649           
=======================================
  Hits          701      701           
  Misses       1903     1903           
  Partials       45       45           
Flag Coverage Δ
inttests 10.00% <100.00%> (ø)
unittests 18.80% <0.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

@mgfritch mgfritch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(nit) maybe avoid confusion by using the same ordering for the subcommands, otherwise lgtm!

@brandond
Copy link
Contributor Author

The CLI wrapping stuff is pretty weird already, we could probably do some thinking on how to validate that the subcommands are all wrapping the correct k3s functions.

@brandond brandond merged commit 8cc52ee into rancher:master Apr 12, 2024
5 checks passed
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

5 participants