Add Role / ClusterRole resourceNames to ConfigMap nameref resolver

While it is possible to use a kustomizeconfig.yml for this, with a
custom namereference, this functionality should probably be built-in.

This is similar to previous PRs, like this one:
https://github.com/kubernetes-sigs/kustomize/pull/592
This commit is contained in:
Antonin Bas
2020-12-21 21:02:19 -08:00
parent 586515ebc4
commit e819a2ba9d
2 changed files with 6 additions and 0 deletions

View File

@@ -217,6 +217,7 @@ func TestNameReferenceHappyRun(t *testing.T) {
"secret1",
"secret1",
"secret2",
"cm1",
},
},
},
@@ -420,6 +421,7 @@ func TestNameReferenceHappyRun(t *testing.T) {
"someprefix-secret1-somehash",
"someprefix-secret1-somehash",
"secret2",
"someprefix-cm1-somehash",
},
},
},

View File

@@ -121,6 +121,10 @@ nameReference:
kind: CronJob
- path: spec/configSource/configMap
kind: Node
- path: rules/resourceNames
kind: Role
- path: rules/resourceNames
kind: ClusterRole
- kind: Secret
version: v1