Skip to content
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

✨ deprecate flag component-config #3023

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion pkg/plugins/common/kustomize/v1/create.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,10 @@ type createSubcommand struct {
force bool
}

func (p *createSubcommand) BindFlags(fs *pflag.FlagSet) { p.flagSet = fs }
func (p *createSubcommand) BindFlags(fs *pflag.FlagSet) {
p.flagSet = fs
_ = fs.MarkDeprecated("component-config", "component-config flag will be deprecated in upcoming releases")
Copy link
Member

@camilamacedo86 camilamacedo86 Jan 10, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But we are deprecating when we use MarkDeprecated.
That will result in for example this option no longer be doc in sdk docs when we run make generate to generate the docs.

We need to first provide the option to do the same without the flag ( via the plugin ) then, we deprecate and add here in the command something like use the --plugins=component-config/v1-alpha instead.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/hold

}

func (p *createSubcommand) InjectConfig(c config.Config) error {
p.config = c
Expand Down
5 changes: 4 additions & 1 deletion pkg/plugins/common/kustomize/v2-alpha/create.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,10 @@ type createSubcommand struct {
force bool
}

func (p *createSubcommand) BindFlags(fs *pflag.FlagSet) { p.flagSet = fs }
func (p *createSubcommand) BindFlags(fs *pflag.FlagSet) {
p.flagSet = fs
_ = fs.MarkDeprecated("component-config", "component-config flag will be deprecated in upcoming releases")
}

func (p *createSubcommand) InjectConfig(c config.Config) error {
p.config = c
Expand Down