Hung-Wei Chiu | 7d8e794 | 2021-10-05 15:26:36 -0700 | [diff] [blame] | 1 | {{/* |
| 2 | # Copyright 2020-present Open Networking Foundation |
| 3 | |
| 4 | # SPDX-License-Identifier: LicenseRef-ONF-Member-Only-1.0 |
| 5 | */}} |
| 6 | |
| 7 | {{- if .Values.image.credential }} |
| 8 | --- |
| 9 | kind: Secret |
| 10 | apiVersion: v1 |
| 11 | metadata: |
| 12 | name: "{{ .Values.image.credential.secretName }}" |
| 13 | labels: |
| 14 | release: {{ .Release.Name }} |
| 15 | type: kubernetes.io/dockerconfigjson |
| 16 | data: |
| 17 | .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 }} |
| 18 | {{- end }} |