diff --git a/nextcloud-aio-helm-chart/templates/nextcloud-aio-apache-deployment.yaml b/nextcloud-aio-helm-chart/templates/nextcloud-aio-apache-deployment.yaml index fd058e50..290ec273 100755 --- a/nextcloud-aio-helm-chart/templates/nextcloud-aio-apache-deployment.yaml +++ b/nextcloud-aio-helm-chart/templates/nextcloud-aio-apache-deployment.yaml @@ -26,7 +26,11 @@ spec: spec: initContainers: - name: init-volumes + {{- if or .Values.IMAGE_MIRROR_PREFIX .Values.ALPINE_IMAGE_ORG }} image: "{{ .Values.IMAGE_MIRROR_PREFIX }}{{ .Values.ALPINE_IMAGE_ORG}}/alpine" + {{- else }} + image: alpine + {{- end }} command: - chmod - "777" @@ -50,7 +54,7 @@ spec: - name: COLLABORA_HOST value: nextcloud-aio-collabora - name: NC_DOMAIN - value: "{{ .Values.NC_DOMAIN }}"FF + value: "{{ .Values.NC_DOMAIN }}" - name: NEXTCLOUD_HOST value: nextcloud-aio-nextcloud - name: NOTIFY_PUSH_HOST diff --git a/nextcloud-aio-helm-chart/templates/nextcloud-aio-clamav-deployment.yaml b/nextcloud-aio-helm-chart/templates/nextcloud-aio-clamav-deployment.yaml index 8d1c2cb5..4dfa7a96 100755 --- a/nextcloud-aio-helm-chart/templates/nextcloud-aio-clamav-deployment.yaml +++ b/nextcloud-aio-helm-chart/templates/nextcloud-aio-clamav-deployment.yaml @@ -27,7 +27,11 @@ spec: spec: initContainers: - name: init-subpath + {{- if or .Values.IMAGE_MIRROR_PREFIX .Values.ALPINE_IMAGE_ORG }} image: "{{ .Values.IMAGE_MIRROR_PREFIX }}{{ .Values.ALPINE_IMAGE_ORG}}/alpine" + {{- else }} + image: alpine + {{- end }} command: - mkdir - "-p" @@ -37,7 +41,11 @@ spec: - name: nextcloud-aio-clamav mountPath: /nextcloud-aio-clamav - name: init-volumes + {{- if or .Values.IMAGE_MIRROR_PREFIX .Values.ALPINE_IMAGE_ORG }} image: "{{ .Values.IMAGE_MIRROR_PREFIX }}{{ .Values.ALPINE_IMAGE_ORG}}/alpine" + {{- else }} + image: alpine + {{- end }} command: - chown - 100:100 diff --git a/nextcloud-aio-helm-chart/templates/nextcloud-aio-database-deployment.yaml b/nextcloud-aio-helm-chart/templates/nextcloud-aio-database-deployment.yaml index d985a81a..a8b514b8 100755 --- a/nextcloud-aio-helm-chart/templates/nextcloud-aio-database-deployment.yaml +++ b/nextcloud-aio-helm-chart/templates/nextcloud-aio-database-deployment.yaml @@ -26,7 +26,11 @@ spec: spec: initContainers: - name: init-subpath + {{- if or .Values.IMAGE_MIRROR_PREFIX .Values.ALPINE_IMAGE_ORG }} image: "{{ .Values.IMAGE_MIRROR_PREFIX }}{{ .Values.ALPINE_IMAGE_ORG}}/alpine" + {{- else }} + image: alpine + {{- end }} command: - mkdir - "-p" @@ -39,7 +43,11 @@ spec: - name: nextcloud-aio-database mountPath: /nextcloud-aio-database - name: init-volumes + {{- if or .Values.IMAGE_MIRROR_PREFIX .Values.ALPINE_IMAGE_ORG }} image: "{{ .Values.IMAGE_MIRROR_PREFIX }}{{ .Values.ALPINE_IMAGE_ORG}}/alpine" + {{- else }} + image: alpine + {{- end }} command: - chown - 999:999 diff --git a/nextcloud-aio-helm-chart/templates/nextcloud-aio-fulltextsearch-deployment.yaml b/nextcloud-aio-helm-chart/templates/nextcloud-aio-fulltextsearch-deployment.yaml index 651b6b90..540f1abf 100755 --- a/nextcloud-aio-helm-chart/templates/nextcloud-aio-fulltextsearch-deployment.yaml +++ b/nextcloud-aio-helm-chart/templates/nextcloud-aio-fulltextsearch-deployment.yaml @@ -27,7 +27,11 @@ spec: spec: initContainers: - name: init-volumes + {{- if or .Values.IMAGE_MIRROR_PREFIX .Values.ALPINE_IMAGE_ORG }} image: "{{ .Values.IMAGE_MIRROR_PREFIX }}{{ .Values.ALPINE_IMAGE_ORG}}/alpine" + {{- else }} + image: alpine + {{- end }} command: - chmod - "777" diff --git a/nextcloud-aio-helm-chart/templates/nextcloud-aio-nextcloud-deployment.yaml b/nextcloud-aio-helm-chart/templates/nextcloud-aio-nextcloud-deployment.yaml index 4794085c..c295a832 100755 --- a/nextcloud-aio-helm-chart/templates/nextcloud-aio-nextcloud-deployment.yaml +++ b/nextcloud-aio-helm-chart/templates/nextcloud-aio-nextcloud-deployment.yaml @@ -26,7 +26,11 @@ spec: spec: initContainers: - name: "delete-lost-found" + {{- if or .Values.IMAGE_MIRROR_PREFIX .Values.ALPINE_IMAGE_ORG }} image: "{{ .Values.IMAGE_MIRROR_PREFIX }}{{ .Values.ALPINE_IMAGE_ORG}}/alpine" + {{- else }} + image: alpine + {{- end }} command: - rm - "-rf" @@ -37,7 +41,11 @@ spec: - name: nextcloud-aio-nextcloud mountPath: /nextcloud-aio-nextcloud - name: init-volumes + {{- if or .Values.IMAGE_MIRROR_PREFIX .Values.ALPINE_IMAGE_ORG }} image: "{{ .Values.IMAGE_MIRROR_PREFIX }}{{ .Values.ALPINE_IMAGE_ORG}}/alpine" + {{- else }} + image: alpine + {{- end }} command: - chmod - "777" diff --git a/nextcloud-aio-helm-chart/templates/nextcloud-aio-notify-push-deployment.yaml b/nextcloud-aio-helm-chart/templates/nextcloud-aio-notify-push-deployment.yaml index 9e5d63fa..49864c10 100755 --- a/nextcloud-aio-helm-chart/templates/nextcloud-aio-notify-push-deployment.yaml +++ b/nextcloud-aio-helm-chart/templates/nextcloud-aio-notify-push-deployment.yaml @@ -26,7 +26,11 @@ spec: spec: initContainers: - name: init-volumes + {{- if or .Values.IMAGE_MIRROR_PREFIX .Values.ALPINE_IMAGE_ORG }} image: "{{ .Values.IMAGE_MIRROR_PREFIX }}{{ .Values.ALPINE_IMAGE_ORG}}/alpine" + {{- else }} + image: alpine + {{- end }} command: - chmod - "777" diff --git a/nextcloud-aio-helm-chart/templates/nextcloud-aio-onlyoffice-deployment.yaml b/nextcloud-aio-helm-chart/templates/nextcloud-aio-onlyoffice-deployment.yaml index 6fe576f6..d5a5c278 100755 --- a/nextcloud-aio-helm-chart/templates/nextcloud-aio-onlyoffice-deployment.yaml +++ b/nextcloud-aio-helm-chart/templates/nextcloud-aio-onlyoffice-deployment.yaml @@ -27,7 +27,11 @@ spec: spec: initContainers: - name: init-volumes + {{- if or .Values.IMAGE_MIRROR_PREFIX .Values.ALPINE_IMAGE_ORG }} image: "{{ .Values.IMAGE_MIRROR_PREFIX }}{{ .Values.ALPINE_IMAGE_ORG}}/alpine" + {{- else }} + image: alpine + {{- end }} command: - chmod - "777" diff --git a/nextcloud-aio-helm-chart/templates/nextcloud-aio-redis-deployment.yaml b/nextcloud-aio-helm-chart/templates/nextcloud-aio-redis-deployment.yaml index fdb77e84..cf4a2a4d 100755 --- a/nextcloud-aio-helm-chart/templates/nextcloud-aio-redis-deployment.yaml +++ b/nextcloud-aio-helm-chart/templates/nextcloud-aio-redis-deployment.yaml @@ -26,7 +26,11 @@ spec: spec: initContainers: - name: init-volumes + {{- if or .Values.IMAGE_MIRROR_PREFIX .Values.ALPINE_IMAGE_ORG }} image: "{{ .Values.IMAGE_MIRROR_PREFIX }}{{ .Values.ALPINE_IMAGE_ORG}}/alpine" + {{- else }} + image: alpine + {{- end }} command: - chmod - "777" diff --git a/nextcloud-aio-helm-chart/update-helm.sh b/nextcloud-aio-helm-chart/update-helm.sh index 2cd0b38e..4187da53 100755 --- a/nextcloud-aio-helm-chart/update-helm.sh +++ b/nextcloud-aio-helm-chart/update-helm.sh @@ -59,7 +59,11 @@ find ./ -name '*networkpolicy.yaml' -exec sed -i "s|manual-install-nextcloud-aio cat << EOL > /tmp/initcontainers initContainers: - name: init-volumes + {{- if or .Values.IMAGE_MIRROR_PREFIX .Values.ALPINE_IMAGE_ORG }} + image: "{{ .Values.IMAGE_MIRROR_PREFIX }}{{ .Values.ALPINE_IMAGE_ORG}}/alpine" + {{- else }} image: alpine + {{- end }} command: - chmod - "777" @@ -68,14 +72,22 @@ EOL cat << EOL > /tmp/initcontainers.database initContainers: - name: init-subpath + {{- if or .Values.IMAGE_MIRROR_PREFIX .Values.ALPINE_IMAGE_ORG }} + image: "{{ .Values.IMAGE_MIRROR_PREFIX }}{{ .Values.ALPINE_IMAGE_ORG}}/alpine" + {{- else }} image: alpine + {{- end }} command: - mkdir - "-p" - /nextcloud-aio-database/data volumeMountsInitContainer: - name: init-volumes + {{- if or .Values.IMAGE_MIRROR_PREFIX .Values.ALPINE_IMAGE_ORG }} + image: "{{ .Values.IMAGE_MIRROR_PREFIX }}{{ .Values.ALPINE_IMAGE_ORG}}/alpine" + {{- else }} image: alpine + {{- end }} command: - chown - 999:999 @@ -85,14 +97,22 @@ EOL cat << EOL > /tmp/initcontainers.clamav initContainers: - name: init-subpath + {{- if or .Values.IMAGE_MIRROR_PREFIX .Values.ALPINE_IMAGE_ORG }} + image: "{{ .Values.IMAGE_MIRROR_PREFIX }}{{ .Values.ALPINE_IMAGE_ORG}}/alpine" + {{- else }} image: alpine + {{- end }} command: - mkdir - "-p" - /nextcloud-aio-clamav/data volumeMountsInitContainer: - name: init-volumes + {{- if or .Values.IMAGE_MIRROR_PREFIX .Values.ALPINE_IMAGE_ORG }} + image: "{{ .Values.IMAGE_MIRROR_PREFIX }}{{ .Values.ALPINE_IMAGE_ORG}}/alpine" + {{- else }} image: alpine + {{- end }} command: - chown - 100:100 @@ -102,14 +122,22 @@ EOL cat << EOL > /tmp/initcontainers.nextcloud initContainers: - name: "delete-lost-found" + {{- if or .Values.IMAGE_MIRROR_PREFIX .Values.ALPINE_IMAGE_ORG }} + image: "{{ .Values.IMAGE_MIRROR_PREFIX }}{{ .Values.ALPINE_IMAGE_ORG}}/alpine" + {{- else }} image: alpine + {{- end }} command: - rm - "-rf" - "/nextcloud-aio-nextcloud/lost+found" volumeMountsInitRmLostFound: - name: init-volumes + {{- if or .Values.IMAGE_MIRROR_PREFIX .Values.ALPINE_IMAGE_ORG }} + image: "{{ .Values.IMAGE_MIRROR_PREFIX }}{{ .Values.ALPINE_IMAGE_ORG}}/alpine" + {{- else }} image: alpine + {{- end }} command: - chmod - "777"