From 6a1e925d3cc14b76f3a9633cbf05dfa2fe5be7d1 Mon Sep 17 00:00:00 2001 From: B3nBeng <91530842+B3nBeng@users.noreply.github.com> Date: Mon, 16 Jan 2023 17:03:25 +0100 Subject: [PATCH 1/3] Update deployment.yaml - Add volumeMounts for initContainers - Add option "offline" for wiki container when we want to use sideload (Need to add "offline: $(OFFLINE_ACTIVE)" into /wiki/config.yml for the docker image) --- dev/helm/templates/deployment.yaml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/dev/helm/templates/deployment.yaml b/dev/helm/templates/deployment.yaml index 62f02bc7..c49c6325 100644 --- a/dev/helm/templates/deployment.yaml +++ b/dev/helm/templates/deployment.yaml @@ -32,6 +32,10 @@ spec: command: [ "sh", "-c" ] args: [ "mkdir -p /wiki/data/sideload && git clone --depth=1 {{ .Values.sideload.repoURL }} /wiki/data/sideload/" ] {{- end }} + {{- with .Values.volumeMounts }} + volumeMounts: + {{- toYaml . | nindent 12 }} + {{- end }} containers: - name: {{ .Chart.Name }} securityContext: @@ -71,6 +75,8 @@ spec: {{- end }} - name: HA_ACTIVE value: {{ .Values.replicaCount | int | le 2 | quote }} + - name: OFFLINE_ACTIVE + value: "{{ default "false" .Values.offline }}" {{- with .Values.volumeMounts }} volumeMounts: {{- toYaml . | nindent 12 }} From cf273a7674c5d1731b97cc309a43fefa0baf4b5d Mon Sep 17 00:00:00 2001 From: B3nBeng <91530842+B3nBeng@users.noreply.github.com> Date: Mon, 16 Jan 2023 17:16:27 +0100 Subject: [PATCH 2/3] Update values.yaml Added option "offline", necessary when activating the sideload. --- dev/helm/values.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/dev/helm/values.yaml b/dev/helm/values.yaml index a61d53e0..2000424b 100644 --- a/dev/helm/values.yaml +++ b/dev/helm/values.yaml @@ -4,6 +4,8 @@ replicaCount: 1 revisionHistoryLimit: 10 +# If sideload is enable, set the offline parameter to true +offline: false image: repository: requarks/wiki From 484732119f082a2ee75facc3f758aa9faf899928 Mon Sep 17 00:00:00 2001 From: Anthony B <91530842+B3nBeng@users.noreply.github.com> Date: Tue, 17 Jan 2023 09:35:05 +0100 Subject: [PATCH 3/3] Update config.yml Added option "offline" --- dev/build/config.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/dev/build/config.yml b/dev/build/config.yml index d9e58761..55239e39 100644 --- a/dev/build/config.yml +++ b/dev/build/config.yml @@ -18,3 +18,4 @@ ssl: logLevel: $(LOG_LEVEL:info) logFormat: $(LOG_FORMAT:default) ha: $(HA_ACTIVE) +offline: $(OFFLINE_ACTIVE:false)