-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
feat: edit set secret #5467
feat: edit set secret #5467
Conversation
This PR has multiple commits, and the default merge method is: merge. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
c59b603
to
1a9c373
Compare
1a9c373
to
5f15ceb
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
only some minor non-blocking comments, btw the test util was clean!
Use: "secret NAME [--from-literal=key1=value1] [--namespace=namespace-name] [--new-namespace=new-namespace-name]", | ||
Short: fmt.Sprintf("Edits the value for an existing key for a secret in the %s file", konfig.DefaultKustomizationFileName()), | ||
Long: fmt.Sprintf(`Edits the value for an existing key in an existing secret in the %s file. | ||
Both secret name and key name must exist for this command to succeed.`, konfig.DefaultKustomizationFileName()), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the length of short and long seems like same, can we remove one of them?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Long continues on the next line! Do you feel we could add more to it?
I'd prefer to have a more complete description on the long one than scrap it completely.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
would prefer more complete in the view of a user
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you have an example of the format you'd like to see?
5f15ceb
to
8e02620
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice consolidation with the test util.
/lgtm
It looks like the test failed in CI. Could you investigate and fix it? |
8e02620
to
5375122
Compare
Hi there @koba1t! It looks like that was a flake and it went away after I rebased. This is ready for a new look 🙂 |
kustomize/commands/internal/configmapsecret/configmapsecret_testutils.go
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi, @stormqueen1990!
Thanks for your work!
I'm sorry for the delay in my review.
I added a few comments. Could you check that?
kustomize/commands/internal/configmapsecret/configmapsecret_testutils.go
Outdated
Show resolved
Hide resolved
5375122
to
7bd3467
Compare
7bd3467
to
66ba468
Compare
* Add new functionality to allow editing a secret in a kustomization file. Initial implementation supports only --from-literal option. * Refactor edit set configmap to reuse some testing bits.
Remove error checks from the utility function and bubble them up instead.
Add a blurb to the help output for both 'edit set configmap' and 'edit set secret' to clarify that whenever a namespace is not specified, the default namespace is implicitly defined as part of the commands.
aaff543
to
3bb9a6d
Compare
Thanks for your contribution! /lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: koba1t, stormqueen1990 The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
--from-literal
option.edit set configmap
to reuse some testing bits.Fixes #4493