apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
  name: watermarkpodautoscaler
rules:
- apiGroups:
  - ""
  resources:
  - configmaps
  verbs:
  - create
- apiGroups:
  - ""
  resources:
  - configmaps
  resourceNames:
    - watermarkpodautoscaler-lock
  verbs:
  - update
  - get
- apiGroups:
  - ""
  resources:
  - events
  verbs:
  - 'create'
- apiGroups:
  - ""
  resources:
  - pods
  verbs:
  - get
- apiGroups:
  - apps
  - extensions
  resources:
  - replicasets/scale
  - deployments/scale
  - statefulsets/scale
  verbs:
  - 'update'
  - 'get'
- apiGroups:
  - apps
  resourceNames:
  - watermarkpodautoscalers
  resources:
  - deployments/finalizers
  verbs:
  - update
- apiGroups:
  - datadoghq.com
  resources:
  - watermarkpodautoscalers
  - watermarkpodautoscalers/status
  verbs:
  - '*'
