diff --git a/charts/regcred/templates/secret.yaml b/charts/regcred/templates/secret.yaml index f0fddb8..63b74f2 100644 --- a/charts/regcred/templates/secret.yaml +++ b/charts/regcred/templates/secret.yaml @@ -1,13 +1,14 @@ -apiVersion: v1 +{{- if .Values.registryCredentials -}} kind: Secret +type: kubernetes.io/dockerconfigjson +apiVersion: v1 metadata: - name: {{ include "postgrest.fullname" . }}-secret - namespace: {{ $.Release.Namespace }} -stringData: - db-uri.txt: |- - {{- required "Missing postgrest.dbUri" .Values.postgrest.dbUri | nindent 4 }} - jwt-secret.txt: |- - {{- required "postgrest.jwtSecret" .Values.postgrest.jwtSecret | nindent 4 }} - {{- if .Values.secret }} - {{- toYaml .Values.secret | nindent 2 }} - {{- end }} + name: {{ include "regcred.fullname" . }} + labels: + {{- include "regcred.labels" . | nindent 4}} + {{- with .Values.extraLabels }} + {{- toYaml . | nindent 4 }} + {{- end }} +data: + .dockerconfigjson: {{- include "regcred.registryCredentials" .Values.registryCredentials | nindent 4 }} +{{- end -}}