Skip to content

Commit

Permalink
include group name in crd patches and rbac editor/viewer files
Browse files Browse the repository at this point in the history
  • Loading branch information
rmb938 committed Jan 30, 2022
1 parent e395f98 commit 695795e
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ type EnableCAInjectionPatch struct {
// SetTemplateDefaults implements file.Template
func (f *EnableCAInjectionPatch) SetTemplateDefaults() error {
if f.Path == "" {
f.Path = filepath.Join("config", "crd", "patches", "cainjection_in_%[plural].yaml")
f.Path = filepath.Join("config", "crd", "patches", "cainjection_in_%[group]_%[plural].yaml")
}
f.Path = f.Resource.Replacer().Replace(f.Path)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ type EnableWebhookPatch struct {
// SetTemplateDefaults implements file.Template
func (f *EnableWebhookPatch) SetTemplateDefaults() error {
if f.Path == "" {
f.Path = filepath.Join("config", "crd", "patches", "webhook_in_%[plural].yaml")
f.Path = filepath.Join("config", "crd", "patches", "webhook_in_%[group]_%[plural].yaml")
}
f.Path = f.Resource.Replacer().Replace(f.Path)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ type CRDEditorRole struct {
// SetTemplateDefaults implements file.Template
func (f *CRDEditorRole) SetTemplateDefaults() error {
if f.Path == "" {
f.Path = filepath.Join("config", "rbac", "%[kind]_editor_role.yaml")
f.Path = filepath.Join("config", "rbac", "%[group]_%[kind]_editor_role.yaml")
}
f.Path = f.Resource.Replacer().Replace(f.Path)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ type CRDViewerRole struct {
// SetTemplateDefaults implements file.Template
func (f *CRDViewerRole) SetTemplateDefaults() error {
if f.Path == "" {
f.Path = filepath.Join("config", "rbac", "%[kind]_viewer_role.yaml")
f.Path = filepath.Join("config", "rbac", "%[group]_%[kind]_viewer_role.yaml")
}
f.Path = f.Resource.Replacer().Replace(f.Path)

Expand Down

0 comments on commit 695795e

Please sign in to comment.