{{- if .Values.reloader.deployment.env.secret -}}
apiVersion: v1
kind: Secret
metadata:
  name: {{ template "reloader-fullname" . }}
  namespace: {{ .Values.namespace | default .Release.Namespace }}
type: Opaque
data:
  {{ if .Values.reloader.deployment.env.secret.ALERT_ON_RELOAD -}}
  ALERT_ON_RELOAD: {{ .Values.reloader.deployment.env.secret.ALERT_ON_RELOAD | b64enc | quote }}
  {{ end }}
  {{- if .Values.reloader.deployment.env.secret.ALERT_SINK -}}
  ALERT_SINK: {{ .Values.reloader.deployment.env.secret.ALERT_SINK | b64enc | quote }}
  {{ end }}
  {{- if .Values.reloader.deployment.env.secret.ALERT_WEBHOOK_URL -}}
  ALERT_WEBHOOK_URL: {{ .Values.reloader.deployment.env.secret.ALERT_WEBHOOK_URL | b64enc | quote }}
  {{ end }}
  {{- if .Values.reloader.deployment.env.secret.ALERT_ADDITIONAL_INFO -}}
  ALERT_ADDITIONAL_INFO: {{ .Values.reloader.deployment.env.secret.ALERT_ADDITIONAL_INFO | b64enc | quote }}
  {{ end }}
{{ end }}
