{{- if or .Values.imagePullSecret.dockerconfigjson .Values.global.imagePullSecret.dockerconfigjson -}}
apiVersion: v1
kind: Secret
type: kubernetes.io/dockerconfigjson
metadata:
  name: {{ include "web-application.internal.imagePullSecretName" . }}
  labels: {{- include "web-application.labels" . | nindent 4 }}
data:
  .dockerconfigjson: {{ default .Values.global.imagePullSecret.dockerconfigjson .Values.imagePullSecret.dockerconfigjson }}
{{- end }}
