Skip to content

Commit

Permalink
(kustomize/v2) - deprecate component-config flag
Browse files Browse the repository at this point in the history
  • Loading branch information
camilamacedo86 committed Jun 20, 2023
1 parent 90a3b40 commit 75d3f3e
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 0 deletions.
8 changes: 8 additions & 0 deletions pkg/machinery/interfaces.go
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,14 @@ type HasMultiGroup interface {
InjectMultiGroup(bool)
}

// Deprecated: The ComponentConfig has been deprecated in the Controller-Runtime since its version 0.15.0.
// Fur further information see: https://github.com/kubernetes-sigs/controller-runtime/issues/895
// Moreover, it has undergone breaking changes and is no longer functioning as intended.
// As a result, Kubebuilder, which heavily relies on the Controller Runtime, has also deprecated this feature,
// no longer guaranteeing its functionality from version 3.11.0 onwards.
//
// Please, be aware that it will force Kubebuilder remove this option soon in future release.
//
// HasComponentConfig allows the component-config flag to be used on a template
type HasComponentConfig interface {
// InjectComponentConfig sets the template component-config flag
Expand Down
8 changes: 8 additions & 0 deletions pkg/machinery/mixins.go
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,14 @@ func (m *MultiGroupMixin) InjectMultiGroup(flag bool) {
m.MultiGroup = flag
}

// Deprecated: The ComponentConfig has been deprecated in the Controller-Runtime since its version 0.15.0.
// Fur further information see: https://github.com/kubernetes-sigs/controller-runtime/issues/895
// Moreover, it has undergone breaking changes and is no longer functioning as intended.
// As a result, Kubebuilder, which heavily relies on the Controller Runtime, has also deprecated this feature,
// no longer guaranteeing its functionality from version 3.11.0 onwards.
//
// Please, be aware that it will force Kubebuilder remove this option soon in future release.
//
// ComponentConfigMixin provides templates with a injectable component-config flag field
type ComponentConfigMixin struct {
// ComponentConfig is the component-config flag
Expand Down
5 changes: 5 additions & 0 deletions pkg/plugins/common/kustomize/v2/init.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,11 @@ func (p *initSubcommand) BindFlags(fs *pflag.FlagSet) {
fs.StringVar(&p.name, "project-name", "", "name of this project")
fs.BoolVar(&p.componentConfig, "component-config", false,
"create a versioned ComponentConfig file, may be 'true' or 'false'")
_ = fs.MarkDeprecated("component-config", "the ComponentConfig has been deprecated in the "+
"Controller-Runtime since its version 0.15.0. Moreover, it has undergone breaking changes and is no longer "+
"functioning as intended. As a result, this tool, which heavily relies on the Controller Runtime, "+
"has also deprecated this feature, no longer guaranteeing its functionality from version 3.11.0 onwards. "+
"You can find additional details on https://github.com/kubernetes-sigs/controller-runtime/issues/895.")
}

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

0 comments on commit 75d3f3e

Please sign in to comment.