diff --git a/charts/cht-chart-4x/Chart.yaml b/charts/cht-chart-4x/Chart.yaml index 69c7c4e..91791d4 100644 --- a/charts/cht-chart-4x/Chart.yaml +++ b/charts/cht-chart-4x/Chart.yaml @@ -6,6 +6,6 @@ icon: https://avatars.githubusercontent.com/u/474424?s=200&v=4 type: application -version: 1.1.1 +version: 1.2.0 appVersion: "" diff --git a/charts/cht-chart-4x/templates/api-deployment.yaml b/charts/cht-chart-4x/templates/api-deployment.yaml index 8e3d6b1..f5e749a 100644 --- a/charts/cht-chart-4x/templates/api-deployment.yaml +++ b/charts/cht-chart-4x/templates/api-deployment.yaml @@ -33,6 +33,7 @@ spec: - name: API_PORT value: '5988' image: {{ .Values.upstream_servers.docker_registry }}/cht-api:{{ .Values.cht_image_tag }} + {{ if eq .Values.cache_images false}}imagePullPolicy: Always{{ end }} name: cht-api ports: - containerPort: 5988 diff --git a/charts/cht-chart-4x/templates/couchdb-n-deployment.yaml b/charts/cht-chart-4x/templates/couchdb-n-deployment.yaml index 5e1c9d2..6d0d21a 100644 --- a/charts/cht-chart-4x/templates/couchdb-n-deployment.yaml +++ b/charts/cht-chart-4x/templates/couchdb-n-deployment.yaml @@ -37,6 +37,7 @@ spec: containers: - name: cht-couchdb-{{ $nodeNumber }} image: {{ $root.Values.upstream_servers.docker_registry }}/cht-couchdb:{{ $root.Values.cht_image_tag }} + {{ if eq $root.Values.cache_images false}}imagePullPolicy: Always{{ end }} ports: - containerPort: 5984 env: diff --git a/charts/cht-chart-4x/templates/couchdb-single-deployment.yaml b/charts/cht-chart-4x/templates/couchdb-single-deployment.yaml index 745787c..c270a6f 100644 --- a/charts/cht-chart-4x/templates/couchdb-single-deployment.yaml +++ b/charts/cht-chart-4x/templates/couchdb-single-deployment.yaml @@ -58,6 +58,7 @@ spec: - name: SVC_NAME value: couchdb.{{ .Values.namespace }}.svc.cluster.local image: {{ .Values.upstream_servers.docker_registry }}/cht-couchdb:{{ .Values.cht_image_tag }} + {{ if eq .Values.cache_images false}}imagePullPolicy: Always{{ end }} name: cht-couchdb ports: - containerPort: 5984 diff --git a/charts/cht-chart-4x/templates/haproxy-deployment.yaml b/charts/cht-chart-4x/templates/haproxy-deployment.yaml index f344384..1e4f9e0 100644 --- a/charts/cht-chart-4x/templates/haproxy-deployment.yaml +++ b/charts/cht-chart-4x/templates/haproxy-deployment.yaml @@ -39,6 +39,7 @@ spec: - name: HEALTHCHECK_ADDR value: healthcheck.{{ .Values.namespace }}.svc.cluster.local image: {{ .Values.upstream_servers.docker_registry }}/cht-haproxy:{{ .Values.cht_image_tag }} + {{ if eq .Values.cache_images false}}imagePullPolicy: Always{{ end }} name: cht-haproxy ports: - containerPort: 5984 diff --git a/charts/cht-chart-4x/templates/healthcheck-deployment.yaml b/charts/cht-chart-4x/templates/healthcheck-deployment.yaml index 8519ba5..4c2c8ba 100644 --- a/charts/cht-chart-4x/templates/healthcheck-deployment.yaml +++ b/charts/cht-chart-4x/templates/healthcheck-deployment.yaml @@ -33,6 +33,7 @@ spec: name: cht-couchdb-credentials key: COUCHDB_USER image: {{ .Values.upstream_servers.docker_registry }}/cht-haproxy-healthcheck:{{ .Values.cht_image_tag }} + {{ if eq .Values.cache_images false}}imagePullPolicy: Always{{ end }} name: cht-haproxy-healthcheck resources: {} ports: diff --git a/charts/cht-chart-4x/templates/sentinel-deployment.yaml b/charts/cht-chart-4x/templates/sentinel-deployment.yaml index 28e8bab..02a0835 100644 --- a/charts/cht-chart-4x/templates/sentinel-deployment.yaml +++ b/charts/cht-chart-4x/templates/sentinel-deployment.yaml @@ -27,6 +27,7 @@ spec: - name: API_PORT value: '5988' image: {{ .Values.upstream_servers.docker_registry }}/cht-sentinel:{{ .Values.cht_image_tag }} + {{ if eq .Values.cache_images false}}imagePullPolicy: Always{{ end }} name: cht-sentinel resources: {} restartPolicy: Always diff --git a/charts/cht-chart-4x/templates/upgrade-service-deployment.yml b/charts/cht-chart-4x/templates/upgrade-service-deployment.yml index a8e22cf..81bde39 100644 --- a/charts/cht-chart-4x/templates/upgrade-service-deployment.yml +++ b/charts/cht-chart-4x/templates/upgrade-service-deployment.yml @@ -23,6 +23,7 @@ spec: serviceAccountName: cht-upgrade-service-user containers: - image: medicmobile/upgrade-service:{{ .Values.upgrade_service.tag }} + {{ if eq .Values.cache_images false}}imagePullPolicy: Always{{ end }} name: upgrade-service resources: {} env: diff --git a/charts/cht-chart-4x/values.yaml b/charts/cht-chart-4x/values.yaml index 5d16d9f..ceb1fb5 100644 --- a/charts/cht-chart-4x/values.yaml +++ b/charts/cht-chart-4x/values.yaml @@ -3,6 +3,11 @@ namespace: "" # e.g. "cht-dev-namespace" chtversion: 4.10.0 # cht_image_tag: 4.1.1-4.1.1 #- This is filled in automatically by the deploy script. Don't uncomment this line. +# If images are cached, the same image tag will never be pulled twice. For development, this means that it's not +# possible to upgrade to a newer version of the same branch, as the old image will always be reused. +# For development instances, set this value to false. +cache_images: true + # Don't change upstream-servers unless you know what you're doing. upstream_servers: docker_registry: "public.ecr.aws/medic"