From 3b716b6d735b5a3d8d92b28d25ab8be7a9083609 Mon Sep 17 00:00:00 2001 From: Don Bowman Date: Wed, 6 Feb 2019 12:10:30 -0500 Subject: [PATCH] Add imagePullSecret to the `default` helm create template This relates to [#3529](https://github.com/helm/helm/issues/3529). It adds image.pullSecret to the default generate blank chart when the user does `helm create`. Signed-off-by: Don Bowman --- pkg/chartutil/create.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pkg/chartutil/create.go b/pkg/chartutil/create.go index 9af4b8f45..2577527b3 100644 --- a/pkg/chartutil/create.go +++ b/pkg/chartutil/create.go @@ -62,6 +62,7 @@ image: repository: nginx tag: stable pullPolicy: IfNotPresent + # pullSecret: my_secret nameOverride: "" fullnameOverride: "" @@ -189,6 +190,10 @@ spec: app.kubernetes.io/name: {{ include ".name" . }} app.kubernetes.io/instance: {{ .Release.Name }} spec: + {{- if .Values.image.pullSecret -}} + imagePullSecrets: + - name: {{ .Values.image.pullSecret }} + {{- end }} containers: - name: {{ .Chart.Name }} image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"