---
apiVersion: v1
kind: Secret
metadata:
  annotations:
    app.kubernetes.io/version: {{ $.Values.global.deployment_id | quote }}
    dokku.com/managed: "true"
    {{ include "print.annotations" (dict "config" $.Values.global "key" "secret") | indent 4 }}
  labels:
    app.kubernetes.io/instance: env-{{ $.Values.global.app_name }}.{{ $.Values.global.deployment_id }}
    app.kubernetes.io/name: env-{{ $.Values.global.app_name }}
    app.kubernetes.io/part-of: {{ $.Values.global.app_name }}
    {{ include "print.labels" (dict "config" $.Values.global "key" "secret") | indent 4 }}
  name: env-{{ $.Values.global.app_name }}.{{ $.Values.global.deployment_id }}
  namespace: {{ $.Values.global.namespace }}
{{- with .Values.global.secrets }}
data:
  {{- toYaml . | nindent 2 }}
{{- end }}
