Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions deploy/Chart/templates/controller/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@ spec:
containers:
- name: controller
image: "{{ include "radius.image" (dict "image" .Values.controller.image "tag" (.Values.controller.tag | default .Values.global.imageTag | default $appversion) "global" .Values.global) }}"
imagePullPolicy: 'Always'
args:
- '--config-file'
- '/etc/config/controller-config.yaml'
Expand Down Expand Up @@ -132,4 +131,4 @@ spec:
{{- if .Values.global.appendRootCA.cert }}
- name: ssl-certs
emptyDir: {}
{{- end }}
{{- end }}
1 change: 0 additions & 1 deletion deploy/Chart/templates/dashboard/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ spec:
containers:
- name: dashboard
image: "{{ include "radius.image" (dict "image" .Values.dashboard.image "tag" (.Values.dashboard.tag | default .Values.global.imageTag | default $appversion) "global" .Values.global) }}"
imagePullPolicy: Always
env:
- name: NODE_ENV
value: {{ .Values.dashboard.nodeEnv | default "development" | quote }}
Expand Down
1 change: 0 additions & 1 deletion deploy/Chart/templates/database/statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ spec:
securityContext:
allowPrivilegeEscalation: false
image: "{{ include "radius.image" (dict "image" .Values.database.image "tag" (.Values.database.tag | default .Values.global.imageTag | default "latest") "global" .Values.global) }}"
imagePullPolicy: IfNotPresent
resources:
requests:
memory: "{{ .Values.database.resources.requests.memory }}"
Expand Down
3 changes: 1 addition & 2 deletions deploy/Chart/templates/pre-upgrade/job.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ spec:
containers:
- name: pre-upgrade
image: "{{ include "radius.image" (dict "image" .Values.preupgrade.image "tag" (.Values.preupgrade.tag | default .Values.global.imageTag | default $appversion) "global" .Values.global) }}"
imagePullPolicy: 'Always'
env:
- name: TARGET_VERSION
value: "{{ .Values.preupgrade.targetVersion | default .Chart.AppVersion }}"
Expand Down Expand Up @@ -70,4 +69,4 @@ spec:
{{- toYaml .Values.preupgrade.securityContext | nindent 10 }}
securityContext:
{{- toYaml .Values.preupgrade.podSecurityContext | nindent 8 }}
{{- end }}
{{- end }}
25 changes: 25 additions & 0 deletions deploy/Chart/tests/helpers_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ templates:
- de/deployment.yaml
- dashboard/deployment.yaml
- database/statefulset.yaml
- pre-upgrade/job.yaml
tests:
- it: should use default ghcr.io registry when global.imageRegistry is not set
set:
Expand Down Expand Up @@ -324,6 +325,30 @@ tests:
value: internal.registry.io/mirror/postgres:14-alpine
template: database/statefulset.yaml

- it: should not set imagePullPolicy on chart-managed containers
templates:
- controller/deployment.yaml
- dashboard/deployment.yaml
- database/statefulset.yaml
- pre-upgrade/job.yaml
set:
dashboard.enabled: true
database.enabled: true
preupgrade.enabled: true
asserts:
- isNull:
path: spec.template.spec.containers[0].imagePullPolicy
template: controller/deployment.yaml
- isNull:
path: spec.template.spec.containers[0].imagePullPolicy
template: dashboard/deployment.yaml
- isNull:
path: spec.template.spec.containers[0].imagePullPolicy
template: database/statefulset.yaml
- isNull:
path: spec.template.spec.containers[0].imagePullPolicy
template: pre-upgrade/job.yaml

- it: should handle mixed scenario - some with full paths, some without
set:
global.imageRegistry: default-registry.io
Expand Down
Loading