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

Create kubectl bash-completion script #2996

Closed
NicolasT opened this issue Dec 22, 2020 · 0 comments
Closed

Create kubectl bash-completion script #2996

NicolasT opened this issue Dec 22, 2020 · 0 comments
Assignees
Labels
complexity:easy Something that requires less than a day to fix good first issue Good for newcomers kind:enhancement New feature or request

Comments

@NicolasT
Copy link
Contributor

The kubectl package we install on some nodes doesn't come with a bash-completion completion script (unlike the kubernetes-client Fedora package). When bash-completion is installed on a system, getting kubectl completion is useful though.

We could do this as part of the Salt state by creating /etc/bash_completion.d and putting the output of kubectl completion bash in file called kubectl in said directory (cfr. 05b4be6). Keep in mind, however, we want this state (which likely needs cmd.run or similar) to be idempotent, i.e., render the completions into a variable or some temporary file, then update /etc/bash_completion.d/kubectl only when the completion script has changed.

@NicolasT NicolasT added kind:enhancement New feature or request good first issue Good for newcomers complexity:easy Something that requires less than a day to fix labels Dec 22, 2020
@TeddyAndrieux TeddyAndrieux self-assigned this Jan 14, 2021
TeddyAndrieux added a commit that referenced this issue Jan 14, 2021
Add a `/etc/bash_completion.d/kubectl` file for completion in bash for
kubectl command

Fixes: #2996
TeddyAndrieux added a commit that referenced this issue Jan 14, 2021
Add a `/etc/bash_completion.d/kubectl` file for completion in bash for
kubectl command

Fixes: #2996
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
complexity:easy Something that requires less than a day to fix good first issue Good for newcomers kind:enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants