kustomize icon indicating copy to clipboard operation
kustomize copied to clipboard

feat: add remove configmap command

Open yufeiminds opened this issue 2 years ago • 5 comments

If someone need update the file list of the configMapGenerator from directory, they can use add configmap and remove configmap together.

Like this:

# Initialize
kustomize edit add configmap routes-01 --from-file="folder1/conf.d/*"
kustomize edit add configmap routes-02 --from-file="folder2/conf.d/*"

# Refresh configmap
kustomize edit remove configmap routes-01,routes-02
kustomize edit add configmap routes-01 --from-file="folder1/conf.d/*"
kustomize edit add configmap routes-01 --from-file="folder1/conf.d/*"

Closes #4493

yufeiminds avatar Sep 15 '22 13:09 yufeiminds

CLA Signed

The committers listed above are authorized under a signed CLA.

  • :white_check_mark: login: yufeiminds / name: Yufei Li (0d7c56dcf8d0920f8cc86ac879dfc1da37162831)

Welcome @yufeiminds!

It looks like this is your first PR to kubernetes-sigs/kustomize 🎉. Please refer to our pull request process documentation to help your PR have a smooth ride to approval.

You will be prompted by a bot to use commands during the review process. Do not be afraid to follow the prompts! It is okay to experiment. Here is the bot commands documentation.

You can also check if kubernetes-sigs/kustomize has its own contribution guidelines.

You may want to refer to our testing guide if you run into trouble with your tests not passing.

If you are having difficulty getting your pull request seen, please follow the recommended escalation practices. Also, for tips and tricks in the contribution process you may want to read the Kubernetes contributor cheat sheet. We want to make sure your contribution gets all the attention it needs!

Thank you, and welcome to Kubernetes. :smiley:

k8s-ci-robot avatar Sep 15 '22 13:09 k8s-ci-robot

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 /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

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.

k8s-ci-robot avatar Sep 15 '22 13:09 k8s-ci-robot

@koba1t could you please do a quick review of this PR?

natasha41575 avatar Oct 14 '22 17:10 natasha41575

@yufeiminds: This PR has multiple commits, and the default merge method is: merge. You can request commits to be squashed using the label: tide/merge-method-squash

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.

k8s-ci-robot avatar Oct 31 '22 11:10 k8s-ci-robot

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: yufeiminds Once this PR has been reviewed and has the lgtm label, please assign natasha41575 for approval by writing /assign @natasha41575 in a comment. For more information see the Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment Approvers can cancel approval by writing /approve cancel in a comment

k8s-ci-robot avatar Oct 31 '22 11:10 k8s-ci-robot

/label tide/merge-method-squash

yufeiminds avatar Oct 31 '22 11:10 yufeiminds

Yet another question, should we create a new pull request to support removing secrets? Because they are brothers. 😄

yufeiminds avatar Oct 31 '22 11:10 yufeiminds

/ok-to-test

koba1t avatar Oct 31 '22 14:10 koba1t

/lgtm

hi @natasha41575 This PR looks good to me, Could you exec tests and lint on GitHub actions?

koba1t avatar Oct 31 '22 15:10 koba1t

This PR looks good to me, Could you exec tests and lint on GitHub actions?

Thanks for the review, and sorry for the delay! Running the tests now.

natasha41575 avatar Nov 16 '22 16:11 natasha41575

@yufeiminds Could you check and fix failed lint and tests?

koba1t avatar Nov 22 '22 11:11 koba1t

Hi, @koba1t

I have fixed the lint issues, there is an issue with testpackage linter. It will conflict with the remove_test package. So I create a nolint comment to ignore it. It may not affect the feature and code smell. If we need to fix it after that. I can create another pull request to fix all the commands of remove/remove_test package.

And @natasha41575, Could you exec tests and lint on GitHub actions again? Thank you~ 😄

yufeiminds avatar Nov 24 '22 13:11 yufeiminds

It will conflict with the remove_test package.

Sorry, I didn't know that package already existed, and I think that it needs to clean up... nolint:testpackage is used here and I think it permitted.

So, I think your fix is good. Thanks for your fix! /lgtm

koba1t avatar Nov 25 '22 13:11 koba1t

@natasha41575 hi, any feedback about this PR?

yufeiminds avatar Dec 28 '22 03:12 yufeiminds

Hi, @natasha41575, @koba1t. I resolved the conversations. Please push it forward again. Thank you~

yufeiminds avatar Jan 12 '23 13:01 yufeiminds

@koba1t Hi, can you review it and push it forward? Thank you. 🍻

yufeiminds avatar Feb 08 '23 02:02 yufeiminds

/lgtm Thank you!

koba1t avatar Feb 14 '23 11:02 koba1t

@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. 😊

yufeiminds avatar May 10 '23 08:05 yufeiminds

@stormqueen1990: changing LGTM is restricted to collaborators

In response to this:

LGTM! Just leaving a minor suggestion for the error message.

/lgtm

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.

k8s-ci-robot avatar Aug 29 '23 02:08 k8s-ci-robot

/lgtm

stormqueen1990 avatar Aug 30 '23 21:08 stormqueen1990

[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 /approve in a comment Approvers can cancel approval by writing /approve cancel in a comment

k8s-ci-robot avatar Sep 01 '23 15:09 k8s-ci-robot

@yufeiminds The tests aren't triggering, I think because you created the PR before the tests ran. Can you push a commit address https://github.com/kubernetes-sigs/kustomize/pull/4796#discussion_r1313165717? I think that will trigger the tests.

natasha41575 avatar Sep 01 '23 15:09 natasha41575

@yufeiminds: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
kustomize-presubmit-master 927804dfe58fff240e26e384a612947401089d04 link unknown /test kustomize-presubmit-master

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.

k8s-ci-robot avatar Sep 01 '23 15:09 k8s-ci-robot

Closing this in favour of #5327

/close

stormqueen1990 avatar Sep 13 '23 00:09 stormqueen1990

@stormqueen1990: Closed this PR.

In response to this:

Closing this in favour of #5327

/close

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.

k8s-ci-robot avatar Sep 13 '23 00:09 k8s-ci-robot