Skip to content

Commit 660671c

Browse files
authored
Merge pull request #3467 from camilamacedo86/deprecate-flag-component-config
⚠️ (kustomize/v2) - deprecate component-config flag and component-config API methods
2 parents eb4e73a + 75d3f3e commit 660671c

File tree

3 files changed

+21
-0
lines changed

3 files changed

+21
-0
lines changed

pkg/machinery/interfaces.go

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,14 @@ type HasMultiGroup interface {
8383
InjectMultiGroup(bool)
8484
}
8585

86+
// Deprecated: The ComponentConfig has been deprecated in the Controller-Runtime since its version 0.15.0.
87+
// Fur further information see: https://github.com/kubernetes-sigs/controller-runtime/issues/895
88+
// Moreover, it has undergone breaking changes and is no longer functioning as intended.
89+
// As a result, Kubebuilder, which heavily relies on the Controller Runtime, has also deprecated this feature,
90+
// no longer guaranteeing its functionality from version 3.11.0 onwards.
91+
//
92+
// Please, be aware that it will force Kubebuilder remove this option soon in future release.
93+
//
8694
// HasComponentConfig allows the component-config flag to be used on a template
8795
type HasComponentConfig interface {
8896
// InjectComponentConfig sets the template component-config flag

pkg/machinery/mixins.go

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,14 @@ func (m *MultiGroupMixin) InjectMultiGroup(flag bool) {
129129
m.MultiGroup = flag
130130
}
131131

132+
// Deprecated: The ComponentConfig has been deprecated in the Controller-Runtime since its version 0.15.0.
133+
// Fur further information see: https://github.com/kubernetes-sigs/controller-runtime/issues/895
134+
// Moreover, it has undergone breaking changes and is no longer functioning as intended.
135+
// As a result, Kubebuilder, which heavily relies on the Controller Runtime, has also deprecated this feature,
136+
// no longer guaranteeing its functionality from version 3.11.0 onwards.
137+
//
138+
// Please, be aware that it will force Kubebuilder remove this option soon in future release.
139+
//
132140
// ComponentConfigMixin provides templates with a injectable component-config flag field
133141
type ComponentConfigMixin struct {
134142
// ComponentConfig is the component-config flag

pkg/plugins/common/kustomize/v2/init.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,11 @@ func (p *initSubcommand) BindFlags(fs *pflag.FlagSet) {
6262
fs.StringVar(&p.name, "project-name", "", "name of this project")
6363
fs.BoolVar(&p.componentConfig, "component-config", false,
6464
"create a versioned ComponentConfig file, may be 'true' or 'false'")
65+
_ = fs.MarkDeprecated("component-config", "the ComponentConfig has been deprecated in the "+
66+
"Controller-Runtime since its version 0.15.0. Moreover, it has undergone breaking changes and is no longer "+
67+
"functioning as intended. As a result, this tool, which heavily relies on the Controller Runtime, "+
68+
"has also deprecated this feature, no longer guaranteeing its functionality from version 3.11.0 onwards. "+
69+
"You can find additional details on https://github.com/kubernetes-sigs/controller-runtime/issues/895.")
6570
}
6671

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

0 commit comments

Comments
 (0)