-
Notifications
You must be signed in to change notification settings - Fork 1.6k
🛠️ add ignore flags for selective scaffolding in edit command #4889
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
base: master
Are you sure you want to change the base?
Conversation
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: pabhi18 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 |
Welcome @pabhi18! |
Hi @pabhi18. 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-sigs/prow repository. |
"ignore-networkPolicy": false, | ||
"ignore-certmanager": false, | ||
"ignore-webhook": false, | ||
} |
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.
To make this work, we’d need to ensure that we have none conditions using them in the scaffold as well.
For example, see the values.ymal and the other helm templates, we have conditions that check if has webhooks and etc.. handling those isn’t as straightforward as it seems.
I know we opened an issue about this in the past, but I’m not sure how feasible or maintainable it is long-term. We’d also need a way to validate and guarantee support across all options.
If we go ahead with this, we should: ( we cannot add the options without ensure that all works and is done as expected in each case )
- Cover all relevant scaffold points
- Add CI tests to validate configs for each scenario
- Mock Helm charts and install them during e2e to catch issues early
We could follow the same pattern used in our e2e
tests: create mocks per case, deploy them, and verify outcomes. See e2e/go/v4
and related GitHub Actions as reference.
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.
Thank you for the clarification!
Yes, currently the flags only prevent the files from being regenerated, but the corresponding checks in values.yaml and templates still need to be handled.
I’ll start working on adding the necessary conditions for those.
If you have any suggestions or references for adding those conditions or e2e tests, it would really help me a lot!
PR needs rebase. 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-sigs/prow repository. |
Description:
This PR introduces support for the following
--ignore-*
flags in theedit
command of the Helm plugin, allowing selective scaffolding of chart files:--ignore-samples
--ignore-prometheus
--ignore-networkPolicy
--ignore-certmanager
--ignore-webhook
It can be used like this:
These flags only apply to the edit command. The init command still scaffolds all components by default.
If any of the scaffolded folders are deleted manually, running edit with the respective --ignore-* flag will prevent them from being regenerated.
Motivation:
Developers may not want all default Helm chart components (like Prometheus monitors or sample CRs). This change offers a way to skip unwanted parts cleanly.
Fixes:
Fixes #4326