From eb34437f30717a48aa9fc3a68b45785ebec61cc4 Mon Sep 17 00:00:00 2001 From: shivkumar dudhani Date: Sat, 11 Jan 2020 11:14:47 -0800 Subject: [PATCH] add annotation to variable --- test/policy/generate/variable.yaml | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/test/policy/generate/variable.yaml b/test/policy/generate/variable.yaml index 03850b09dd..41255b0a10 100644 --- a/test/policy/generate/variable.yaml +++ b/test/policy/generate/variable.yaml @@ -16,6 +16,9 @@ spec: kind: ClusterRole name: "ns-owner-{{request.object.metadata.name}}-{{request.userInfo.username}}" data: + metadata: + annotations: + nirmata.io/ns-creator: "{{serviceAccountName}}" rules: - apiGroups: [""] resources: ["namespaces"] @@ -31,6 +34,9 @@ spec: kind: ClusterRoleBinding name: "ns-owner-{{request.object.metadata.name}}-{{request.userInfo.username}}-binding" data: + metadata: + annotations: + nirmata.io/ns-creator: "{{serviceAccountName}}" roleRef: apiGroup: rbac.authorization.k8s.io kind: ClusterRole @@ -50,6 +56,9 @@ spec: name: "ns-admin-{{request.object.metadata.name}}-{{request.userInfo.username}}-binding" namespace: "{{request.object.metadata.name}}" data: + metadata: + annotations: + nirmata.io/ns-creator: "{{serviceAccountName}}" roleRef: apiGroup: rbac.authorization.k8s.io kind: ClusterRole @@ -57,4 +66,4 @@ spec: subjects: - kind: ServiceAccount name: "{{serviceAccountName}}" - namespace: "{{serviceAccountNamespace}}" + namespace: "{{serviceAccountNamespace}}" \ No newline at end of file