Skip to content

Commit

Permalink
move bootstrap to init container
Browse files Browse the repository at this point in the history
  • Loading branch information
mikkeschiren committed Aug 1, 2023
1 parent 02bb63e commit 730bdab
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 3 deletions.
2 changes: 1 addition & 1 deletion charts/directus/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ type: application
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 0.5.1
version: 0.5.2

# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
Expand Down
21 changes: 19 additions & 2 deletions charts/directus/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,19 +27,36 @@ spec:
serviceAccountName: {{ include "directus.serviceAccountName" . }}
securityContext:
{{- toYaml .Values.podSecurityContext | nindent 8 }}
{{- if .Values.initContainers }}
initContainers:
- name: {{ .Chart.Name }}-init
securityContext:
{{- toYaml .Values.securityContext | nindent 12 }}
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
command: ["node"]
args: ["/directus/cli.js", "bootstrap"]
env:
{{- if .Values.ingress.enabled }}
- name: PUBLIC_URL
value: http{{ if .Values.ingress.tls }}s{{ end }}://{{(index .Values.ingress.hosts 0).host }}
{{- end }}
{{- if .Values.extraEnvVars }}
{{- tpl (toYaml .Values.extraEnvVars) $ | nindent 12 }}
{{- end }}
{{- if .Values.initContainers }}
{{ toYaml .Values.initContainers | indent 8 }}
{{- end }}
containers:
{{- if .Values.sidecars }}
{{ toYaml .Values.sidecars | indent 8 }}
{{- end }}
{{- end }}
- name: {{ .Chart.Name }}
securityContext:
{{- toYaml .Values.securityContext | nindent 12 }}
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
command: ["node"]
args: ["/directus/cli.js", "start"]
env:
{{- if .Values.ingress.enabled }}
- name: PUBLIC_URL
Expand Down

0 comments on commit 730bdab

Please sign in to comment.