Hung-Wei Chiu | 7d8e794 | 2021-10-05 15:26:36 -0700 | [diff] [blame] | 1 | {{/* |
| 2 | # Copyright 2020-present Open Networking Foundation |
| 3 | |
Charles Chan | d1b4bf9 | 2022-02-02 16:27:10 -0800 | [diff] [blame] | 4 | # SPDX-License-Identifier: Apache-2.0 |
Hung-Wei Chiu | 7d8e794 | 2021-10-05 15:26:36 -0700 | [diff] [blame] | 5 | */}} |
| 6 | |
Charles Chan | f65aca5 | 2022-02-03 00:22:48 -0800 | [diff] [blame] | 7 | {{- if .Values.image }} |
Hung-Wei Chiu | 7d8e794 | 2021-10-05 15:26:36 -0700 | [diff] [blame] | 8 | {{- if .Values.image.credential }} |
| 9 | --- |
| 10 | kind: Secret |
| 11 | apiVersion: v1 |
| 12 | metadata: |
| 13 | name: "{{ .Values.image.credential.secretName }}" |
| 14 | labels: |
| 15 | release: {{ .Release.Name }} |
| 16 | type: kubernetes.io/dockerconfigjson |
| 17 | data: |
| 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 Chan | f65aca5 | 2022-02-03 00:22:48 -0800 | [diff] [blame] | 20 | {{- end }} |