apiVersion: v1
kind: ConfigMap
metadata:
  name: {{ template "rancher.fullname" . }}-pre-upgrade
  namespace: {{ .Release.Namespace }}
  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
data:
  pre-upgrade-hook.sh: |-
{{ $.Files.Get "scripts/pre-upgrade-hook.sh" | indent 4 }}
