diff --git a/pkg/chartutil/create.go b/pkg/chartutil/create.go index 3a8f3cc5a..d4cc78968 100644 --- a/pkg/chartutil/create.go +++ b/pkg/chartutil/create.go @@ -110,6 +110,7 @@ const defaultValues = `# Default values for %s. replicaCount: 1 image: + registry: "" repository: nginx pullPolicy: IfNotPresent # Overrides the image tag whose default is the chart appVersion. @@ -308,7 +309,11 @@ spec: - name: {{ .Chart.Name }} securityContext: {{- toYaml .Values.securityContext | nindent 12 }} + {{- if .Values.image.registry }} + image: "{{ .Values.image.registry }}/{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}" + {{- else }} image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}" + {{- end }} imagePullPolicy: {{ .Values.image.pullPolicy }} ports: - name: http