apiVersion: v1
kind: ServiceAccount
metadata:
  name: scheduler
  labels:
    name: scheduler
---
apiVersion: rbac.authorization.k8s.io/v1beta1
kind: Role
metadata:
  name: scheduler
  labels:
    name: scheduler
rules:
- apiGroups: [""]
  resources: ["pods","events", "configmaps","services"]
  verbs: ["create","get","list","delete","update","patch"]
- apiGroups: ["apps"]
  resources: ["replicasets","deployments"]
  verbs: ["get","list"]
- apiGroups: ["litmuschaos.io"]
  resources: ["chaosengines","chaosschedules","chaosengines/finalizers","chaosschedules/finalizers"]
  verbs: ["get","create","update","patch","delete","list","watch","deletecollection"]
---
apiVersion: rbac.authorization.k8s.io/v1beta1
kind: RoleBinding
metadata:
  name: scheduler
  labels:
    name: scheduler
roleRef:
  apiGroup: rbac.authorization.k8s.io
  kind: Role
  name: scheduler
subjects:
- kind: ServiceAccount
  name: scheduler
