{{- if $.Values.global.image.pull_secret_base64 }}
---
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: ims-{{ $.Values.global.app_name }}.{{ $.Values.global.deployment_id }}
    app.kubernetes.io/name: ims-{{ $.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: ims-{{ $.Values.global.app_name }}.{{ $.Values.global.deployment_id }}
  namespace: {{ $.Values.global.namespace }}
data:
  .dockerconfigjson: "{{ $.Values.global.image.pull_secret_base64 }}"
type: kubernetes.io/dockerconfigjson
{{- end }}
