Skip to content

Commit

Permalink
feat(#29): adds values option to set imagePullPolicy: Always (#30)
Browse files Browse the repository at this point in the history
Fixes not being able to upgrade to a newer build of the same branch.

#29
  • Loading branch information
dianabarsan authored Nov 4, 2024
1 parent 15e98a0 commit 39ad21a
Show file tree
Hide file tree
Showing 9 changed files with 13 additions and 1 deletion.
2 changes: 1 addition & 1 deletion charts/cht-chart-4x/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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: ""
1 change: 1 addition & 0 deletions charts/cht-chart-4x/templates/api-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions charts/cht-chart-4x/templates/couchdb-n-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions charts/cht-chart-4x/templates/haproxy-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions charts/cht-chart-4x/templates/healthcheck-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
1 change: 1 addition & 0 deletions charts/cht-chart-4x/templates/sentinel-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
5 changes: 5 additions & 0 deletions charts/cht-chart-4x/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@ namespace: "<your-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"
Expand Down

0 comments on commit 39ad21a

Please sign in to comment.