From 72b0cfff568aff45dfc707cde23537d0b74dec33 Mon Sep 17 00:00:00 2001 From: David Dority <57111997+misterdorito@users.noreply.github.com> Date: Tue, 22 Sep 2020 10:09:41 -0400 Subject: [PATCH] Allow for parent chart to override registry secret to allow for using external secret tools. (#190) Co-authored-by: dorid --- charts/pega/templates/_pega-registry-secret.tpl | 10 ++++++++++ charts/pega/templates/pega-registry-secret.yaml | 9 +-------- 2 files changed, 11 insertions(+), 8 deletions(-) create mode 100644 charts/pega/templates/_pega-registry-secret.tpl diff --git a/charts/pega/templates/_pega-registry-secret.tpl b/charts/pega/templates/_pega-registry-secret.tpl new file mode 100644 index 000000000..5c9507225 --- /dev/null +++ b/charts/pega/templates/_pega-registry-secret.tpl @@ -0,0 +1,10 @@ +{{- define "pegaRegistryCredentialsSecretTemplate" }} +kind: Secret +apiVersion: v1 +metadata: + name: {{ template "pegaRegistrySecret" }} + namespace: {{ .Release.Namespace }} +data: + .dockerconfigjson: {{ template "imagePullSecret" . }} +type: kubernetes.io/dockerconfigjson +{{- end }} \ No newline at end of file diff --git a/charts/pega/templates/pega-registry-secret.yaml b/charts/pega/templates/pega-registry-secret.yaml index 9190d7a49..8e0c99ce1 100644 --- a/charts/pega/templates/pega-registry-secret.yaml +++ b/charts/pega/templates/pega-registry-secret.yaml @@ -1,8 +1 @@ -kind: Secret -apiVersion: v1 -metadata: - name: {{ template "pegaRegistrySecret" }} - namespace: {{ .Release.Namespace }} -data: - .dockerconfigjson: {{ template "imagePullSecret" . }} -type: kubernetes.io/dockerconfigjson +{{- include "pegaRegistryCredentialsSecretTemplate" . }}