12 lines
563 B
YAML
12 lines
563 B
YAML
{{- range $name, $settings := .Values.registryCredentials }}
|
|
apiVersion: v1
|
|
kind: Secret
|
|
metadata:
|
|
name: {{ include "cnpg-cluster.fullname" $ }}-{{ $name }}
|
|
labels:
|
|
{{- include "cnpg-cluster.labels" $ | nindent 4 }}
|
|
type: kubernetes.io/dockerconfigjson
|
|
data:
|
|
.dockerconfigjson: "{{- printf "{\"auths\":{\"%s\":{\"username\":\"%s\",\"password\":\"%s\",\"email\":\"%s\",\"auth\":\"%s\"}}}" $settings.registry $settings.username $settings.password $settings.email (printf "%s:%s" $settings.username $settings.password | b64enc) | b64enc }}"
|
|
---
|
|
{{- end }}
|