From de19d379532f05d742535e6c6f48c18fceb9b1b4 Mon Sep 17 00:00:00 2001 From: Jeffrey Forman <58740+jforman@users.noreply.github.com> Date: Sat, 19 Sep 2020 20:32:36 -0400 Subject: [PATCH] fix: helm - image tag and imagePullPolicy to correctly inherit from values (#2472) * fix image tag and imagePullPolicy to correcy inherit from values, with sane defaults (ifNotPresent and latest) * fix default service ports for http and https in service.yaml Co-authored-by: Jeffrey Forman ***NO_CI*** --- dev/helm/templates/deployment.yaml | 4 ++-- dev/helm/templates/service.yaml | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/dev/helm/templates/deployment.yaml b/dev/helm/templates/deployment.yaml index 7611db99..41b8805e 100644 --- a/dev/helm/templates/deployment.yaml +++ b/dev/helm/templates/deployment.yaml @@ -25,8 +25,8 @@ spec: - name: {{ .Chart.Name }} securityContext: {{- toYaml .Values.securityContext | nindent 12 }} - image: "{{ .Values.image.repository }}:{{ .Chart.AppVersion }}" - imagePullPolicy: {{ .Values.image.pullPolicy }} + image: "{{ .Values.image.repository }}:{{ default "latest" .Values.image.tag }}" + imagePullPolicy: {{ default "IfNotPresent" .Values.image.imagePullPolicy }} env: - name: DB_TYPE value: postgres diff --git a/dev/helm/templates/service.yaml b/dev/helm/templates/service.yaml index d5c9e7a3..5b27cb7e 100644 --- a/dev/helm/templates/service.yaml +++ b/dev/helm/templates/service.yaml @@ -12,11 +12,11 @@ metadata: spec: type: {{.Values.service.type}} ports: - - port: {{.Values.service.port}} + - port: {{ default "80" .Values.service.port}} targetPort: http protocol: TCP name: http - - port: {{.Values.service.httpsPort}} + - port: {{ default "443" .Values.service.httpsPort}} targetPort: http protocol: TCP name: https