blob: 1ce44dc7084317b6bfa366ac2751374bc38b74de [file] [log] [blame]
{{/*
# Copyright 2020-present Open Networking Foundation
# SPDX-License-Identifier: Apache-2.0
*/}}
{{- if .Values.image }}
{{- if .Values.image.credential }}
---
kind: Secret
apiVersion: v1
metadata:
name: "{{ .Values.image.credential.secretName }}"
labels:
release: {{ .Release.Name }}
type: kubernetes.io/dockerconfigjson
data:
.dockerconfigjson: {{ printf `{"auths":{%s:{"auth":"%s"}}}` (.Values.image.credential.registry | quote) (printf "%s:%s" .Values.image.credential.username .Values.image.credential.password | b64enc) | b64enc | quote }}
{{- end }}
{{- end }}