Skip to content

Accept secret name for get command#16

Merged
djfarrelly merged 4 commits intomasterfrom
fix/allow-for-secret-name-arg
Mar 31, 2020
Merged

Accept secret name for get command#16
djfarrelly merged 4 commits intomasterfrom
fix/allow-for-secret-name-arg

Conversation

@djfarrelly
Copy link
Copy Markdown
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
Copy Markdown
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