helm-charts/charts/cnpg-cluster/templates/registry-credentials.secret.yaml
devthejo 103cc957ca
Some checks failed
Mirror Sync / codeberg (push) Successful in 8s
🎉 Release Commit / create release using commit-and-tag-version (push) Has been cancelled
feat: cnpg-cluster
2024-07-19 00:47:26 +02:00

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 }}