-
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?
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -47,7 +47,15 @@ func (p *initSubcommand) InjectConfig(c config.Config) error { | |
} | ||
|
||
func (p *initSubcommand) Scaffold(fs machinery.Filesystem) error { | ||
scaffolder := scaffolds.NewInitHelmScaffolder(p.config, false) | ||
ignoreFlags := map[string]bool{ | ||
"ignore-samples": false, | ||
"ignore-prometheus": false, | ||
"ignore-networkPolicy": false, | ||
"ignore-certmanager": false, | ||
"ignore-webhook": false, | ||
} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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. 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 )
We could follow the same pattern used in our There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thank you for the clarification! |
||
|
||
scaffolder := scaffolds.NewInitHelmScaffolder(p.config, false, ignoreFlags) | ||
scaffolder.InjectFS(fs) | ||
err := scaffolder.Scaffold() | ||
if err != nil { | ||
|
Uh oh!
There was an error while loading. Please reload this page.