kind: ClusterRole
apiVersion: rbac.authorization.k8s.io/v1
metadata:
  name: {{ template "rancher.fullname" . }}-pre-upgrade
  labels: {{ include "rancher.labels" . | nindent 4 }}
  annotations:
    "helm.sh/hook": pre-upgrade
    "helm.sh/hook-weight": "-1"
    "helm.sh/hook-delete-policy": before-hook-creation,hook-succeeded
rules:
  - apiGroups: ["management.cattle.io"]
    resources:
      - "clusters"
      - "nodetemplates"
      - "clustertemplates"
    verbs: ["get", "list"]
