Skip to content

Commit d49ab87

Browse files
Update pkg/plugins/common/kustomize/v1/scaffolds/internal/templates/config/rbac/crd_viewer_role.go
Co-authored-by: Camila Macedo <[email protected]>
1 parent 32e7512 commit d49ab87

File tree

1 file changed

+6
-1
lines changed
  • pkg/plugins/common/kustomize/v1/scaffolds/internal/templates/config/rbac

1 file changed

+6
-1
lines changed

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

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,12 @@ 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", "%[group]_%[kind]_viewer_role.yaml")
36+
if f.MultiGroup {
37+
f.Path = filepath.Join("config", "rbac", "%[group]_%[kind]_viewer_role.yaml")
38+
} else {
39+
f.Path = filepath.Join("config", "rbac", "%[kind]_viewer_role.yaml")
40+
}
41+
3742
}
3843
f.Path = f.Resource.Replacer().Replace(f.Path)
3944

0 commit comments

Comments
 (0)