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

Accept secret name for get command #16

Merged
merged 4 commits into from
Mar 31, 2020
Merged

Conversation

djfarrelly
Copy link
Contributor

@djfarrelly djfarrelly commented Mar 28, 2020

Purpose

Builds on top of #15 to fix the ability for a user to specify the secret name to skip the interactive selection of the secret they want to edit.

$ kubesecret get workers-secret -n workers
Namespace: workers
Using workers-secret
? Choose next action: (Use arrow keys)
❯ View all keys
  View a specific key
  Edit secret
  Remove secret (TODO)
  Exit

Notes

This argument was already part of the cli, just not implemented yet 😄

If a user does not specify the namespace option, use the namespace
set in the user's current context. This will provide a more natural
behavior for kubectl users.
This passes through the secret name specified for the get command.
If no secret name is specified, the user gets a list of secrets to
select from.
@djfarrelly djfarrelly requested a review from kiriappeee March 28, 2020 16:54
Also ran some linting to keep the code standardized
Copy link
Member

@kiriappeee kiriappeee left a comment

Choose a reason for hiding this comment

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

Tested locally. Made a small change to mention the namespace if the person's current context does not have a namespace specified. Other than that, looks good to go.

@djfarrelly djfarrelly merged commit 7086045 into master Mar 31, 2020
@djfarrelly djfarrelly deleted the fix/allow-for-secret-name-arg branch March 31, 2020 14:23
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.

2 participants