apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
  name: flatcar-linux-update-operator
  namespace: reboot-coordinator
rules:
  - apiGroups:
      - ""
    resources:
      - nodes
    verbs:
      - get
      - list
      - watch
      - update
  - apiGroups:
      - ""
    resources:
      - configmaps
    verbs:
      - create
      - get
      - update
      - list
      - watch
  - apiGroups:
      - ""
    resources:
      - events
    verbs:
      - create
      - watch
  - apiGroups:
      - ""
    resources:
      - pods
    verbs:
      - get
      - list
      - delete      
  - apiGroups:
      - "apps"
    resources:
      - daemonsets
    verbs:
      - get
  - apiGroups:
      - policy
    resourceNames:
      - flatcar-linux-update-operator
    resources:
      - podsecuritypolicies
    verbs:
      - use
