apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
  labels:
    kubernetes.io/bootstrapping: rbac-defaults
  name: system-controller-kangal-controller-{{ $.Release.Namespace }}
rules:

  - apiGroups:
      - batch
    resources:
      - jobs
    verbs:
      - create
      - get
      - list
      - watch

  - apiGroups:
      - kangal.hellofresh.com
    resources:
      - loadtests
    verbs:
      - update
      - create
      - get
      - watch
      - list
      - delete

  - apiGroups:
      - kangal.hellofresh.com
      - extensions
    resources:
      - loadtests/status
    verbs:
      - update

  - apiGroups:
      - ""
    resources:
      - namespaces
    verbs:
      - get
      - list
      - create
      - update
      - watch

  - apiGroups:
      - ""
    resources:
      - events
    verbs:
      - create
      - patch
      - update

  - apiGroups:
      - ""
    resources:
      - pods
    verbs:
      - get
      - create
      - list
      - watch

  - apiGroups:
      - ""
    resources:
      - pods/log
    verbs:
      - get

  - apiGroups:
      - ""
    resources:
      - configmaps
    verbs:
      - get
      - create

  - apiGroups:
      - ""
    resources:
      - services
    verbs:
      - create
      - list
      - delete

  - apiGroups:
      - ""
    resources:
      - secrets
    verbs:
      - get
      - list
      - create
      - delete
