{{- if .Values.app.key }}
apiVersion: v1
kind: Secret
metadata:
  name: {{ printf "%s-%s" .Release.Name "app"  }}
  labels:
    app: {{ printf "%s-%s" .Release.Name "app"  }}
    chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
    release: "{{ .Release.Name }}"
    heritage: "{{ .Release.Service }}"
type: Opaque
data:
  app-key: {{ .Values.app.key | b64enc | quote }}
{{- end }}
