apiVersion: v1
kind: ServiceAccount
metadata:
  name: keel
  namespace: kube-system

---

apiVersion: rbac.authorization.k8s.io/v1beta1
kind: ClusterRole
metadata:
  name: keel-clusterrole
rules:
  - apiGroups:
      - ""
    resources:
      - namespaces
    verbs:
      - watch
      - list
  - apiGroups:
      - ""
      - extensions
      - apps
    resources:
      - pods
      - replicasets
      - replicacontrollers
      - statefulsets
      - deployments
      - jobs
    verbs:
      - get
      - watch
      - list
      - update

---

apiVersion: rbac.authorization.k8s.io/v1beta1
kind: ClusterRoleBinding
metadata:
  name: keel-clusterrole-binding
roleRef:
  apiGroup: rbac.authorization.k8s.io
  kind: ClusterRole
  name: keel-clusterrole
subjects:
  - kind: ServiceAccount
    name: keel
    namespace: kube-system
