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

Rke2 shell completion #6305

Merged
merged 1 commit into from
Jul 12, 2024
Merged

Conversation

vitorsavian
Copy link
Member

@vitorsavian vitorsavian commented Jul 10, 2024

Proposed Changes

  • Add a completion for the shell the same way k3s does but with two more cli flags to add the kubectl and crictl to the environment

Types of Changes

  • Feature

Verification

  • Install rke2 and run rke2 completion bash -i --crictl --kubectl or rke2 completion zsh -i --crictl --kubectl

Testing

Linked Issues

User-Facing Change

RKE2 now support shell completion

Further Comments

  • I saw the need for the entire Run function to be on RKE2 because the requirement for exposing kubectl and crictl files are only for rke2

@vitorsavian vitorsavian force-pushed the rke2-shell-completion branch from 66d13b5 to bb28f4b Compare July 10, 2024 22:52
@codecov-commenter
Copy link

codecov-commenter commented Jul 10, 2024

Codecov Report

Attention: Patch coverage is 6.45161% with 87 lines in your changes missing coverage. Please review.

Project coverage is 25.18%. Comparing base (311b3a5) to head (ad3b7ef).
Report is 6 commits behind head on master.

Files Patch % Lines
pkg/cli/cmds/completion.go 4.39% 87 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           master    #6305       +/-   ##
===========================================
+ Coverage    9.77%   25.18%   +15.41%     
===========================================
  Files          32       33        +1     
  Lines        2712     2827      +115     
===========================================
+ Hits          265      712      +447     
+ Misses       2425     2068      -357     
- Partials       22       47       +25     
Flag Coverage Δ
inttests 9.58% <6.45%> (-0.19%) ⬇️
unittests 17.79% <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.

@vitorsavian vitorsavian force-pushed the rke2-shell-completion branch from bb28f4b to abd69e5 Compare July 10, 2024 23:06
Signed-off-by: Vitor Savian <[email protected]>
@vitorsavian vitorsavian force-pushed the rke2-shell-completion branch from abd69e5 to ad3b7ef Compare July 11, 2024 15:11
@vitorsavian vitorsavian marked this pull request as ready for review July 11, 2024 15:55
@vitorsavian vitorsavian requested a review from a team as a code owner July 11, 2024 15:55
@vitorsavian vitorsavian requested a review from a team July 11, 2024 17:12
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.

4 participants