Skip to content

Commit

Permalink
Update pkg/plugins/common/kustomize/v1/scaffolds/internal/templates/c…
Browse files Browse the repository at this point in the history
…onfig/rbac/crd_viewer_role.go

Co-authored-by: Camila Macedo <7708031+camilamacedo86@users.noreply.github.com>
  • Loading branch information
rmb938 and camilamacedo86 authored Jan 31, 2022
1 parent 32e7512 commit d49ab87
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,12 @@ type CRDViewerRole struct {
// SetTemplateDefaults implements file.Template
func (f *CRDViewerRole) SetTemplateDefaults() error {
if f.Path == "" {
f.Path = filepath.Join("config", "rbac", "%[group]_%[kind]_viewer_role.yaml")
if f.MultiGroup {
f.Path = filepath.Join("config", "rbac", "%[group]_%[kind]_viewer_role.yaml")
} else {
f.Path = filepath.Join("config", "rbac", "%[kind]_viewer_role.yaml")
}

}
f.Path = f.Resource.Replacer().Replace(f.Path)

Expand Down

0 comments on commit d49ab87

Please sign in to comment.