-
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: add remove configmap command #4796
feat: add remove configmap command #4796
Conversation
|
Welcome @yufeiminds! |
Hi @yufeiminds. Thanks for your PR. I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. 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. |
@koba1t could you please do a quick review of this PR? |
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, @yufeiminds
Thanks for your contribution!!
I add a few comments for your code.
Could you check there?
@yufeiminds: 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. |
/label tide/merge-method-squash |
Yet another question, should we create a new pull request to support removing secrets? Because they are brothers. 😄 |
/ok-to-test |
/lgtm hi @natasha41575 |
Thanks for the review, and sorry for the delay! Running the tests now. |
Hi, @koba1t I have fixed the lint issues, there is an issue with And @natasha41575, Could you exec tests and lint on GitHub actions again? Thank you~ 😄 |
Sorry, I didn't know that package already existed, and I think that it needs to clean up... So, I think your fix is good. Thanks for your fix! |
@natasha41575 hi, any feedback about this PR? |
Hi, @natasha41575, @koba1t. I resolved the conversations. Please push it forward again. Thank you~ |
@koba1t Hi, can you review it and push it forward? Thank you. 🍻 |
/lgtm |
@natasha41575 Hi, does this PR and #4872 could be merged? I used my own modified version in our pipeline before it was merged. I am looking forward to it being integrated into the mainline as soon as possible. If any problems arise, please feel free to reach out to me. 😊 |
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.
LGTM! Just leaving a minor suggestion for the error message.
/lgtm
m.ConfigMapGenerator = newConfigMaps | ||
err = mf.Write(m) | ||
if err != nil { | ||
return fmt.Errorf("configmap cannot write back to file, got %w", err) |
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.
Minor suggestion:
return fmt.Errorf("configmap cannot write back to file, got %w", err) | |
return fmt.Errorf("failed to write kustomization file: %w", err) |
@stormqueen1990: changing LGTM is restricted to collaborators In response to this:
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. |
/lgtm |
cmd := &cobra.Command{ | ||
Use: "configmap", | ||
Short: "Removes specified configmap" + | ||
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.
This should say Removes specified configmap from kustomization.yaml
It currently reads as Removes specified configmapkustomization.yaml
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: natasha41575, yufeiminds 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 |
@yufeiminds The tests aren't triggering, I think because you created the PR before the tests ran. Can you push a commit address #4796 (comment)? I think that will trigger the tests. |
@yufeiminds: The following test failed, say
Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR. 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. I understand the commands that are listed here. |
"github.com/spf13/cobra" | ||
"sigs.k8s.io/kustomize/api/konfig" | ||
"sigs.k8s.io/kustomize/api/types" | ||
"sigs.k8s.io/kustomize/kustomize/v4/commands/internal/kustfile" |
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.
This will need to change to v5
Closing this in favour of #5327 /close |
@stormqueen1990: Closed this PR. In response to this:
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. |
If someone need update the file list of the
configMapGenerator
from directory, they can useadd configmap
andremove configmap
together.Like this:
#4493