Files
litmus-hub/charts/generic/pod-autoscaler/rbac.yaml
Shubham Chaudhary 6ced128ee5 chore(permissions): sync the experiment and rbac permissions (#406)
* chore(permissions): sync the experiment and rbac permissions

Signed-off-by: shubhamchaudhary <shubham.chaudhary@mayadata.io>

* Add "statefulsets" in pod autoscaler permissions

Signed-off-by: udit <udit.gaurav@mayadata.io>

Co-authored-by: udit <udit.gaurav@mayadata.io>
2021-01-04 14:26:45 +05:30

47 lines
1.2 KiB
YAML

---
apiVersion: v1
kind: ServiceAccount
metadata:
name: pod-autoscaler-sa
namespace: default
labels:
name: pod-autoscaler-sa
app.kubernetes.io/part-of: litmus
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: pod-autoscaler-sa
labels:
name: pod-autoscaler-sa
app.kubernetes.io/part-of: litmus
rules:
- apiGroups: [""]
resources: ["pods","pods/exec","pods/log","events"]
verbs: ["create","list","get","patch","update","delete","deletecollection"]
- apiGroups: ["batch"]
resources: ["jobs"]
verbs: ["create","list","get","delete","deletecollection"]
- apiGroups: ["apps"]
resources: ["deployments","statefulsets"]
verbs: ["list","get","patch","update"]
- apiGroups: ["litmuschaos.io"]
resources: ["chaosengines","chaosexperiments","chaosresults"]
verbs: ["create","list","get","patch","update"]
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: pod-autoscaler-sa
labels:
name: pod-autoscaler-sa
app.kubernetes.io/part-of: litmus
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: pod-autoscaler-sa
subjects:
- kind: ServiceAccount
name: pod-autoscaler-sa
namespace: default