Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
5 changes: 5 additions & 0 deletions charts/prefect-server/templates/pre-upgrade-hook.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@ spec:
secretKeyRef:
name: {{ include "server.postgres-string-secret-name" . }}
key: connection-string
- name: HOME
value: /home/prefect
{{- if .Values.global.prefect.env }}
{{- include "common.tplvalues.render" (dict "value" .Values.global.prefect.env "context" $) | nindent 8 }}
{{- end }}
Expand Down Expand Up @@ -80,4 +82,7 @@ spec:
- name: {{ . }}
{{- end }}
{{- end }}
{{- with .Values.backgroundServices.podSecurityContext }}
{{- include . | nindent 4 }}
{{- end }}
{{- end }}
20 changes: 20 additions & 0 deletions charts/prefect-server/tests/pre_upgrade_hook_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -280,3 +280,23 @@ tests:
equal:
path: .spec.template.spec.tolerations[0].key
value: key1

- it: Should contain HOME env variable for pre-upgrade hook
asserts:
- template: pre-upgrade-hook.yaml
contains:
path: .spec.template.spec.containers[0].env
content:
name: HOME
value: /home/prefect

- it: Should set correct pod security context for pre-upgrade hook
asserts:
- template: pre-upgrade-hook.yaml
equal:
path: .spec.template.spec.securityContext
value:
runAsUser: 1001
fsGroup: 1001
runAsNonRoot: true

Loading