Skip to content

Commit 695795e

Browse files
committed
include group name in crd patches and rbac editor/viewer files
1 parent e395f98 commit 695795e

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

pkg/plugins/common/kustomize/v1/scaffolds/internal/templates/config/crd/patches/enablecainjection_patch.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ type EnableCAInjectionPatch struct {
3333
// SetTemplateDefaults implements file.Template
3434
func (f *EnableCAInjectionPatch) SetTemplateDefaults() error {
3535
if f.Path == "" {
36-
f.Path = filepath.Join("config", "crd", "patches", "cainjection_in_%[plural].yaml")
36+
f.Path = filepath.Join("config", "crd", "patches", "cainjection_in_%[group]_%[plural].yaml")
3737
}
3838
f.Path = f.Resource.Replacer().Replace(f.Path)
3939

pkg/plugins/common/kustomize/v1/scaffolds/internal/templates/config/crd/patches/enablewebhook_patch.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ type EnableWebhookPatch struct {
3333
// SetTemplateDefaults implements file.Template
3434
func (f *EnableWebhookPatch) SetTemplateDefaults() error {
3535
if f.Path == "" {
36-
f.Path = filepath.Join("config", "crd", "patches", "webhook_in_%[plural].yaml")
36+
f.Path = filepath.Join("config", "crd", "patches", "webhook_in_%[group]_%[plural].yaml")
3737
}
3838
f.Path = f.Resource.Replacer().Replace(f.Path)
3939

pkg/plugins/common/kustomize/v1/scaffolds/internal/templates/config/rbac/crd_editor_role.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ type CRDEditorRole struct {
3333
// SetTemplateDefaults implements file.Template
3434
func (f *CRDEditorRole) SetTemplateDefaults() error {
3535
if f.Path == "" {
36-
f.Path = filepath.Join("config", "rbac", "%[kind]_editor_role.yaml")
36+
f.Path = filepath.Join("config", "rbac", "%[group]_%[kind]_editor_role.yaml")
3737
}
3838
f.Path = f.Resource.Replacer().Replace(f.Path)
3939

pkg/plugins/common/kustomize/v1/scaffolds/internal/templates/config/rbac/crd_viewer_role.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ type CRDViewerRole struct {
3333
// SetTemplateDefaults implements file.Template
3434
func (f *CRDViewerRole) SetTemplateDefaults() error {
3535
if f.Path == "" {
36-
f.Path = filepath.Join("config", "rbac", "%[kind]_viewer_role.yaml")
36+
f.Path = filepath.Join("config", "rbac", "%[group]_%[kind]_viewer_role.yaml")
3737
}
3838
f.Path = f.Resource.Replacer().Replace(f.Path)
3939

0 commit comments

Comments
 (0)