blob: 1ce44dc7084317b6bfa366ac2751374bc38b74de [file] [log] [blame]
Hung-Wei Chiu7d8e7942021-10-05 15:26:36 -07001{{/*
2# Copyright 2020-present Open Networking Foundation
3
Charles Chand1b4bf92022-02-02 16:27:10 -08004# SPDX-License-Identifier: Apache-2.0
Hung-Wei Chiu7d8e7942021-10-05 15:26:36 -07005*/}}
6
Charles Chanf65aca52022-02-03 00:22:48 -08007{{- if .Values.image }}
Hung-Wei Chiu7d8e7942021-10-05 15:26:36 -07008{{- if .Values.image.credential }}
9---
10kind: Secret
11apiVersion: v1
12metadata:
13 name: "{{ .Values.image.credential.secretName }}"
14 labels:
15 release: {{ .Release.Name }}
16type: kubernetes.io/dockerconfigjson
17data:
18 .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 }}
19{{- end }}
Charles Chanf65aca52022-02-03 00:22:48 -080020{{- end }}