mirror of
https://github.com/kyverno/kyverno.git
synced 2025-03-31 03:45:17 +00:00
add annotation to variable
This commit is contained in:
parent
3f965a245b
commit
eb34437f30
1 changed files with 10 additions and 1 deletions
|
@ -16,6 +16,9 @@ spec:
|
||||||
kind: ClusterRole
|
kind: ClusterRole
|
||||||
name: "ns-owner-{{request.object.metadata.name}}-{{request.userInfo.username}}"
|
name: "ns-owner-{{request.object.metadata.name}}-{{request.userInfo.username}}"
|
||||||
data:
|
data:
|
||||||
|
metadata:
|
||||||
|
annotations:
|
||||||
|
nirmata.io/ns-creator: "{{serviceAccountName}}"
|
||||||
rules:
|
rules:
|
||||||
- apiGroups: [""]
|
- apiGroups: [""]
|
||||||
resources: ["namespaces"]
|
resources: ["namespaces"]
|
||||||
|
@ -31,6 +34,9 @@ spec:
|
||||||
kind: ClusterRoleBinding
|
kind: ClusterRoleBinding
|
||||||
name: "ns-owner-{{request.object.metadata.name}}-{{request.userInfo.username}}-binding"
|
name: "ns-owner-{{request.object.metadata.name}}-{{request.userInfo.username}}-binding"
|
||||||
data:
|
data:
|
||||||
|
metadata:
|
||||||
|
annotations:
|
||||||
|
nirmata.io/ns-creator: "{{serviceAccountName}}"
|
||||||
roleRef:
|
roleRef:
|
||||||
apiGroup: rbac.authorization.k8s.io
|
apiGroup: rbac.authorization.k8s.io
|
||||||
kind: ClusterRole
|
kind: ClusterRole
|
||||||
|
@ -50,6 +56,9 @@ spec:
|
||||||
name: "ns-admin-{{request.object.metadata.name}}-{{request.userInfo.username}}-binding"
|
name: "ns-admin-{{request.object.metadata.name}}-{{request.userInfo.username}}-binding"
|
||||||
namespace: "{{request.object.metadata.name}}"
|
namespace: "{{request.object.metadata.name}}"
|
||||||
data:
|
data:
|
||||||
|
metadata:
|
||||||
|
annotations:
|
||||||
|
nirmata.io/ns-creator: "{{serviceAccountName}}"
|
||||||
roleRef:
|
roleRef:
|
||||||
apiGroup: rbac.authorization.k8s.io
|
apiGroup: rbac.authorization.k8s.io
|
||||||
kind: ClusterRole
|
kind: ClusterRole
|
||||||
|
|
Loading…
Add table
Reference in a new issue