aboutsummaryrefslogtreecommitdiffstats
path: root/roles/onap-chaos-tests/templates/node-drain-rbac.yaml.j2
diff options
context:
space:
mode:
Diffstat (limited to 'roles/onap-chaos-tests/templates/node-drain-rbac.yaml.j2')
-rw-r--r--roles/onap-chaos-tests/templates/node-drain-rbac.yaml.j253
1 files changed, 53 insertions, 0 deletions
diff --git a/roles/onap-chaos-tests/templates/node-drain-rbac.yaml.j2 b/roles/onap-chaos-tests/templates/node-drain-rbac.yaml.j2
new file mode 100644
index 0000000..d7e4a78
--- /dev/null
+++ b/roles/onap-chaos-tests/templates/node-drain-rbac.yaml.j2
@@ -0,0 +1,53 @@
+---
+apiVersion: v1
+kind: ServiceAccount
+metadata:
+ name: node-drain-sa
+ namespace: {{ onap_namespace }}
+ labels:
+ name: node-drain-sa
+ app.kubernetes.io/part-of: litmus
+---
+apiVersion: rbac.authorization.k8s.io/v1
+kind: ClusterRole
+metadata:
+ name: node-drain-sa
+ labels:
+ name: node-drain-sa
+ app.kubernetes.io/part-of: litmus
+rules:
+- apiGroups: [""]
+ resources: ["pods","events"]
+ verbs: ["create","list","get","patch","update","delete","deletecollection"]
+- apiGroups: [""]
+ resources: ["pods/exec","pods/log","pods/eviction"]
+ verbs: ["list","get","create"]
+- apiGroups: ["batch"]
+ resources: ["jobs"]
+ verbs: ["create","list","get","delete","deletecollection"]
+- apiGroups: ["apps"]
+ resources: ["daemonsets"]
+ verbs: ["list","get","delete"]
+- apiGroups: ["litmuschaos.io"]
+ resources: ["chaosengines","chaosexperiments","chaosresults"]
+ verbs: ["create","list","get","patch","update"]
+- apiGroups: [""]
+ resources: ["nodes"]
+ verbs: ["patch","get","list"]
+---
+apiVersion: rbac.authorization.k8s.io/v1
+kind: ClusterRoleBinding
+metadata:
+ name: node-drain-sa
+ labels:
+ name: node-drain-sa
+ app.kubernetes.io/part-of: litmus
+roleRef:
+ apiGroup: rbac.authorization.k8s.io
+ kind: ClusterRole
+ name: node-drain-sa
+subjects:
+- kind: ServiceAccount
+ name: node-drain-sa
+ namespace: {{ onap_namespace }}
+