From 37080f4c147e5b260578abe5f20d3ce32bbec71b Mon Sep 17 00:00:00 2001 From: Sebastian Petermann Date: Fri, 29 Nov 2024 17:45:23 +0100 Subject: [PATCH] feat: add initContainers to deployment --- dev/helm/templates/deployment.yaml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/dev/helm/templates/deployment.yaml b/dev/helm/templates/deployment.yaml index e6dc786baf..af7dc91f22 100644 --- a/dev/helm/templates/deployment.yaml +++ b/dev/helm/templates/deployment.yaml @@ -24,8 +24,9 @@ spec: serviceAccountName: {{ include "wiki.serviceAccountName" . }} securityContext: {{- toYaml .Values.podSecurityContext | nindent 8 }} - {{- if .Values.sideload.enabled }} + {{- if or .Values.sideload.enabled .Values.initContainers }} initContainers: + {{- if or .Values.sideload.enabled }} - name: {{ .Chart.Name }}-sideload securityContext: {{- toYaml .Values.sideload.securityContext | nindent 12 }} @@ -37,6 +38,10 @@ spec: args: [ "mkdir -p /wiki/data/sideload && git clone --depth=1 {{ .Values.sideload.repoURL }} /wiki/data/sideload/" ] resources: {{- toYaml .Values.sideload.resources | nindent 12 }} + {{- end }} + {{- with .Values.initContainers }} + {{- toYaml . | nindent 8 }} + {{- end }} {{- end }} containers: - name: {{ .Chart.Name }}