From 405162e1032ee3ff7b3521f8f9467e7b8debfb88 Mon Sep 17 00:00:00 2001 From: Simon L Date: Sat, 28 Jan 2023 16:23:46 +0100 Subject: [PATCH 1/8] Fix and improve helm update script Signed-off-by: Simon L --- helm-chart/Chart.yaml | 2 +- .../nextcloud-aio-apache-deployment.yaml | 7 ++++--- ...xtcloud-aio-apache-persistentvolumeclaim.yaml | 4 ++-- .../templates/nextcloud-aio-apache-service.yaml | 4 +--- .../nextcloud-aio-clamav-deployment.yaml | 6 +++--- ...xtcloud-aio-clamav-persistentvolumeclaim.yaml | 4 ++-- .../nextcloud-aio-collabora-deployment.yaml | 6 +++--- ...io-collabora-fonts-persistentvolumeclaim.yaml | 4 ++-- .../nextcloud-aio-database-deployment.yaml | 6 +++--- ...-aio-database-dump-persistentvolumeclaim.yaml | 4 ++-- ...cloud-aio-database-persistentvolumeclaim.yaml | 4 ++-- ...-aio-elasticsearch-persistentvolumeclaim.yaml | 4 ++-- .../nextcloud-aio-fulltextsearch-deployment.yaml | 6 +++--- .../nextcloud-aio-imaginary-deployment.yaml | 6 +++--- ...aio-nextcloud-data-persistentvolumeclaim.yaml | 4 ++-- .../nextcloud-aio-nextcloud-deployment.yaml | 8 ++++---- ...io-nextcloud-mount-persistentvolumeclaim.yaml | 4 ++-- ...loud-aio-nextcloud-persistentvolumeclaim.yaml | 4 ++-- ...ud-trusted-cacerts-persistentvolumeclaim.yaml | 4 ++-- .../nextcloud-aio-onlyoffice-deployment.yaml | 6 +++--- ...oud-aio-onlyoffice-persistentvolumeclaim.yaml | 4 ++-- .../nextcloud-aio-redis-deployment.yaml | 6 +++--- ...extcloud-aio-redis-persistentvolumeclaim.yaml | 4 ++-- .../templates/nextcloud-aio-talk-deployment.yaml | 6 +++--- .../templates/nextcloud-aio-talk-service.yaml | 4 +--- helm-chart/update-helm.sh | 16 ++++++++++------ helm-chart/values.yaml | 2 +- 27 files changed, 70 insertions(+), 69 deletions(-) diff --git a/helm-chart/Chart.yaml b/helm-chart/Chart.yaml index 606c05ff..fefeda85 100755 --- a/helm-chart/Chart.yaml +++ b/helm-chart/Chart.yaml @@ -1,6 +1,6 @@ name: Nextcloud AIO Helm Chart description: A generated Helm Chart for Nextcloud AIO from Skippbox Kompose -version: 4.0.1 +version: 4.2.0 apiVersion: v1 keywords: - latest diff --git a/helm-chart/templates/nextcloud-aio-apache-deployment.yaml b/helm-chart/templates/nextcloud-aio-apache-deployment.yaml index 6b23459a..33a7839b 100755 --- a/helm-chart/templates/nextcloud-aio-apache-deployment.yaml +++ b/helm-chart/templates/nextcloud-aio-apache-deployment.yaml @@ -3,7 +3,7 @@ kind: Deployment metadata: annotations: kompose.cmd: kompose convert -c -f latest.yml - kompose.version: 1.27.0 (b0ed6a2c9) + kompose.version: 1.28.0 (c4137012e) labels: io.kompose.service: nextcloud-aio-apache name: nextcloud-aio-apache @@ -16,7 +16,7 @@ spec: metadata: annotations: kompose.cmd: kompose convert -c -f latest.yml - kompose.version: 1.27.0 (b0ed6a2c9) + kompose.version: 1.28.0 (c4137012e) labels: io.kompose.network/nextcloud-aio: "true" io.kompose.service: nextcloud-aio-apache @@ -41,10 +41,11 @@ spec: value: nextcloud-aio-talk - name: TZ value: "{{ .Values.TIMEZONE }}" - image: nextcloud/aio-apache:20221229_091124-{{ .Values.IMAGE_TAG }} + image: nextcloud/aio-apache:20230124_100035-{{ .Values.IMAGE_TAG }} name: nextcloud-aio-apache ports: - containerPort: {{ .Values.APACHE_PORT }} + hostIP: {{ .Values.APACHE_IP_BINDING }} volumeMounts: - mountPath: /var/www/html name: nextcloud-aio-nextcloud diff --git a/helm-chart/templates/nextcloud-aio-apache-persistentvolumeclaim.yaml b/helm-chart/templates/nextcloud-aio-apache-persistentvolumeclaim.yaml index fc6d1b65..d1a03c77 100755 --- a/helm-chart/templates/nextcloud-aio-apache-persistentvolumeclaim.yaml +++ b/helm-chart/templates/nextcloud-aio-apache-persistentvolumeclaim.yaml @@ -9,7 +9,7 @@ spec: storageClassName: {{ .Values.STORAGE_CLASS }} {{- end }} accessModes: - - ReadWriteMany + - ReadWriteOnce resources: requests: - storage: {{ .Values.MAX_STORAGE_SIZE }} + storage: 1Gi diff --git a/helm-chart/templates/nextcloud-aio-apache-service.yaml b/helm-chart/templates/nextcloud-aio-apache-service.yaml index 22ed8269..50acc4b3 100755 --- a/helm-chart/templates/nextcloud-aio-apache-service.yaml +++ b/helm-chart/templates/nextcloud-aio-apache-service.yaml @@ -3,7 +3,7 @@ kind: Service metadata: annotations: kompose.cmd: kompose convert -c -f latest.yml - kompose.version: 1.27.0 (b0ed6a2c9) + kompose.version: 1.28.0 (c4137012e) labels: io.kompose.service: nextcloud-aio-apache name: nextcloud-aio-apache @@ -14,5 +14,3 @@ spec: targetPort: {{ .Values.APACHE_PORT }} selector: io.kompose.service: nextcloud-aio-apache -status: - loadBalancer: {} diff --git a/helm-chart/templates/nextcloud-aio-clamav-deployment.yaml b/helm-chart/templates/nextcloud-aio-clamav-deployment.yaml index 7de199da..d4606e2d 100755 --- a/helm-chart/templates/nextcloud-aio-clamav-deployment.yaml +++ b/helm-chart/templates/nextcloud-aio-clamav-deployment.yaml @@ -4,7 +4,7 @@ kind: Deployment metadata: annotations: kompose.cmd: kompose convert -c -f latest.yml - kompose.version: 1.27.0 (b0ed6a2c9) + kompose.version: 1.28.0 (c4137012e) labels: io.kompose.service: nextcloud-aio-clamav name: nextcloud-aio-clamav @@ -17,7 +17,7 @@ spec: metadata: annotations: kompose.cmd: kompose convert -c -f latest.yml - kompose.version: 1.27.0 (b0ed6a2c9) + kompose.version: 1.28.0 (c4137012e) labels: io.kompose.network/nextcloud-aio: "true" io.kompose.service: nextcloud-aio-clamav @@ -28,7 +28,7 @@ spec: value: "90" - name: TZ value: "{{ .Values.TIMEZONE }}" - image: nextcloud/aio-clamav:20221229_091124-{{ .Values.IMAGE_TAG }} + image: nextcloud/aio-clamav:20230124_100035-{{ .Values.IMAGE_TAG }} name: nextcloud-aio-clamav volumeMounts: - mountPath: /var/lib/clamav diff --git a/helm-chart/templates/nextcloud-aio-clamav-persistentvolumeclaim.yaml b/helm-chart/templates/nextcloud-aio-clamav-persistentvolumeclaim.yaml index 776901fb..6c4c4b79 100755 --- a/helm-chart/templates/nextcloud-aio-clamav-persistentvolumeclaim.yaml +++ b/helm-chart/templates/nextcloud-aio-clamav-persistentvolumeclaim.yaml @@ -9,7 +9,7 @@ spec: storageClassName: {{ .Values.STORAGE_CLASS }} {{- end }} accessModes: - - ReadWriteMany + - ReadWriteOnce resources: requests: - storage: {{ .Values.MAX_STORAGE_SIZE }} + storage: 1Gi diff --git a/helm-chart/templates/nextcloud-aio-collabora-deployment.yaml b/helm-chart/templates/nextcloud-aio-collabora-deployment.yaml index 2f83b739..c30b0afd 100755 --- a/helm-chart/templates/nextcloud-aio-collabora-deployment.yaml +++ b/helm-chart/templates/nextcloud-aio-collabora-deployment.yaml @@ -4,7 +4,7 @@ kind: Deployment metadata: annotations: kompose.cmd: kompose convert -c -f latest.yml - kompose.version: 1.27.0 (b0ed6a2c9) + kompose.version: 1.28.0 (c4137012e) labels: io.kompose.service: nextcloud-aio-collabora name: nextcloud-aio-collabora @@ -17,7 +17,7 @@ spec: metadata: annotations: kompose.cmd: kompose convert -c -f latest.yml - kompose.version: 1.27.0 (b0ed6a2c9) + kompose.version: 1.28.0 (c4137012e) labels: io.kompose.network/nextcloud-aio: "true" io.kompose.service: nextcloud-aio-collabora @@ -32,7 +32,7 @@ spec: value: "{{ .Values.COLLABORA_DICTIONARIES }}" - name: extra_params value: --o:ssl.enable=false --o:ssl.termination=true --o:logging.level=warning --o:home_mode.enable=true {{ .Values.COLLABORA_SECCOMP_POLICY }} --o:remote_font_config.url=https://{{ .Values.NC_DOMAIN }}/apps/richdocuments/settings/fonts.json - image: nextcloud/aio-collabora:20221229_091124-{{ .Values.IMAGE_TAG }} + image: nextcloud/aio-collabora:20230124_100035-{{ .Values.IMAGE_TAG }} name: nextcloud-aio-collabora volumeMounts: - mountPath: /opt/cool/systemplate/tmpfonts diff --git a/helm-chart/templates/nextcloud-aio-collabora-fonts-persistentvolumeclaim.yaml b/helm-chart/templates/nextcloud-aio-collabora-fonts-persistentvolumeclaim.yaml index 099998a4..54c704fe 100755 --- a/helm-chart/templates/nextcloud-aio-collabora-fonts-persistentvolumeclaim.yaml +++ b/helm-chart/templates/nextcloud-aio-collabora-fonts-persistentvolumeclaim.yaml @@ -9,7 +9,7 @@ spec: storageClassName: {{ .Values.STORAGE_CLASS }} {{- end }} accessModes: - - ReadWriteMany + - ReadWriteOnce resources: requests: - storage: {{ .Values.MAX_STORAGE_SIZE }} + storage: 1Gi diff --git a/helm-chart/templates/nextcloud-aio-database-deployment.yaml b/helm-chart/templates/nextcloud-aio-database-deployment.yaml index b5bae70e..36c7a981 100755 --- a/helm-chart/templates/nextcloud-aio-database-deployment.yaml +++ b/helm-chart/templates/nextcloud-aio-database-deployment.yaml @@ -3,7 +3,7 @@ kind: Deployment metadata: annotations: kompose.cmd: kompose convert -c -f latest.yml - kompose.version: 1.27.0 (b0ed6a2c9) + kompose.version: 1.28.0 (c4137012e) labels: io.kompose.service: nextcloud-aio-database name: nextcloud-aio-database @@ -16,7 +16,7 @@ spec: metadata: annotations: kompose.cmd: kompose convert -c -f latest.yml - kompose.version: 1.27.0 (b0ed6a2c9) + kompose.version: 1.28.0 (c4137012e) labels: io.kompose.network/nextcloud-aio: "true" io.kompose.service: nextcloud-aio-database @@ -33,7 +33,7 @@ spec: value: nextcloud - name: TZ value: "{{ .Values.TIMEZONE }}" - image: nextcloud/aio-postgresql:20221229_091124-{{ .Values.IMAGE_TAG }} + image: nextcloud/aio-postgresql:20230124_100035-{{ .Values.IMAGE_TAG }} name: nextcloud-aio-database volumeMounts: - mountPath: /var/lib/postgresql/data diff --git a/helm-chart/templates/nextcloud-aio-database-dump-persistentvolumeclaim.yaml b/helm-chart/templates/nextcloud-aio-database-dump-persistentvolumeclaim.yaml index 5b5d61b2..a7a29492 100755 --- a/helm-chart/templates/nextcloud-aio-database-dump-persistentvolumeclaim.yaml +++ b/helm-chart/templates/nextcloud-aio-database-dump-persistentvolumeclaim.yaml @@ -9,7 +9,7 @@ spec: storageClassName: {{ .Values.STORAGE_CLASS }} {{- end }} accessModes: - - ReadWriteMany + - ReadWriteOnce resources: requests: - storage: {{ .Values.MAX_STORAGE_SIZE }} + storage: 1Gi diff --git a/helm-chart/templates/nextcloud-aio-database-persistentvolumeclaim.yaml b/helm-chart/templates/nextcloud-aio-database-persistentvolumeclaim.yaml index 71a78ad6..23947a12 100755 --- a/helm-chart/templates/nextcloud-aio-database-persistentvolumeclaim.yaml +++ b/helm-chart/templates/nextcloud-aio-database-persistentvolumeclaim.yaml @@ -9,7 +9,7 @@ spec: storageClassName: {{ .Values.STORAGE_CLASS }} {{- end }} accessModes: - - ReadWriteMany + - ReadWriteOnce resources: requests: - storage: {{ .Values.MAX_STORAGE_SIZE }} + storage: 1Gi diff --git a/helm-chart/templates/nextcloud-aio-elasticsearch-persistentvolumeclaim.yaml b/helm-chart/templates/nextcloud-aio-elasticsearch-persistentvolumeclaim.yaml index ec2ecbce..5b92f15b 100755 --- a/helm-chart/templates/nextcloud-aio-elasticsearch-persistentvolumeclaim.yaml +++ b/helm-chart/templates/nextcloud-aio-elasticsearch-persistentvolumeclaim.yaml @@ -9,7 +9,7 @@ spec: storageClassName: {{ .Values.STORAGE_CLASS }} {{- end }} accessModes: - - ReadWriteMany + - ReadWriteOnce resources: requests: - storage: {{ .Values.MAX_STORAGE_SIZE }} + storage: 1Gi diff --git a/helm-chart/templates/nextcloud-aio-fulltextsearch-deployment.yaml b/helm-chart/templates/nextcloud-aio-fulltextsearch-deployment.yaml index 33408159..63e475cf 100755 --- a/helm-chart/templates/nextcloud-aio-fulltextsearch-deployment.yaml +++ b/helm-chart/templates/nextcloud-aio-fulltextsearch-deployment.yaml @@ -4,7 +4,7 @@ kind: Deployment metadata: annotations: kompose.cmd: kompose convert -c -f latest.yml - kompose.version: 1.27.0 (b0ed6a2c9) + kompose.version: 1.28.0 (c4137012e) labels: io.kompose.service: nextcloud-aio-fulltextsearch name: nextcloud-aio-fulltextsearch @@ -17,7 +17,7 @@ spec: metadata: annotations: kompose.cmd: kompose convert -c -f latest.yml - kompose.version: 1.27.0 (b0ed6a2c9) + kompose.version: 1.28.0 (c4137012e) labels: io.kompose.network/nextcloud-aio: "true" io.kompose.service: nextcloud-aio-fulltextsearch @@ -30,7 +30,7 @@ spec: value: "{{ .Values.TIMEZONE }}" - name: discovery.type value: single-node - image: nextcloud/aio-fulltextsearch:20221229_091124-{{ .Values.IMAGE_TAG }} + image: nextcloud/aio-fulltextsearch:20230124_100035-{{ .Values.IMAGE_TAG }} name: nextcloud-aio-fulltextsearch volumeMounts: - mountPath: /usr/share/elasticsearch/data diff --git a/helm-chart/templates/nextcloud-aio-imaginary-deployment.yaml b/helm-chart/templates/nextcloud-aio-imaginary-deployment.yaml index e6b90ac7..2eabe094 100755 --- a/helm-chart/templates/nextcloud-aio-imaginary-deployment.yaml +++ b/helm-chart/templates/nextcloud-aio-imaginary-deployment.yaml @@ -4,7 +4,7 @@ kind: Deployment metadata: annotations: kompose.cmd: kompose convert -c -f latest.yml - kompose.version: 1.27.0 (b0ed6a2c9) + kompose.version: 1.28.0 (c4137012e) labels: io.kompose.service: nextcloud-aio-imaginary name: nextcloud-aio-imaginary @@ -17,7 +17,7 @@ spec: metadata: annotations: kompose.cmd: kompose convert -c -f latest.yml - kompose.version: 1.27.0 (b0ed6a2c9) + kompose.version: 1.28.0 (c4137012e) labels: io.kompose.network/nextcloud-aio: "true" io.kompose.service: nextcloud-aio-imaginary @@ -26,6 +26,6 @@ spec: - env: - name: TZ value: "{{ .Values.TIMEZONE }}" - image: nextcloud/aio-imaginary:20221229_091124-{{ .Values.IMAGE_TAG }} + image: nextcloud/aio-imaginary:20230124_100035-{{ .Values.IMAGE_TAG }} name: nextcloud-aio-imaginary {{- end }} diff --git a/helm-chart/templates/nextcloud-aio-nextcloud-data-persistentvolumeclaim.yaml b/helm-chart/templates/nextcloud-aio-nextcloud-data-persistentvolumeclaim.yaml index a3e65b4f..994bd947 100755 --- a/helm-chart/templates/nextcloud-aio-nextcloud-data-persistentvolumeclaim.yaml +++ b/helm-chart/templates/nextcloud-aio-nextcloud-data-persistentvolumeclaim.yaml @@ -9,7 +9,7 @@ spec: storageClassName: {{ .Values.STORAGE_CLASS }} {{- end }} accessModes: - - ReadWriteMany + - ReadWriteOnce resources: requests: - storage: {{ .Values.MAX_STORAGE_SIZE }} + storage: 1Gi diff --git a/helm-chart/templates/nextcloud-aio-nextcloud-deployment.yaml b/helm-chart/templates/nextcloud-aio-nextcloud-deployment.yaml index 72483cfe..025ae24a 100755 --- a/helm-chart/templates/nextcloud-aio-nextcloud-deployment.yaml +++ b/helm-chart/templates/nextcloud-aio-nextcloud-deployment.yaml @@ -3,7 +3,7 @@ kind: Deployment metadata: annotations: kompose.cmd: kompose convert -c -f latest.yml - kompose.version: 1.27.0 (b0ed6a2c9) + kompose.version: 1.28.0 (c4137012e) labels: io.kompose.service: nextcloud-aio-nextcloud name: nextcloud-aio-nextcloud @@ -16,7 +16,7 @@ spec: metadata: annotations: kompose.cmd: kompose convert -c -f latest.yml - kompose.version: 1.27.0 (b0ed6a2c9) + kompose.version: 1.28.0 (c4137012e) labels: io.kompose.network/nextcloud-aio: "true" io.kompose.service: nextcloud-aio-nextcloud @@ -101,14 +101,14 @@ spec: value: "{{ .Values.TIMEZONE }}" - name: UPDATE_NEXTCLOUD_APPS value: "{{ .Values.UPDATE_NEXTCLOUD_APPS }}" - image: nextcloud/aio-nextcloud:20221229_091124-{{ .Values.IMAGE_TAG }} + image: nextcloud/aio-nextcloud:20230124_100035-{{ .Values.IMAGE_TAG }} name: nextcloud-aio-nextcloud volumeMounts: - mountPath: /var/www/html name: nextcloud-aio-nextcloud - mountPath: /mnt/ncdata name: nextcloud-aio-nextcloud-data - - mountPath: /mnt/ + - mountPath: /mnt name: nextcloud-aio-nextcloud-mount - mountPath: /usr/local/share/ca-certificates name: nextcloud-aio-nextcloud-trusted-cacerts diff --git a/helm-chart/templates/nextcloud-aio-nextcloud-mount-persistentvolumeclaim.yaml b/helm-chart/templates/nextcloud-aio-nextcloud-mount-persistentvolumeclaim.yaml index ced4114b..c36dca31 100755 --- a/helm-chart/templates/nextcloud-aio-nextcloud-mount-persistentvolumeclaim.yaml +++ b/helm-chart/templates/nextcloud-aio-nextcloud-mount-persistentvolumeclaim.yaml @@ -9,7 +9,7 @@ spec: storageClassName: {{ .Values.STORAGE_CLASS }} {{- end }} accessModes: - - ReadWriteMany + - ReadWriteOnce resources: requests: - storage: {{ .Values.MAX_STORAGE_SIZE }} + storage: 1Gi diff --git a/helm-chart/templates/nextcloud-aio-nextcloud-persistentvolumeclaim.yaml b/helm-chart/templates/nextcloud-aio-nextcloud-persistentvolumeclaim.yaml index b047dc5a..9a00b40c 100755 --- a/helm-chart/templates/nextcloud-aio-nextcloud-persistentvolumeclaim.yaml +++ b/helm-chart/templates/nextcloud-aio-nextcloud-persistentvolumeclaim.yaml @@ -9,7 +9,7 @@ spec: storageClassName: {{ .Values.STORAGE_CLASS }} {{- end }} accessModes: - - ReadWriteMany + - ReadWriteOnce resources: requests: - storage: {{ .Values.MAX_STORAGE_SIZE }} + storage: 1Gi diff --git a/helm-chart/templates/nextcloud-aio-nextcloud-trusted-cacerts-persistentvolumeclaim.yaml b/helm-chart/templates/nextcloud-aio-nextcloud-trusted-cacerts-persistentvolumeclaim.yaml index 6a46650c..f3826da7 100755 --- a/helm-chart/templates/nextcloud-aio-nextcloud-trusted-cacerts-persistentvolumeclaim.yaml +++ b/helm-chart/templates/nextcloud-aio-nextcloud-trusted-cacerts-persistentvolumeclaim.yaml @@ -9,7 +9,7 @@ spec: storageClassName: {{ .Values.STORAGE_CLASS }} {{- end }} accessModes: - - ReadWriteMany + - ReadWriteOnce resources: requests: - storage: {{ .Values.MAX_STORAGE_SIZE }} + storage: 1Gi diff --git a/helm-chart/templates/nextcloud-aio-onlyoffice-deployment.yaml b/helm-chart/templates/nextcloud-aio-onlyoffice-deployment.yaml index 1da2dbb7..c7de97a4 100755 --- a/helm-chart/templates/nextcloud-aio-onlyoffice-deployment.yaml +++ b/helm-chart/templates/nextcloud-aio-onlyoffice-deployment.yaml @@ -4,7 +4,7 @@ kind: Deployment metadata: annotations: kompose.cmd: kompose convert -c -f latest.yml - kompose.version: 1.27.0 (b0ed6a2c9) + kompose.version: 1.28.0 (c4137012e) labels: io.kompose.service: nextcloud-aio-onlyoffice name: nextcloud-aio-onlyoffice @@ -17,7 +17,7 @@ spec: metadata: annotations: kompose.cmd: kompose convert -c -f latest.yml - kompose.version: 1.27.0 (b0ed6a2c9) + kompose.version: 1.28.0 (c4137012e) labels: io.kompose.network/nextcloud-aio: "true" io.kompose.service: nextcloud-aio-onlyoffice @@ -32,7 +32,7 @@ spec: value: "{{ .Values.ONLYOFFICE_SECRET }}" - name: TZ value: "{{ .Values.TIMEZONE }}" - image: nextcloud/aio-onlyoffice:20221229_091124-{{ .Values.IMAGE_TAG }} + image: nextcloud/aio-onlyoffice:20230124_100035-{{ .Values.IMAGE_TAG }} name: nextcloud-aio-onlyoffice volumeMounts: - mountPath: /var/lib/onlyoffice diff --git a/helm-chart/templates/nextcloud-aio-onlyoffice-persistentvolumeclaim.yaml b/helm-chart/templates/nextcloud-aio-onlyoffice-persistentvolumeclaim.yaml index 90916696..0a97d85f 100755 --- a/helm-chart/templates/nextcloud-aio-onlyoffice-persistentvolumeclaim.yaml +++ b/helm-chart/templates/nextcloud-aio-onlyoffice-persistentvolumeclaim.yaml @@ -9,7 +9,7 @@ spec: storageClassName: {{ .Values.STORAGE_CLASS }} {{- end }} accessModes: - - ReadWriteMany + - ReadWriteOnce resources: requests: - storage: {{ .Values.MAX_STORAGE_SIZE }} + storage: 1Gi diff --git a/helm-chart/templates/nextcloud-aio-redis-deployment.yaml b/helm-chart/templates/nextcloud-aio-redis-deployment.yaml index 0dc84638..7d9dd504 100755 --- a/helm-chart/templates/nextcloud-aio-redis-deployment.yaml +++ b/helm-chart/templates/nextcloud-aio-redis-deployment.yaml @@ -3,7 +3,7 @@ kind: Deployment metadata: annotations: kompose.cmd: kompose convert -c -f latest.yml - kompose.version: 1.27.0 (b0ed6a2c9) + kompose.version: 1.28.0 (c4137012e) labels: io.kompose.service: nextcloud-aio-redis name: nextcloud-aio-redis @@ -16,7 +16,7 @@ spec: metadata: annotations: kompose.cmd: kompose convert -c -f latest.yml - kompose.version: 1.27.0 (b0ed6a2c9) + kompose.version: 1.28.0 (c4137012e) labels: io.kompose.network/nextcloud-aio: "true" io.kompose.service: nextcloud-aio-redis @@ -27,7 +27,7 @@ spec: value: "{{ .Values.REDIS_PASSWORD }}" - name: TZ value: "{{ .Values.TIMEZONE }}" - image: nextcloud/aio-redis:20221229_091124-{{ .Values.IMAGE_TAG }} + image: nextcloud/aio-redis:20230124_100035-{{ .Values.IMAGE_TAG }} name: nextcloud-aio-redis volumeMounts: - mountPath: /data diff --git a/helm-chart/templates/nextcloud-aio-redis-persistentvolumeclaim.yaml b/helm-chart/templates/nextcloud-aio-redis-persistentvolumeclaim.yaml index fd7af042..c9c003e2 100755 --- a/helm-chart/templates/nextcloud-aio-redis-persistentvolumeclaim.yaml +++ b/helm-chart/templates/nextcloud-aio-redis-persistentvolumeclaim.yaml @@ -9,7 +9,7 @@ spec: storageClassName: {{ .Values.STORAGE_CLASS }} {{- end }} accessModes: - - ReadWriteMany + - ReadWriteOnce resources: requests: - storage: {{ .Values.MAX_STORAGE_SIZE }} + storage: 1Gi diff --git a/helm-chart/templates/nextcloud-aio-talk-deployment.yaml b/helm-chart/templates/nextcloud-aio-talk-deployment.yaml index 29d078c8..06ac7f2d 100755 --- a/helm-chart/templates/nextcloud-aio-talk-deployment.yaml +++ b/helm-chart/templates/nextcloud-aio-talk-deployment.yaml @@ -4,7 +4,7 @@ kind: Deployment metadata: annotations: kompose.cmd: kompose convert -c -f latest.yml - kompose.version: 1.27.0 (b0ed6a2c9) + kompose.version: 1.28.0 (c4137012e) labels: io.kompose.service: nextcloud-aio-talk name: nextcloud-aio-talk @@ -17,7 +17,7 @@ spec: metadata: annotations: kompose.cmd: kompose convert -c -f latest.yml - kompose.version: 1.27.0 (b0ed6a2c9) + kompose.version: 1.28.0 (c4137012e) labels: io.kompose.network/nextcloud-aio: "true" io.kompose.service: nextcloud-aio-talk @@ -36,7 +36,7 @@ spec: value: "{{ .Values.TURN_SECRET }}" - name: TZ value: "{{ .Values.TIMEZONE }}" - image: nextcloud/aio-talk:20221229_091124-{{ .Values.IMAGE_TAG }} + image: nextcloud/aio-talk:20230124_100035-{{ .Values.IMAGE_TAG }} name: nextcloud-aio-talk ports: - containerPort: {{ .Values.TALK_PORT }} diff --git a/helm-chart/templates/nextcloud-aio-talk-service.yaml b/helm-chart/templates/nextcloud-aio-talk-service.yaml index a9588e4e..91bc1887 100755 --- a/helm-chart/templates/nextcloud-aio-talk-service.yaml +++ b/helm-chart/templates/nextcloud-aio-talk-service.yaml @@ -4,7 +4,7 @@ kind: Service metadata: annotations: kompose.cmd: kompose convert -c -f latest.yml - kompose.version: 1.27.0 (b0ed6a2c9) + kompose.version: 1.28.0 (c4137012e) labels: io.kompose.service: nextcloud-aio-talk name: nextcloud-aio-talk @@ -19,6 +19,4 @@ spec: targetPort: {{ .Values.TALK_PORT }} selector: io.kompose.service: nextcloud-aio-talk -status: - loadBalancer: {} {{- end }} diff --git a/helm-chart/update-helm.sh b/helm-chart/update-helm.sh index 8268bbde..cf3ad294 100755 --- a/helm-chart/update-helm.sh +++ b/helm-chart/update-helm.sh @@ -29,20 +29,26 @@ sed -i "s|\${TALK_PORT}:\${TALK_PORT}/|$TALK_PORT:$TALK_PORT/|g" latest.yml sed -i "s|\${NEXTCLOUD_DATADIR}|$NEXTCLOUD_DATADIR|" latest.yml sed -i "/NEXTCLOUD_DATADIR/d" latest.yml sed -i "s|\${NEXTCLOUD_MOUNT}:\${NEXTCLOUD_MOUNT}:|nextcloud_aio_nextcloud_mount:$NEXTCLOUD_MOUNT:|" latest.yml +sed -i "/^volumes:/a\ \ nextcloud_aio_nextcloud_mount:\n \ \ \ \ name: nextcloud_aio_nextcloud_mount" latest.yml +sed -i "/^volumes:/a\ \ nextcloud_aio_nextcloud_trusted_cacerts:\n \ \ \ \ name: nextcloud_aio_nextcloud_trusted_cacerts" latest.yml sed -i "s|\${NEXTCLOUD_TRUSTED_CACERTS_DIR}:|nextcloud_aio_nextcloud_trusted_cacerts:|g#" latest.yml sed -i 's|\${|{{ .Values.|g' latest.yml sed -i 's|}| }}|g' latest.yml -sed -i '/profiles: /d' latest.yml cat latest.yml kompose convert -c -f latest.yml cd latest +mv ./templates/manual-install-nextcloud-aio-networkpolicy.yaml ./templates/nextcloud-aio-networkpolicy.yaml # shellcheck disable=SC1083 -find ./ -name '*persistentvolumeclaim.yaml' -exec sed -i "s|storage: 100Mi|storage: {{ .Values.MAX_STORAGE_SIZE }}|" \{} \; +find ./ -name '*networkpolicy.yaml' -exec sed -i "s|manual-install-nextcloud-aio|nextcloud-aio|" \{} \; # shellcheck disable=SC1083 -find ./ -name '*persistentvolumeclaim.yaml' -exec sed -i "s|ReadOnlyMany|ReadWriteMany|" \{} \; +find ./ -name '*service.yaml' -exec sed -i "/^status:/,$ d" \{} \; # shellcheck disable=SC1083 -find ./ -name '*persistentvolumeclaim.yaml' -exec sed -i "s|ReadWriteOnce|ReadWriteMany|" \{} \; +find ./ -name '*deployment.yaml' -exec sed -i "s|manual-install-nextcloud-aio|nextcloud-aio|" \{} \; +# shellcheck disable=SC1083 +find ./ -name '*persistentvolumeclaim.yaml' -exec sed -i "s|storage: 100Mi|storage: 1Gi|" \{} \; +# shellcheck disable=SC1083 +find ./ -name '*persistentvolumeclaim.yaml' -exec sed -i "s|ReadOnlyMany|ReadWriteOnce|" \{} \; # shellcheck disable=SC1083 find ./ -name '*persistentvolumeclaim.yaml' -exec sed -i "/accessModes:/i\ \ {{- if .Values.STORAGE_CLASS }}" \{} \; # shellcheck disable=SC1083 @@ -85,14 +91,12 @@ sed -i "s|^version:.*|version: $AIO_VERSION|" ../helm-chart/Chart.yaml # Conversion of sample.conf cp sample.conf /tmp/ -sed -i "/^APACHE_IP_BINDING/d" /tmp/sample.conf sed -i 's|"||g' /tmp/sample.conf sed -i 's|=|: |' /tmp/sample.conf sed -i 's|= |: |' /tmp/sample.conf sed -i '/^NEXTCLOUD_DATADIR/d' /tmp/sample.conf sed -i 's|^NEXTCLOUD_MOUNT: .*|NEXTCLOUD_MOUNT: # Setting this to any value allows to enable external storages in Nextcloud|' /tmp/sample.conf sed -i 's|^NEXTCLOUD_TRUSTED_CACERTS_DIR: .*|NEXTCLOUD_TRUSTED_CACERTS_DIR: # Setting this to any value allows to automatically import root certificates into the Nextcloud container|' /tmp/sample.conf -echo 'MAX_STORAGE_SIZE: 10Gi # You can adjust the max storage that each volume can use with this value' >> /tmp/sample.conf echo 'STORAGE_CLASS: # By setting this, you can adjust the storage class for your volumes' >> /tmp/sample.conf mv /tmp/sample.conf ../helm-chart/values.yaml diff --git a/helm-chart/values.yaml b/helm-chart/values.yaml index 5ec3fcdf..e18a34a9 100755 --- a/helm-chart/values.yaml +++ b/helm-chart/values.yaml @@ -1,6 +1,7 @@ IMAGE_TAG: latest # Version of docker images, should be latest or latest-arm64. Note: latest-arm64 has no clamav support AIO_TOKEN: 123456 # Has no function but needs to be set! AIO_URL: localhost # Has no function but needs to be set! +APACHE_IP_BINDING: 0.0.0.0 # This can be changed to e.g. 127.0.0.1 if you want to run AIO behind a reverse proxy and if that is running on the same host and using localhost to connect APACHE_MAX_SIZE: 10737418240 # This needs to be an integer and in sync with NEXTCLOUD_UPLOAD_LIMIT APACHE_PORT: 443 # Changing this to a different value than 443 will allow you to run it behind a reverse proxy. CLAMAV_ENABLED: no # Setting this to yes enables the option in Nextcloud automatically. Note: latest-arm64 has no clamav support @@ -30,5 +31,4 @@ TALK_PORT: 3478 # This allows to adjust the port that the talk containe TIMEZONE: Europe/Berlin # TODO! This is the timezone that your containers will use. TURN_SECRET: # TODO! This needs to be a unique and good password! UPDATE_NEXTCLOUD_APPS: no # When setting to yes, it will automatically update all installed Nextcloud apps upon container startup on saturdays. -MAX_STORAGE_SIZE: 10Gi # You can adjust the max storage that each volume can use with this value STORAGE_CLASS: # By setting this, you can adjust the storage class for your volumes From 83c68da0a0d6e377054a62a25beb9cbf084c5be6 Mon Sep 17 00:00:00 2001 From: Simon L Date: Sat, 28 Jan 2023 22:08:43 +0100 Subject: [PATCH 2/8] fix permissions? Signed-off-by: Simon L --- helm-chart/templates/nextcloud-aio-apache-deployment.yaml | 3 +++ helm-chart/templates/nextcloud-aio-clamav-deployment.yaml | 3 +++ helm-chart/templates/nextcloud-aio-collabora-deployment.yaml | 3 +++ helm-chart/templates/nextcloud-aio-database-deployment.yaml | 3 +++ .../templates/nextcloud-aio-fulltextsearch-deployment.yaml | 3 +++ helm-chart/templates/nextcloud-aio-imaginary-deployment.yaml | 3 +++ helm-chart/templates/nextcloud-aio-nextcloud-deployment.yaml | 3 +++ helm-chart/templates/nextcloud-aio-onlyoffice-deployment.yaml | 3 +++ helm-chart/templates/nextcloud-aio-redis-deployment.yaml | 3 +++ helm-chart/templates/nextcloud-aio-talk-deployment.yaml | 3 +++ helm-chart/update-helm.sh | 2 ++ 11 files changed, 32 insertions(+) diff --git a/helm-chart/templates/nextcloud-aio-apache-deployment.yaml b/helm-chart/templates/nextcloud-aio-apache-deployment.yaml index 33a7839b..6f0b560a 100755 --- a/helm-chart/templates/nextcloud-aio-apache-deployment.yaml +++ b/helm-chart/templates/nextcloud-aio-apache-deployment.yaml @@ -21,6 +21,9 @@ spec: io.kompose.network/nextcloud-aio: "true" io.kompose.service: nextcloud-aio-apache spec: + securityContext: + fsGroup: 65534 + fsGroupChangePolicy: "OnRootMismatch" containers: - env: - name: APACHE_MAX_SIZE diff --git a/helm-chart/templates/nextcloud-aio-clamav-deployment.yaml b/helm-chart/templates/nextcloud-aio-clamav-deployment.yaml index d4606e2d..cf24fe5c 100755 --- a/helm-chart/templates/nextcloud-aio-clamav-deployment.yaml +++ b/helm-chart/templates/nextcloud-aio-clamav-deployment.yaml @@ -22,6 +22,9 @@ spec: io.kompose.network/nextcloud-aio: "true" io.kompose.service: nextcloud-aio-clamav spec: + securityContext: + fsGroup: 65534 + fsGroupChangePolicy: "OnRootMismatch" containers: - env: - name: CLAMD_STARTUP_TIMEOUT diff --git a/helm-chart/templates/nextcloud-aio-collabora-deployment.yaml b/helm-chart/templates/nextcloud-aio-collabora-deployment.yaml index c30b0afd..9068033b 100755 --- a/helm-chart/templates/nextcloud-aio-collabora-deployment.yaml +++ b/helm-chart/templates/nextcloud-aio-collabora-deployment.yaml @@ -22,6 +22,9 @@ spec: io.kompose.network/nextcloud-aio: "true" io.kompose.service: nextcloud-aio-collabora spec: + securityContext: + fsGroup: 65534 + fsGroupChangePolicy: "OnRootMismatch" containers: - env: - name: TZ diff --git a/helm-chart/templates/nextcloud-aio-database-deployment.yaml b/helm-chart/templates/nextcloud-aio-database-deployment.yaml index 36c7a981..d1eb3c4e 100755 --- a/helm-chart/templates/nextcloud-aio-database-deployment.yaml +++ b/helm-chart/templates/nextcloud-aio-database-deployment.yaml @@ -21,6 +21,9 @@ spec: io.kompose.network/nextcloud-aio: "true" io.kompose.service: nextcloud-aio-database spec: + securityContext: + fsGroup: 65534 + fsGroupChangePolicy: "OnRootMismatch" containers: - env: - name: PGTZ diff --git a/helm-chart/templates/nextcloud-aio-fulltextsearch-deployment.yaml b/helm-chart/templates/nextcloud-aio-fulltextsearch-deployment.yaml index 63e475cf..64ff5e48 100755 --- a/helm-chart/templates/nextcloud-aio-fulltextsearch-deployment.yaml +++ b/helm-chart/templates/nextcloud-aio-fulltextsearch-deployment.yaml @@ -22,6 +22,9 @@ spec: io.kompose.network/nextcloud-aio: "true" io.kompose.service: nextcloud-aio-fulltextsearch spec: + securityContext: + fsGroup: 65534 + fsGroupChangePolicy: "OnRootMismatch" containers: - env: - name: ES_JAVA_OPTS diff --git a/helm-chart/templates/nextcloud-aio-imaginary-deployment.yaml b/helm-chart/templates/nextcloud-aio-imaginary-deployment.yaml index 2eabe094..ea558eba 100755 --- a/helm-chart/templates/nextcloud-aio-imaginary-deployment.yaml +++ b/helm-chart/templates/nextcloud-aio-imaginary-deployment.yaml @@ -22,6 +22,9 @@ spec: io.kompose.network/nextcloud-aio: "true" io.kompose.service: nextcloud-aio-imaginary spec: + securityContext: + fsGroup: 65534 + fsGroupChangePolicy: "OnRootMismatch" containers: - env: - name: TZ diff --git a/helm-chart/templates/nextcloud-aio-nextcloud-deployment.yaml b/helm-chart/templates/nextcloud-aio-nextcloud-deployment.yaml index 025ae24a..fc6a0313 100755 --- a/helm-chart/templates/nextcloud-aio-nextcloud-deployment.yaml +++ b/helm-chart/templates/nextcloud-aio-nextcloud-deployment.yaml @@ -21,6 +21,9 @@ spec: io.kompose.network/nextcloud-aio: "true" io.kompose.service: nextcloud-aio-nextcloud spec: + securityContext: + fsGroup: 65534 + fsGroupChangePolicy: "OnRootMismatch" containers: - env: - name: ADDITIONAL_APKS diff --git a/helm-chart/templates/nextcloud-aio-onlyoffice-deployment.yaml b/helm-chart/templates/nextcloud-aio-onlyoffice-deployment.yaml index c7de97a4..d4c9eef3 100755 --- a/helm-chart/templates/nextcloud-aio-onlyoffice-deployment.yaml +++ b/helm-chart/templates/nextcloud-aio-onlyoffice-deployment.yaml @@ -22,6 +22,9 @@ spec: io.kompose.network/nextcloud-aio: "true" io.kompose.service: nextcloud-aio-onlyoffice spec: + securityContext: + fsGroup: 65534 + fsGroupChangePolicy: "OnRootMismatch" containers: - env: - name: JWT_ENABLED diff --git a/helm-chart/templates/nextcloud-aio-redis-deployment.yaml b/helm-chart/templates/nextcloud-aio-redis-deployment.yaml index 7d9dd504..3525d150 100755 --- a/helm-chart/templates/nextcloud-aio-redis-deployment.yaml +++ b/helm-chart/templates/nextcloud-aio-redis-deployment.yaml @@ -21,6 +21,9 @@ spec: io.kompose.network/nextcloud-aio: "true" io.kompose.service: nextcloud-aio-redis spec: + securityContext: + fsGroup: 65534 + fsGroupChangePolicy: "OnRootMismatch" containers: - env: - name: REDIS_HOST_PASSWORD diff --git a/helm-chart/templates/nextcloud-aio-talk-deployment.yaml b/helm-chart/templates/nextcloud-aio-talk-deployment.yaml index 06ac7f2d..9e25b9fb 100755 --- a/helm-chart/templates/nextcloud-aio-talk-deployment.yaml +++ b/helm-chart/templates/nextcloud-aio-talk-deployment.yaml @@ -22,6 +22,9 @@ spec: io.kompose.network/nextcloud-aio: "true" io.kompose.service: nextcloud-aio-talk spec: + securityContext: + fsGroup: 65534 + fsGroupChangePolicy: "OnRootMismatch" containers: - env: - name: JANUS_API_KEY diff --git a/helm-chart/update-helm.sh b/helm-chart/update-helm.sh index cf3ad294..74d0e2a2 100755 --- a/helm-chart/update-helm.sh +++ b/helm-chart/update-helm.sh @@ -46,6 +46,8 @@ find ./ -name '*service.yaml' -exec sed -i "/^status:/,$ d" \{} \; # shellcheck disable=SC1083 find ./ -name '*deployment.yaml' -exec sed -i "s|manual-install-nextcloud-aio|nextcloud-aio|" \{} \; # shellcheck disable=SC1083 +find ./ -name '*deployment.yaml' -exec sed -i "/^ spec:/a\ \ \ \ \ \ securityContext:\n\ \ \ \ \ \ \ \ fsGroup: 65534\n\ \ \ \ \ \ \ \ fsGroupChangePolicy: \"OnRootMismatch\"" \{} \; +# shellcheck disable=SC1083 find ./ -name '*persistentvolumeclaim.yaml' -exec sed -i "s|storage: 100Mi|storage: 1Gi|" \{} \; # shellcheck disable=SC1083 find ./ -name '*persistentvolumeclaim.yaml' -exec sed -i "s|ReadOnlyMany|ReadWriteOnce|" \{} \; From 7d36204397e070df4ecfcfe07a5af0079f94d61d Mon Sep 17 00:00:00 2001 From: Simon L Date: Sun, 29 Jan 2023 00:02:18 +0100 Subject: [PATCH 3/8] allow to adjust the volumes Signed-off-by: Simon L --- ...loud-aio-apache-persistentvolumeclaim.yaml | 2 +- ...collabora-fonts-persistentvolumeclaim.yaml | 2 +- ...o-database-dump-persistentvolumeclaim.yaml | 2 +- ...ud-aio-database-persistentvolumeclaim.yaml | 2 +- ...o-elasticsearch-persistentvolumeclaim.yaml | 2 +- ...-nextcloud-data-persistentvolumeclaim.yaml | 2 +- .../nextcloud-aio-nextcloud-deployment.yaml | 7 ------ ...nextcloud-mount-persistentvolumeclaim.yaml | 15 ------------- ...d-aio-nextcloud-persistentvolumeclaim.yaml | 2 +- ...trusted-cacerts-persistentvolumeclaim.yaml | 2 +- helm-chart/update-helm.sh | 22 +++++++++++++++---- helm-chart/values.yaml | 4 +++- 12 files changed, 29 insertions(+), 35 deletions(-) delete mode 100755 helm-chart/templates/nextcloud-aio-nextcloud-mount-persistentvolumeclaim.yaml diff --git a/helm-chart/templates/nextcloud-aio-apache-persistentvolumeclaim.yaml b/helm-chart/templates/nextcloud-aio-apache-persistentvolumeclaim.yaml index d1a03c77..f63ffab1 100755 --- a/helm-chart/templates/nextcloud-aio-apache-persistentvolumeclaim.yaml +++ b/helm-chart/templates/nextcloud-aio-apache-persistentvolumeclaim.yaml @@ -12,4 +12,4 @@ spec: - ReadWriteOnce resources: requests: - storage: 1Gi + storage: 100Mi diff --git a/helm-chart/templates/nextcloud-aio-collabora-fonts-persistentvolumeclaim.yaml b/helm-chart/templates/nextcloud-aio-collabora-fonts-persistentvolumeclaim.yaml index 54c704fe..8e514c89 100755 --- a/helm-chart/templates/nextcloud-aio-collabora-fonts-persistentvolumeclaim.yaml +++ b/helm-chart/templates/nextcloud-aio-collabora-fonts-persistentvolumeclaim.yaml @@ -12,4 +12,4 @@ spec: - ReadWriteOnce resources: requests: - storage: 1Gi + storage: 100Mi diff --git a/helm-chart/templates/nextcloud-aio-database-dump-persistentvolumeclaim.yaml b/helm-chart/templates/nextcloud-aio-database-dump-persistentvolumeclaim.yaml index a7a29492..2c87ac91 100755 --- a/helm-chart/templates/nextcloud-aio-database-dump-persistentvolumeclaim.yaml +++ b/helm-chart/templates/nextcloud-aio-database-dump-persistentvolumeclaim.yaml @@ -12,4 +12,4 @@ spec: - ReadWriteOnce resources: requests: - storage: 1Gi + storage: {{ .Values.DATABASE_STORAGE_SIZE }} diff --git a/helm-chart/templates/nextcloud-aio-database-persistentvolumeclaim.yaml b/helm-chart/templates/nextcloud-aio-database-persistentvolumeclaim.yaml index 23947a12..a8522aae 100755 --- a/helm-chart/templates/nextcloud-aio-database-persistentvolumeclaim.yaml +++ b/helm-chart/templates/nextcloud-aio-database-persistentvolumeclaim.yaml @@ -12,4 +12,4 @@ spec: - ReadWriteOnce resources: requests: - storage: 1Gi + storage: {{ .Values.DATABASE_STORAGE_SIZE }} diff --git a/helm-chart/templates/nextcloud-aio-elasticsearch-persistentvolumeclaim.yaml b/helm-chart/templates/nextcloud-aio-elasticsearch-persistentvolumeclaim.yaml index 5b92f15b..04bee927 100755 --- a/helm-chart/templates/nextcloud-aio-elasticsearch-persistentvolumeclaim.yaml +++ b/helm-chart/templates/nextcloud-aio-elasticsearch-persistentvolumeclaim.yaml @@ -12,4 +12,4 @@ spec: - ReadWriteOnce resources: requests: - storage: 1Gi + storage: {{ .Values.FULLTEXTSEARCH_STORAGE_SIZE }} diff --git a/helm-chart/templates/nextcloud-aio-nextcloud-data-persistentvolumeclaim.yaml b/helm-chart/templates/nextcloud-aio-nextcloud-data-persistentvolumeclaim.yaml index 994bd947..50594a1f 100755 --- a/helm-chart/templates/nextcloud-aio-nextcloud-data-persistentvolumeclaim.yaml +++ b/helm-chart/templates/nextcloud-aio-nextcloud-data-persistentvolumeclaim.yaml @@ -12,4 +12,4 @@ spec: - ReadWriteOnce resources: requests: - storage: 1Gi + storage: {{ .Values.NEXTCLOUD_DATA_STORAGE_SIZE }} diff --git a/helm-chart/templates/nextcloud-aio-nextcloud-deployment.yaml b/helm-chart/templates/nextcloud-aio-nextcloud-deployment.yaml index fc6a0313..6e9e1236 100755 --- a/helm-chart/templates/nextcloud-aio-nextcloud-deployment.yaml +++ b/helm-chart/templates/nextcloud-aio-nextcloud-deployment.yaml @@ -58,8 +58,6 @@ spec: value: "{{ .Values.NC_DOMAIN }}" - name: NEXTCLOUD_DATA_DIR value: /mnt/ncdata - - name: NEXTCLOUD_MOUNT - value: "{{ .Values.NEXTCLOUD_MOUNT }}" - name: ONLYOFFICE_ENABLED value: "{{ .Values.ONLYOFFICE_ENABLED }}" - name: ONLYOFFICE_HOST @@ -111,8 +109,6 @@ spec: name: nextcloud-aio-nextcloud - mountPath: /mnt/ncdata name: nextcloud-aio-nextcloud-data - - mountPath: /mnt - name: nextcloud-aio-nextcloud-mount - mountPath: /usr/local/share/ca-certificates name: nextcloud-aio-nextcloud-trusted-cacerts readOnly: true @@ -123,9 +119,6 @@ spec: - name: nextcloud-aio-nextcloud-data persistentVolumeClaim: claimName: nextcloud-aio-nextcloud-data - - name: nextcloud-aio-nextcloud-mount - persistentVolumeClaim: - claimName: nextcloud-aio-nextcloud-mount - name: nextcloud-aio-nextcloud-trusted-cacerts persistentVolumeClaim: claimName: nextcloud-aio-nextcloud-trusted-cacerts diff --git a/helm-chart/templates/nextcloud-aio-nextcloud-mount-persistentvolumeclaim.yaml b/helm-chart/templates/nextcloud-aio-nextcloud-mount-persistentvolumeclaim.yaml deleted file mode 100755 index c36dca31..00000000 --- a/helm-chart/templates/nextcloud-aio-nextcloud-mount-persistentvolumeclaim.yaml +++ /dev/null @@ -1,15 +0,0 @@ -apiVersion: v1 -kind: PersistentVolumeClaim -metadata: - labels: - io.kompose.service: nextcloud-aio-nextcloud-mount - name: nextcloud-aio-nextcloud-mount -spec: - {{- if .Values.STORAGE_CLASS }} - storageClassName: {{ .Values.STORAGE_CLASS }} - {{- end }} - accessModes: - - ReadWriteOnce - resources: - requests: - storage: 1Gi diff --git a/helm-chart/templates/nextcloud-aio-nextcloud-persistentvolumeclaim.yaml b/helm-chart/templates/nextcloud-aio-nextcloud-persistentvolumeclaim.yaml index 9a00b40c..391b26e9 100755 --- a/helm-chart/templates/nextcloud-aio-nextcloud-persistentvolumeclaim.yaml +++ b/helm-chart/templates/nextcloud-aio-nextcloud-persistentvolumeclaim.yaml @@ -12,4 +12,4 @@ spec: - ReadWriteOnce resources: requests: - storage: 1Gi + storage: 2Gi diff --git a/helm-chart/templates/nextcloud-aio-nextcloud-trusted-cacerts-persistentvolumeclaim.yaml b/helm-chart/templates/nextcloud-aio-nextcloud-trusted-cacerts-persistentvolumeclaim.yaml index f3826da7..ad7c0d1e 100755 --- a/helm-chart/templates/nextcloud-aio-nextcloud-trusted-cacerts-persistentvolumeclaim.yaml +++ b/helm-chart/templates/nextcloud-aio-nextcloud-trusted-cacerts-persistentvolumeclaim.yaml @@ -12,4 +12,4 @@ spec: - ReadWriteOnce resources: requests: - storage: 1Gi + storage: 100Mi diff --git a/helm-chart/update-helm.sh b/helm-chart/update-helm.sh index 74d0e2a2..1c9bd347 100755 --- a/helm-chart/update-helm.sh +++ b/helm-chart/update-helm.sh @@ -28,8 +28,7 @@ sed -i "s|\${APACHE_PORT}:\${APACHE_PORT}/|$APACHE_PORT:$APACHE_PORT/|" latest.y sed -i "s|\${TALK_PORT}:\${TALK_PORT}/|$TALK_PORT:$TALK_PORT/|g" latest.yml sed -i "s|\${NEXTCLOUD_DATADIR}|$NEXTCLOUD_DATADIR|" latest.yml sed -i "/NEXTCLOUD_DATADIR/d" latest.yml -sed -i "s|\${NEXTCLOUD_MOUNT}:\${NEXTCLOUD_MOUNT}:|nextcloud_aio_nextcloud_mount:$NEXTCLOUD_MOUNT:|" latest.yml -sed -i "/^volumes:/a\ \ nextcloud_aio_nextcloud_mount:\n \ \ \ \ name: nextcloud_aio_nextcloud_mount" latest.yml +sed -i "/\${NEXTCLOUD_MOUNT}/d" latest.yml sed -i "/^volumes:/a\ \ nextcloud_aio_nextcloud_trusted_cacerts:\n \ \ \ \ name: nextcloud_aio_nextcloud_trusted_cacerts" latest.yml sed -i "s|\${NEXTCLOUD_TRUSTED_CACERTS_DIR}:|nextcloud_aio_nextcloud_trusted_cacerts:|g#" latest.yml sed -i 's|\${|{{ .Values.|g' latest.yml @@ -48,7 +47,15 @@ find ./ -name '*deployment.yaml' -exec sed -i "s|manual-install-nextcloud-aio|ne # shellcheck disable=SC1083 find ./ -name '*deployment.yaml' -exec sed -i "/^ spec:/a\ \ \ \ \ \ securityContext:\n\ \ \ \ \ \ \ \ fsGroup: 65534\n\ \ \ \ \ \ \ \ fsGroupChangePolicy: \"OnRootMismatch\"" \{} \; # shellcheck disable=SC1083 -find ./ -name '*persistentvolumeclaim.yaml' -exec sed -i "s|storage: 100Mi|storage: 1Gi|" \{} \; +find ./ \( -not -name '*apache*' -not -name '*collabora-fonts*' -not -name '*trusted-cacerts*' -name '*persistentvolumeclaim.yaml' \) -exec sed -i "s|storage: 100Mi|storage: 1Gi|" \{} \; +# shellcheck disable=SC1083 +find ./ -name '*nextcloud-persistentvolumeclaim.yaml' -exec sed -i "s|storage: 1Gi|storage: 2Gi|" \{} \; +# shellcheck disable=SC1083 +find ./ -name '*nextcloud-data-persistentvolumeclaim.yaml' -exec sed -i "s|storage: 1Gi|storage: {{ .Values.NEXTCLOUD_DATA_STORAGE_SIZE }}|" \{} \; +# shellcheck disable=SC1083 +find ./ -name '*database*persistentvolumeclaim.yaml' -exec sed -i "s|storage: 1Gi|storage: {{ .Values.DATABASE_STORAGE_SIZE }}|" \{} \; +# shellcheck disable=SC1083 +find ./ -name '*elasticsearch-persistentvolumeclaim.yaml' -exec sed -i "s|storage: 1Gi|storage: {{ .Values.FULLTEXTSEARCH_STORAGE_SIZE }}|" \{} \; # shellcheck disable=SC1083 find ./ -name '*persistentvolumeclaim.yaml' -exec sed -i "s|ReadOnlyMany|ReadWriteOnce|" \{} \; # shellcheck disable=SC1083 @@ -97,9 +104,16 @@ sed -i 's|"||g' /tmp/sample.conf sed -i 's|=|: |' /tmp/sample.conf sed -i 's|= |: |' /tmp/sample.conf sed -i '/^NEXTCLOUD_DATADIR/d' /tmp/sample.conf -sed -i 's|^NEXTCLOUD_MOUNT: .*|NEXTCLOUD_MOUNT: # Setting this to any value allows to enable external storages in Nextcloud|' /tmp/sample.conf +sed -i '/^NEXTCLOUD_MOUNT/d' /tmp/sample.conf sed -i 's|^NEXTCLOUD_TRUSTED_CACERTS_DIR: .*|NEXTCLOUD_TRUSTED_CACERTS_DIR: # Setting this to any value allows to automatically import root certificates into the Nextcloud container|' /tmp/sample.conf +# shellcheck disable=SC2129 echo 'STORAGE_CLASS: # By setting this, you can adjust the storage class for your volumes' >> /tmp/sample.conf +# shellcheck disable=SC2129 +echo 'NEXTCLOUD_DATA_STORAGE_SIZE: 10Gi # You can change the size of Nextclouds Datadir with this value' >> /tmp/sample.conf +# shellcheck disable=SC2129 +echo 'DATABASE_STORAGE_SIZE: 1Gi # You can change the size of the database volume with this value' >> /tmp/sample.conf +# shellcheck disable=SC2129 +echo 'FULLTEXTSEARCH_STORAGE_SIZE: 1Gi # You can change the size of the fulltextsearch volume with this value' >> /tmp/sample.conf mv /tmp/sample.conf ../helm-chart/values.yaml ENABLED_VARIABLES="$(grep -oP '^[A-Z]+_ENABLED' ../helm-chart/values.yaml)" diff --git a/helm-chart/values.yaml b/helm-chart/values.yaml index e18a34a9..097108de 100755 --- a/helm-chart/values.yaml +++ b/helm-chart/values.yaml @@ -17,7 +17,6 @@ NEXTCLOUD_ADDITIONAL_APKS: imagemagick # This allows to add additional pa NEXTCLOUD_ADDITIONAL_PHP_EXTENSIONS: imagick # This allows to add additional php extensions to the Nextcloud container permanently. Default is imagick but can be overwritten by modifying this value. NEXTCLOUD_MAX_TIME: 3600 # This allows to change the upload time limit of the Nextcloud container NEXTCLOUD_MEMORY_LIMIT: 512M # This allows to change the PHP memory limit of the Nextcloud container -NEXTCLOUD_MOUNT: # Setting this to any value allows to enable external storages in Nextcloud NEXTCLOUD_PASSWORD: # TODO! This is the password of the initially created Nextcloud admin with username admin. NEXTCLOUD_STARTUP_APPS: deck twofactor_totp tasks calendar contacts # Allows to modify the Nextcloud apps that are installed on starting AIO the first time NEXTCLOUD_TRUSTED_CACERTS_DIR: # Setting this to any value allows to automatically import root certificates into the Nextcloud container @@ -32,3 +31,6 @@ TIMEZONE: Europe/Berlin # TODO! This is the timezone that your containe TURN_SECRET: # TODO! This needs to be a unique and good password! UPDATE_NEXTCLOUD_APPS: no # When setting to yes, it will automatically update all installed Nextcloud apps upon container startup on saturdays. STORAGE_CLASS: # By setting this, you can adjust the storage class for your volumes +NEXTCLOUD_DATA_STORAGE_SIZE: 10Gi # You can change the size of Nextclouds Datadir with this value +DATABASE_STORAGE_SIZE: 1Gi # You can change the size of the database volume with this value +FULLTEXTSEARCH_STORAGE_SIZE: 1Gi # You can change the size of the fulltextsearch volume with this value From b6c3a777b0628cf3116b045bbade24e440d04eb9 Mon Sep 17 00:00:00 2001 From: Simon L Date: Mon, 30 Jan 2023 21:42:32 +0100 Subject: [PATCH 4/8] allow to adjust all volume sizes Signed-off-by: Simon L --- .../nextcloud-aio-apache-persistentvolumeclaim.yaml | 2 +- .../nextcloud-aio-clamav-persistentvolumeclaim.yaml | 2 +- ...loud-aio-collabora-fonts-persistentvolumeclaim.yaml | 2 +- .../nextcloud-aio-nextcloud-persistentvolumeclaim.yaml | 2 +- ...extcloud-trusted-cacerts-persistentvolumeclaim.yaml | 2 +- ...nextcloud-aio-onlyoffice-persistentvolumeclaim.yaml | 2 +- .../nextcloud-aio-redis-persistentvolumeclaim.yaml | 2 +- helm-chart/update-helm.sh | 10 ++++++++-- helm-chart/values.yaml | 2 ++ 9 files changed, 17 insertions(+), 9 deletions(-) diff --git a/helm-chart/templates/nextcloud-aio-apache-persistentvolumeclaim.yaml b/helm-chart/templates/nextcloud-aio-apache-persistentvolumeclaim.yaml index f63ffab1..c6d9271d 100755 --- a/helm-chart/templates/nextcloud-aio-apache-persistentvolumeclaim.yaml +++ b/helm-chart/templates/nextcloud-aio-apache-persistentvolumeclaim.yaml @@ -12,4 +12,4 @@ spec: - ReadWriteOnce resources: requests: - storage: 100Mi + storage: {{ .Values.DEFAULT_100M_STORAGE_SIZE }} diff --git a/helm-chart/templates/nextcloud-aio-clamav-persistentvolumeclaim.yaml b/helm-chart/templates/nextcloud-aio-clamav-persistentvolumeclaim.yaml index 6c4c4b79..e2379616 100755 --- a/helm-chart/templates/nextcloud-aio-clamav-persistentvolumeclaim.yaml +++ b/helm-chart/templates/nextcloud-aio-clamav-persistentvolumeclaim.yaml @@ -12,4 +12,4 @@ spec: - ReadWriteOnce resources: requests: - storage: 1Gi + storage: {{ .Values.DEFAULT_1G_STORAGE_SIZE }} diff --git a/helm-chart/templates/nextcloud-aio-collabora-fonts-persistentvolumeclaim.yaml b/helm-chart/templates/nextcloud-aio-collabora-fonts-persistentvolumeclaim.yaml index 8e514c89..e06d64d1 100755 --- a/helm-chart/templates/nextcloud-aio-collabora-fonts-persistentvolumeclaim.yaml +++ b/helm-chart/templates/nextcloud-aio-collabora-fonts-persistentvolumeclaim.yaml @@ -12,4 +12,4 @@ spec: - ReadWriteOnce resources: requests: - storage: 100Mi + storage: {{ .Values.DEFAULT_100M_STORAGE_SIZE }} diff --git a/helm-chart/templates/nextcloud-aio-nextcloud-persistentvolumeclaim.yaml b/helm-chart/templates/nextcloud-aio-nextcloud-persistentvolumeclaim.yaml index 391b26e9..d6b26e25 100755 --- a/helm-chart/templates/nextcloud-aio-nextcloud-persistentvolumeclaim.yaml +++ b/helm-chart/templates/nextcloud-aio-nextcloud-persistentvolumeclaim.yaml @@ -12,4 +12,4 @@ spec: - ReadWriteOnce resources: requests: - storage: 2Gi + storage: {{ .Values.DEFAULT_1G_STORAGE_SIZE }} diff --git a/helm-chart/templates/nextcloud-aio-nextcloud-trusted-cacerts-persistentvolumeclaim.yaml b/helm-chart/templates/nextcloud-aio-nextcloud-trusted-cacerts-persistentvolumeclaim.yaml index ad7c0d1e..ed827317 100755 --- a/helm-chart/templates/nextcloud-aio-nextcloud-trusted-cacerts-persistentvolumeclaim.yaml +++ b/helm-chart/templates/nextcloud-aio-nextcloud-trusted-cacerts-persistentvolumeclaim.yaml @@ -12,4 +12,4 @@ spec: - ReadWriteOnce resources: requests: - storage: 100Mi + storage: {{ .Values.DEFAULT_100M_STORAGE_SIZE }} diff --git a/helm-chart/templates/nextcloud-aio-onlyoffice-persistentvolumeclaim.yaml b/helm-chart/templates/nextcloud-aio-onlyoffice-persistentvolumeclaim.yaml index 0a97d85f..a6fab5f5 100755 --- a/helm-chart/templates/nextcloud-aio-onlyoffice-persistentvolumeclaim.yaml +++ b/helm-chart/templates/nextcloud-aio-onlyoffice-persistentvolumeclaim.yaml @@ -12,4 +12,4 @@ spec: - ReadWriteOnce resources: requests: - storage: 1Gi + storage: {{ .Values.DEFAULT_1G_STORAGE_SIZE }} diff --git a/helm-chart/templates/nextcloud-aio-redis-persistentvolumeclaim.yaml b/helm-chart/templates/nextcloud-aio-redis-persistentvolumeclaim.yaml index c9c003e2..06c64253 100755 --- a/helm-chart/templates/nextcloud-aio-redis-persistentvolumeclaim.yaml +++ b/helm-chart/templates/nextcloud-aio-redis-persistentvolumeclaim.yaml @@ -12,4 +12,4 @@ spec: - ReadWriteOnce resources: requests: - storage: 1Gi + storage: {{ .Values.DEFAULT_1G_STORAGE_SIZE }} diff --git a/helm-chart/update-helm.sh b/helm-chart/update-helm.sh index 1c9bd347..84ce9cb5 100755 --- a/helm-chart/update-helm.sh +++ b/helm-chart/update-helm.sh @@ -49,14 +49,16 @@ find ./ -name '*deployment.yaml' -exec sed -i "/^ spec:/a\ \ \ \ \ \ security # shellcheck disable=SC1083 find ./ \( -not -name '*apache*' -not -name '*collabora-fonts*' -not -name '*trusted-cacerts*' -name '*persistentvolumeclaim.yaml' \) -exec sed -i "s|storage: 100Mi|storage: 1Gi|" \{} \; # shellcheck disable=SC1083 -find ./ -name '*nextcloud-persistentvolumeclaim.yaml' -exec sed -i "s|storage: 1Gi|storage: 2Gi|" \{} \; -# shellcheck disable=SC1083 find ./ -name '*nextcloud-data-persistentvolumeclaim.yaml' -exec sed -i "s|storage: 1Gi|storage: {{ .Values.NEXTCLOUD_DATA_STORAGE_SIZE }}|" \{} \; # shellcheck disable=SC1083 find ./ -name '*database*persistentvolumeclaim.yaml' -exec sed -i "s|storage: 1Gi|storage: {{ .Values.DATABASE_STORAGE_SIZE }}|" \{} \; # shellcheck disable=SC1083 find ./ -name '*elasticsearch-persistentvolumeclaim.yaml' -exec sed -i "s|storage: 1Gi|storage: {{ .Values.FULLTEXTSEARCH_STORAGE_SIZE }}|" \{} \; # shellcheck disable=SC1083 +find ./ -name '*persistentvolumeclaim.yaml' -exec sed -i "s|storage: 100Mi|storage: {{ .Values.DEFAULT_100M_STORAGE_SIZE }}|" \{} \; +# shellcheck disable=SC1083 +find ./ -name '*persistentvolumeclaim.yaml' -exec sed -i "s|storage: 1Gi|storage: {{ .Values.DEFAULT_1G_STORAGE_SIZE }}|" \{} \; +# shellcheck disable=SC1083 find ./ -name '*persistentvolumeclaim.yaml' -exec sed -i "s|ReadOnlyMany|ReadWriteOnce|" \{} \; # shellcheck disable=SC1083 find ./ -name '*persistentvolumeclaim.yaml' -exec sed -i "/accessModes:/i\ \ {{- if .Values.STORAGE_CLASS }}" \{} \; @@ -114,6 +116,10 @@ echo 'NEXTCLOUD_DATA_STORAGE_SIZE: 10Gi # You can change the size of Nextc echo 'DATABASE_STORAGE_SIZE: 1Gi # You can change the size of the database volume with this value' >> /tmp/sample.conf # shellcheck disable=SC2129 echo 'FULLTEXTSEARCH_STORAGE_SIZE: 1Gi # You can change the size of the fulltextsearch volume with this value' >> /tmp/sample.conf +# shellcheck disable=SC2129 +echo 'DEFAULT_100M_STORAGE_SIZE: 100Mi # You can change the size of the remaining volumes that default to 100Mi with this value' >> /tmp/sample.conf +# shellcheck disable=SC2129 +echo 'DEFAULT_1G_STORAGE_SIZE: 1Gi # You can change the size of the remaining volumes that default to 1Gi with this value' >> /tmp/sample.conf mv /tmp/sample.conf ../helm-chart/values.yaml ENABLED_VARIABLES="$(grep -oP '^[A-Z]+_ENABLED' ../helm-chart/values.yaml)" diff --git a/helm-chart/values.yaml b/helm-chart/values.yaml index 097108de..53c4204d 100755 --- a/helm-chart/values.yaml +++ b/helm-chart/values.yaml @@ -34,3 +34,5 @@ STORAGE_CLASS: # By setting this, you can adjust the storage class for yo NEXTCLOUD_DATA_STORAGE_SIZE: 10Gi # You can change the size of Nextclouds Datadir with this value DATABASE_STORAGE_SIZE: 1Gi # You can change the size of the database volume with this value FULLTEXTSEARCH_STORAGE_SIZE: 1Gi # You can change the size of the fulltextsearch volume with this value +DEFAULT_100M_STORAGE_SIZE: 100Mi # You can change the size of the remaining volumes that default to 100Mi with this value +DEFAULT_1G_STORAGE_SIZE: 1Gi # You can change the size of the remaining volumes that default to 1Gi with this value From 133b149ee3272d6ac7815b3230edc5fd7215617a Mon Sep 17 00:00:00 2001 From: Simon L Date: Wed, 1 Feb 2023 12:35:40 +0100 Subject: [PATCH 5/8] allow to change the size of each volume separately Signed-off-by: Simon L --- ...loud-aio-apache-persistentvolumeclaim.yaml | 2 +- ...loud-aio-clamav-persistentvolumeclaim.yaml | 2 +- ...collabora-fonts-persistentvolumeclaim.yaml | 2 +- ...o-database-dump-persistentvolumeclaim.yaml | 2 +- ...o-elasticsearch-persistentvolumeclaim.yaml | 2 +- ...d-aio-nextcloud-persistentvolumeclaim.yaml | 2 +- ...trusted-cacerts-persistentvolumeclaim.yaml | 2 +- ...-aio-onlyoffice-persistentvolumeclaim.yaml | 2 +- ...cloud-aio-redis-persistentvolumeclaim.yaml | 2 +- helm-chart/update-helm.sh | 33 +++++++------------ helm-chart/values.yaml | 16 ++++++--- 11 files changed, 31 insertions(+), 36 deletions(-) diff --git a/helm-chart/templates/nextcloud-aio-apache-persistentvolumeclaim.yaml b/helm-chart/templates/nextcloud-aio-apache-persistentvolumeclaim.yaml index c6d9271d..35c851a6 100755 --- a/helm-chart/templates/nextcloud-aio-apache-persistentvolumeclaim.yaml +++ b/helm-chart/templates/nextcloud-aio-apache-persistentvolumeclaim.yaml @@ -12,4 +12,4 @@ spec: - ReadWriteOnce resources: requests: - storage: {{ .Values.DEFAULT_100M_STORAGE_SIZE }} + storage: {{ .Values.APACHE_STORAGE_SIZE }} diff --git a/helm-chart/templates/nextcloud-aio-clamav-persistentvolumeclaim.yaml b/helm-chart/templates/nextcloud-aio-clamav-persistentvolumeclaim.yaml index e2379616..68709d1f 100755 --- a/helm-chart/templates/nextcloud-aio-clamav-persistentvolumeclaim.yaml +++ b/helm-chart/templates/nextcloud-aio-clamav-persistentvolumeclaim.yaml @@ -12,4 +12,4 @@ spec: - ReadWriteOnce resources: requests: - storage: {{ .Values.DEFAULT_1G_STORAGE_SIZE }} + storage: {{ .Values.CLAMAV_STORAGE_SIZE }} diff --git a/helm-chart/templates/nextcloud-aio-collabora-fonts-persistentvolumeclaim.yaml b/helm-chart/templates/nextcloud-aio-collabora-fonts-persistentvolumeclaim.yaml index e06d64d1..ea0b9c00 100755 --- a/helm-chart/templates/nextcloud-aio-collabora-fonts-persistentvolumeclaim.yaml +++ b/helm-chart/templates/nextcloud-aio-collabora-fonts-persistentvolumeclaim.yaml @@ -12,4 +12,4 @@ spec: - ReadWriteOnce resources: requests: - storage: {{ .Values.DEFAULT_100M_STORAGE_SIZE }} + storage: {{ .Values.COLLABORA_FONTS_STORAGE_SIZE }} diff --git a/helm-chart/templates/nextcloud-aio-database-dump-persistentvolumeclaim.yaml b/helm-chart/templates/nextcloud-aio-database-dump-persistentvolumeclaim.yaml index 2c87ac91..78ff6742 100755 --- a/helm-chart/templates/nextcloud-aio-database-dump-persistentvolumeclaim.yaml +++ b/helm-chart/templates/nextcloud-aio-database-dump-persistentvolumeclaim.yaml @@ -12,4 +12,4 @@ spec: - ReadWriteOnce resources: requests: - storage: {{ .Values.DATABASE_STORAGE_SIZE }} + storage: {{ .Values.DATABASE_DUMP_STORAGE_SIZE }} diff --git a/helm-chart/templates/nextcloud-aio-elasticsearch-persistentvolumeclaim.yaml b/helm-chart/templates/nextcloud-aio-elasticsearch-persistentvolumeclaim.yaml index 04bee927..8ec6bbb4 100755 --- a/helm-chart/templates/nextcloud-aio-elasticsearch-persistentvolumeclaim.yaml +++ b/helm-chart/templates/nextcloud-aio-elasticsearch-persistentvolumeclaim.yaml @@ -12,4 +12,4 @@ spec: - ReadWriteOnce resources: requests: - storage: {{ .Values.FULLTEXTSEARCH_STORAGE_SIZE }} + storage: {{ .Values.ELASTICSEARCH_STORAGE_SIZE }} diff --git a/helm-chart/templates/nextcloud-aio-nextcloud-persistentvolumeclaim.yaml b/helm-chart/templates/nextcloud-aio-nextcloud-persistentvolumeclaim.yaml index d6b26e25..d07e3b61 100755 --- a/helm-chart/templates/nextcloud-aio-nextcloud-persistentvolumeclaim.yaml +++ b/helm-chart/templates/nextcloud-aio-nextcloud-persistentvolumeclaim.yaml @@ -12,4 +12,4 @@ spec: - ReadWriteOnce resources: requests: - storage: {{ .Values.DEFAULT_1G_STORAGE_SIZE }} + storage: {{ .Values.NEXTCLOUD_STORAGE_SIZE }} diff --git a/helm-chart/templates/nextcloud-aio-nextcloud-trusted-cacerts-persistentvolumeclaim.yaml b/helm-chart/templates/nextcloud-aio-nextcloud-trusted-cacerts-persistentvolumeclaim.yaml index ed827317..58384bde 100755 --- a/helm-chart/templates/nextcloud-aio-nextcloud-trusted-cacerts-persistentvolumeclaim.yaml +++ b/helm-chart/templates/nextcloud-aio-nextcloud-trusted-cacerts-persistentvolumeclaim.yaml @@ -12,4 +12,4 @@ spec: - ReadWriteOnce resources: requests: - storage: {{ .Values.DEFAULT_100M_STORAGE_SIZE }} + storage: {{ .Values.NEXTCLOUD_TRUSTED_CACERTS_STORAGE_SIZE }} diff --git a/helm-chart/templates/nextcloud-aio-onlyoffice-persistentvolumeclaim.yaml b/helm-chart/templates/nextcloud-aio-onlyoffice-persistentvolumeclaim.yaml index a6fab5f5..674ad7b6 100755 --- a/helm-chart/templates/nextcloud-aio-onlyoffice-persistentvolumeclaim.yaml +++ b/helm-chart/templates/nextcloud-aio-onlyoffice-persistentvolumeclaim.yaml @@ -12,4 +12,4 @@ spec: - ReadWriteOnce resources: requests: - storage: {{ .Values.DEFAULT_1G_STORAGE_SIZE }} + storage: {{ .Values.ONLYOFFICE_STORAGE_SIZE }} diff --git a/helm-chart/templates/nextcloud-aio-redis-persistentvolumeclaim.yaml b/helm-chart/templates/nextcloud-aio-redis-persistentvolumeclaim.yaml index 06c64253..10f3e7da 100755 --- a/helm-chart/templates/nextcloud-aio-redis-persistentvolumeclaim.yaml +++ b/helm-chart/templates/nextcloud-aio-redis-persistentvolumeclaim.yaml @@ -12,4 +12,4 @@ spec: - ReadWriteOnce resources: requests: - storage: {{ .Values.DEFAULT_1G_STORAGE_SIZE }} + storage: {{ .Values.REDIS_STORAGE_SIZE }} diff --git a/helm-chart/update-helm.sh b/helm-chart/update-helm.sh index 84ce9cb5..91216e48 100755 --- a/helm-chart/update-helm.sh +++ b/helm-chart/update-helm.sh @@ -47,18 +47,6 @@ find ./ -name '*deployment.yaml' -exec sed -i "s|manual-install-nextcloud-aio|ne # shellcheck disable=SC1083 find ./ -name '*deployment.yaml' -exec sed -i "/^ spec:/a\ \ \ \ \ \ securityContext:\n\ \ \ \ \ \ \ \ fsGroup: 65534\n\ \ \ \ \ \ \ \ fsGroupChangePolicy: \"OnRootMismatch\"" \{} \; # shellcheck disable=SC1083 -find ./ \( -not -name '*apache*' -not -name '*collabora-fonts*' -not -name '*trusted-cacerts*' -name '*persistentvolumeclaim.yaml' \) -exec sed -i "s|storage: 100Mi|storage: 1Gi|" \{} \; -# shellcheck disable=SC1083 -find ./ -name '*nextcloud-data-persistentvolumeclaim.yaml' -exec sed -i "s|storage: 1Gi|storage: {{ .Values.NEXTCLOUD_DATA_STORAGE_SIZE }}|" \{} \; -# shellcheck disable=SC1083 -find ./ -name '*database*persistentvolumeclaim.yaml' -exec sed -i "s|storage: 1Gi|storage: {{ .Values.DATABASE_STORAGE_SIZE }}|" \{} \; -# shellcheck disable=SC1083 -find ./ -name '*elasticsearch-persistentvolumeclaim.yaml' -exec sed -i "s|storage: 1Gi|storage: {{ .Values.FULLTEXTSEARCH_STORAGE_SIZE }}|" \{} \; -# shellcheck disable=SC1083 -find ./ -name '*persistentvolumeclaim.yaml' -exec sed -i "s|storage: 100Mi|storage: {{ .Values.DEFAULT_100M_STORAGE_SIZE }}|" \{} \; -# shellcheck disable=SC1083 -find ./ -name '*persistentvolumeclaim.yaml' -exec sed -i "s|storage: 1Gi|storage: {{ .Values.DEFAULT_1G_STORAGE_SIZE }}|" \{} \; -# shellcheck disable=SC1083 find ./ -name '*persistentvolumeclaim.yaml' -exec sed -i "s|ReadOnlyMany|ReadWriteOnce|" \{} \; # shellcheck disable=SC1083 find ./ -name '*persistentvolumeclaim.yaml' -exec sed -i "/accessModes:/i\ \ {{- if .Values.STORAGE_CLASS }}" \{} \; @@ -86,6 +74,14 @@ find ./ \( -not -name '*service.yaml' -name '*.yaml' \) -exec sed -i "/^status:/ find ./ \( -not -name '*persistentvolumeclaim.yaml' -name '*.yaml' \) -exec sed -i "/resources:/d" \{} \; # shellcheck disable=SC1083 find ./ -name '*.yaml' -exec sed -i "/creationTimestamp: null/d" \{} \; +VOLUMES="$(find ./ -name '*persistentvolumeclaim.yaml' | sed 's|-persistentvolumeclaim.yaml||g;s|.*nextcloud-aio-||g')" +mapfile -t VOLUMES <<< "$VOLUMES" +for variable in "${VOLUMES[@]}"; do + name="$(echo "$variable" | sed 's|-|_|g' | tr '[:lower:]' '[:upper:]')_STORAGE_SIZE" + VOLUME_VARIABLE+=("$name") + # shellcheck disable=SC1083 + find ./ -name "*nextcloud-aio-$variable-persistentvolumeclaim.yaml" -exec sed -i "s|storage: 100Mi|storage: {{ .Values.$name }}|" \{} \; +done cd ../ mkdir -p ../helm-chart/ @@ -110,16 +106,9 @@ sed -i '/^NEXTCLOUD_MOUNT/d' /tmp/sample.conf sed -i 's|^NEXTCLOUD_TRUSTED_CACERTS_DIR: .*|NEXTCLOUD_TRUSTED_CACERTS_DIR: # Setting this to any value allows to automatically import root certificates into the Nextcloud container|' /tmp/sample.conf # shellcheck disable=SC2129 echo 'STORAGE_CLASS: # By setting this, you can adjust the storage class for your volumes' >> /tmp/sample.conf -# shellcheck disable=SC2129 -echo 'NEXTCLOUD_DATA_STORAGE_SIZE: 10Gi # You can change the size of Nextclouds Datadir with this value' >> /tmp/sample.conf -# shellcheck disable=SC2129 -echo 'DATABASE_STORAGE_SIZE: 1Gi # You can change the size of the database volume with this value' >> /tmp/sample.conf -# shellcheck disable=SC2129 -echo 'FULLTEXTSEARCH_STORAGE_SIZE: 1Gi # You can change the size of the fulltextsearch volume with this value' >> /tmp/sample.conf -# shellcheck disable=SC2129 -echo 'DEFAULT_100M_STORAGE_SIZE: 100Mi # You can change the size of the remaining volumes that default to 100Mi with this value' >> /tmp/sample.conf -# shellcheck disable=SC2129 -echo 'DEFAULT_1G_STORAGE_SIZE: 1Gi # You can change the size of the remaining volumes that default to 1Gi with this value' >> /tmp/sample.conf +for variable in "${VOLUME_VARIABLE[@]}"; do + echo "$variable: 1Gi # You can change the size of the $(echo "$variable" | sed 's|_STORAGE_SIZE||;s|_|-|g' | tr '[:upper:]' '[:lower:]') volume that default to 1Gi with this value" >> /tmp/sample.conf +done mv /tmp/sample.conf ../helm-chart/values.yaml ENABLED_VARIABLES="$(grep -oP '^[A-Z]+_ENABLED' ../helm-chart/values.yaml)" diff --git a/helm-chart/values.yaml b/helm-chart/values.yaml index 53c4204d..d0232f5e 100755 --- a/helm-chart/values.yaml +++ b/helm-chart/values.yaml @@ -31,8 +31,14 @@ TIMEZONE: Europe/Berlin # TODO! This is the timezone that your containe TURN_SECRET: # TODO! This needs to be a unique and good password! UPDATE_NEXTCLOUD_APPS: no # When setting to yes, it will automatically update all installed Nextcloud apps upon container startup on saturdays. STORAGE_CLASS: # By setting this, you can adjust the storage class for your volumes -NEXTCLOUD_DATA_STORAGE_SIZE: 10Gi # You can change the size of Nextclouds Datadir with this value -DATABASE_STORAGE_SIZE: 1Gi # You can change the size of the database volume with this value -FULLTEXTSEARCH_STORAGE_SIZE: 1Gi # You can change the size of the fulltextsearch volume with this value -DEFAULT_100M_STORAGE_SIZE: 100Mi # You can change the size of the remaining volumes that default to 100Mi with this value -DEFAULT_1G_STORAGE_SIZE: 1Gi # You can change the size of the remaining volumes that default to 1Gi with this value +ELASTICSEARCH_STORAGE_SIZE: 1Gi # You can change the size of the elasticsearch volume that default to 1Gi with this value +NEXTCLOUD_TRUSTED_CACERTS_STORAGE_SIZE: 1Gi # You can change the size of the nextcloud-trusted-cacerts volume that default to 1Gi with this value +COLLABORA_FONTS_STORAGE_SIZE: 1Gi # You can change the size of the collabora-fonts volume that default to 1Gi with this value +ONLYOFFICE_STORAGE_SIZE: 1Gi # You can change the size of the onlyoffice volume that default to 1Gi with this value +CLAMAV_STORAGE_SIZE: 1Gi # You can change the size of the clamav volume that default to 1Gi with this value +DATABASE_DUMP_STORAGE_SIZE: 1Gi # You can change the size of the database-dump volume that default to 1Gi with this value +NEXTCLOUD_DATA_STORAGE_SIZE: 1Gi # You can change the size of the nextcloud-data volume that default to 1Gi with this value +NEXTCLOUD_STORAGE_SIZE: 1Gi # You can change the size of the nextcloud volume that default to 1Gi with this value +REDIS_STORAGE_SIZE: 1Gi # You can change the size of the redis volume that default to 1Gi with this value +DATABASE_STORAGE_SIZE: 1Gi # You can change the size of the database volume that default to 1Gi with this value +APACHE_STORAGE_SIZE: 1Gi # You can change the size of the apache volume that default to 1Gi with this value From c8576044b23dd2bd5b5fb80f02b96e4c90fa49a4 Mon Sep 17 00:00:00 2001 From: Simon L Date: Wed, 1 Feb 2023 12:51:53 +0100 Subject: [PATCH 6/8] change chart version to v2 Signed-off-by: Simon L --- helm-chart/Chart.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/helm-chart/Chart.yaml b/helm-chart/Chart.yaml index fefeda85..e4ab93a6 100755 --- a/helm-chart/Chart.yaml +++ b/helm-chart/Chart.yaml @@ -1,7 +1,7 @@ name: Nextcloud AIO Helm Chart description: A generated Helm Chart for Nextcloud AIO from Skippbox Kompose version: 4.2.0 -apiVersion: v1 +apiVersion: v2 keywords: - latest sources: https://github.com/nextcloud/all-in-one/tree/main/helm-chart From 0ea229e19abf6babc70debd90993570d853d7c0e Mon Sep 17 00:00:00 2001 From: Simon L Date: Wed, 1 Feb 2023 16:00:52 +0100 Subject: [PATCH 7/8] add volume permission workaround Signed-off-by: Simon L --- .../nextcloud-aio-apache-deployment.yaml | 17 +++++++++--- .../nextcloud-aio-clamav-deployment.yaml | 14 +++++++--- .../nextcloud-aio-collabora-deployment.yaml | 14 +++++++--- .../nextcloud-aio-database-deployment.yaml | 17 +++++++++--- ...xtcloud-aio-fulltextsearch-deployment.yaml | 14 +++++++--- .../nextcloud-aio-imaginary-deployment.yaml | 3 --- .../nextcloud-aio-nextcloud-deployment.yaml | 20 +++++++++++--- .../nextcloud-aio-onlyoffice-deployment.yaml | 14 +++++++--- .../nextcloud-aio-redis-deployment.yaml | 14 +++++++--- .../nextcloud-aio-talk-deployment.yaml | 3 --- helm-chart/update-helm.sh | 27 +++++++++++++++++-- 11 files changed, 125 insertions(+), 32 deletions(-) diff --git a/helm-chart/templates/nextcloud-aio-apache-deployment.yaml b/helm-chart/templates/nextcloud-aio-apache-deployment.yaml index 6f0b560a..2c0d6e77 100755 --- a/helm-chart/templates/nextcloud-aio-apache-deployment.yaml +++ b/helm-chart/templates/nextcloud-aio-apache-deployment.yaml @@ -21,9 +21,20 @@ spec: io.kompose.network/nextcloud-aio: "true" io.kompose.service: nextcloud-aio-apache spec: - securityContext: - fsGroup: 65534 - fsGroupChangePolicy: "OnRootMismatch" + initContainers: + - name: init-volumes + image: alpine + command: + - chmod + - -R + - 777 + - /nextcloud-aio-nextcloud + - /nextcloud-aio-apache + volumeMounts: + - name: nextcloud-aio-apache + mountPath: /nextcloud-aio-apache + - name: nextcloud-aio-nextcloud + mountPath: /nextcloud-aio-nextcloud containers: - env: - name: APACHE_MAX_SIZE diff --git a/helm-chart/templates/nextcloud-aio-clamav-deployment.yaml b/helm-chart/templates/nextcloud-aio-clamav-deployment.yaml index cf24fe5c..189721fc 100755 --- a/helm-chart/templates/nextcloud-aio-clamav-deployment.yaml +++ b/helm-chart/templates/nextcloud-aio-clamav-deployment.yaml @@ -22,9 +22,17 @@ spec: io.kompose.network/nextcloud-aio: "true" io.kompose.service: nextcloud-aio-clamav spec: - securityContext: - fsGroup: 65534 - fsGroupChangePolicy: "OnRootMismatch" + initContainers: + - name: init-volumes + image: alpine + command: + - chmod + - -R + - 777 + - /nextcloud-aio-clamav + volumeMounts: + - name: nextcloud-aio-clamav + mountPath: /nextcloud-aio-clamav containers: - env: - name: CLAMD_STARTUP_TIMEOUT diff --git a/helm-chart/templates/nextcloud-aio-collabora-deployment.yaml b/helm-chart/templates/nextcloud-aio-collabora-deployment.yaml index 9068033b..024c8833 100755 --- a/helm-chart/templates/nextcloud-aio-collabora-deployment.yaml +++ b/helm-chart/templates/nextcloud-aio-collabora-deployment.yaml @@ -22,9 +22,17 @@ spec: io.kompose.network/nextcloud-aio: "true" io.kompose.service: nextcloud-aio-collabora spec: - securityContext: - fsGroup: 65534 - fsGroupChangePolicy: "OnRootMismatch" + initContainers: + - name: init-volumes + image: alpine + command: + - chmod + - -R + - 777 + - /nextcloud-aio-collabora-fonts + volumeMounts: + - name: nextcloud-aio-collabora-fonts + mountPath: /nextcloud-aio-collabora-fonts containers: - env: - name: TZ diff --git a/helm-chart/templates/nextcloud-aio-database-deployment.yaml b/helm-chart/templates/nextcloud-aio-database-deployment.yaml index d1eb3c4e..258bf0d7 100755 --- a/helm-chart/templates/nextcloud-aio-database-deployment.yaml +++ b/helm-chart/templates/nextcloud-aio-database-deployment.yaml @@ -21,9 +21,20 @@ spec: io.kompose.network/nextcloud-aio: "true" io.kompose.service: nextcloud-aio-database spec: - securityContext: - fsGroup: 65534 - fsGroupChangePolicy: "OnRootMismatch" + initContainers: + - name: init-volumes + image: alpine + command: + - chmod + - -R + - 777 + - /nextcloud-aio-database + - /nextcloud-aio-database-dump + volumeMounts: + - name: nextcloud-aio-database-dump + mountPath: /nextcloud-aio-database-dump + - name: nextcloud-aio-database + mountPath: /nextcloud-aio-database containers: - env: - name: PGTZ diff --git a/helm-chart/templates/nextcloud-aio-fulltextsearch-deployment.yaml b/helm-chart/templates/nextcloud-aio-fulltextsearch-deployment.yaml index 64ff5e48..2060316a 100755 --- a/helm-chart/templates/nextcloud-aio-fulltextsearch-deployment.yaml +++ b/helm-chart/templates/nextcloud-aio-fulltextsearch-deployment.yaml @@ -22,9 +22,17 @@ spec: io.kompose.network/nextcloud-aio: "true" io.kompose.service: nextcloud-aio-fulltextsearch spec: - securityContext: - fsGroup: 65534 - fsGroupChangePolicy: "OnRootMismatch" + initContainers: + - name: init-volumes + image: alpine + command: + - chmod + - -R + - 777 + - /nextcloud-aio-elasticsearch + volumeMounts: + - name: nextcloud-aio-elasticsearch + mountPath: /nextcloud-aio-elasticsearch containers: - env: - name: ES_JAVA_OPTS diff --git a/helm-chart/templates/nextcloud-aio-imaginary-deployment.yaml b/helm-chart/templates/nextcloud-aio-imaginary-deployment.yaml index ea558eba..2eabe094 100755 --- a/helm-chart/templates/nextcloud-aio-imaginary-deployment.yaml +++ b/helm-chart/templates/nextcloud-aio-imaginary-deployment.yaml @@ -22,9 +22,6 @@ spec: io.kompose.network/nextcloud-aio: "true" io.kompose.service: nextcloud-aio-imaginary spec: - securityContext: - fsGroup: 65534 - fsGroupChangePolicy: "OnRootMismatch" containers: - env: - name: TZ diff --git a/helm-chart/templates/nextcloud-aio-nextcloud-deployment.yaml b/helm-chart/templates/nextcloud-aio-nextcloud-deployment.yaml index 6e9e1236..45b4da0e 100755 --- a/helm-chart/templates/nextcloud-aio-nextcloud-deployment.yaml +++ b/helm-chart/templates/nextcloud-aio-nextcloud-deployment.yaml @@ -21,9 +21,23 @@ spec: io.kompose.network/nextcloud-aio: "true" io.kompose.service: nextcloud-aio-nextcloud spec: - securityContext: - fsGroup: 65534 - fsGroupChangePolicy: "OnRootMismatch" + initContainers: + - name: init-volumes + image: alpine + command: + - chmod + - -R + - 777 + - /nextcloud-aio-nextcloud + - /nextcloud-aio-nextcloud-data + - /nextcloud-aio-nextcloud-trusted-cacerts + volumeMounts: + - name: nextcloud-aio-nextcloud-trusted-cacerts + mountPath: /nextcloud-aio-nextcloud-trusted-cacerts + - name: nextcloud-aio-nextcloud-data + mountPath: /nextcloud-aio-nextcloud-data + - name: nextcloud-aio-nextcloud + mountPath: /nextcloud-aio-nextcloud containers: - env: - name: ADDITIONAL_APKS diff --git a/helm-chart/templates/nextcloud-aio-onlyoffice-deployment.yaml b/helm-chart/templates/nextcloud-aio-onlyoffice-deployment.yaml index d4c9eef3..374471c6 100755 --- a/helm-chart/templates/nextcloud-aio-onlyoffice-deployment.yaml +++ b/helm-chart/templates/nextcloud-aio-onlyoffice-deployment.yaml @@ -22,9 +22,17 @@ spec: io.kompose.network/nextcloud-aio: "true" io.kompose.service: nextcloud-aio-onlyoffice spec: - securityContext: - fsGroup: 65534 - fsGroupChangePolicy: "OnRootMismatch" + initContainers: + - name: init-volumes + image: alpine + command: + - chmod + - -R + - 777 + - /nextcloud-aio-onlyoffice + volumeMounts: + - name: nextcloud-aio-onlyoffice + mountPath: /nextcloud-aio-onlyoffice containers: - env: - name: JWT_ENABLED diff --git a/helm-chart/templates/nextcloud-aio-redis-deployment.yaml b/helm-chart/templates/nextcloud-aio-redis-deployment.yaml index 3525d150..57be9cd7 100755 --- a/helm-chart/templates/nextcloud-aio-redis-deployment.yaml +++ b/helm-chart/templates/nextcloud-aio-redis-deployment.yaml @@ -21,9 +21,17 @@ spec: io.kompose.network/nextcloud-aio: "true" io.kompose.service: nextcloud-aio-redis spec: - securityContext: - fsGroup: 65534 - fsGroupChangePolicy: "OnRootMismatch" + initContainers: + - name: init-volumes + image: alpine + command: + - chmod + - -R + - 777 + - /nextcloud-aio-redis + volumeMounts: + - name: nextcloud-aio-redis + mountPath: /nextcloud-aio-redis containers: - env: - name: REDIS_HOST_PASSWORD diff --git a/helm-chart/templates/nextcloud-aio-talk-deployment.yaml b/helm-chart/templates/nextcloud-aio-talk-deployment.yaml index 9e25b9fb..06ac7f2d 100755 --- a/helm-chart/templates/nextcloud-aio-talk-deployment.yaml +++ b/helm-chart/templates/nextcloud-aio-talk-deployment.yaml @@ -22,9 +22,6 @@ spec: io.kompose.network/nextcloud-aio: "true" io.kompose.service: nextcloud-aio-talk spec: - securityContext: - fsGroup: 65534 - fsGroupChangePolicy: "OnRootMismatch" containers: - env: - name: JANUS_API_KEY diff --git a/helm-chart/update-helm.sh b/helm-chart/update-helm.sh index 91216e48..e60d530b 100755 --- a/helm-chart/update-helm.sh +++ b/helm-chart/update-helm.sh @@ -40,13 +40,36 @@ cd latest mv ./templates/manual-install-nextcloud-aio-networkpolicy.yaml ./templates/nextcloud-aio-networkpolicy.yaml # shellcheck disable=SC1083 find ./ -name '*networkpolicy.yaml' -exec sed -i "s|manual-install-nextcloud-aio|nextcloud-aio|" \{} \; +cat << EOL > /tmp/initcontainers + initContainers: + - name: init-volumes + image: alpine + command: + - chmod + - -R + - 777 + volumeMountsInitContainer: +EOL +# shellcheck disable=SC1083 +DEPLOYMENTS="$(find ./ -name '*deployment.yaml')" +mapfile -t DEPLOYMENTS <<< "$DEPLOYMENTS" +for variable in "${DEPLOYMENTS[@]}"; do + if grep -q volumeMounts "$variable"; then + sed -i "/^ spec:/r /tmp/initcontainers" "$variable" + volumeNames="$(grep -A1 mountPath "$variable" | grep -v mountPath | sed 's|.*name: ||' | sed '/^--$/d')" + mapfile -t volumeNames <<< "$volumeNames" + for volumeName in "${volumeNames[@]}"; do + sed -i "/^.*volumeMountsInitContainer:/i\ \ \ \ \ \ \ \ \ \ \ \ - /$volumeName" "$variable" + sed -i "/volumeMountsInitContainer:/a\ \ \ \ \ \ \ \ \ \ \ \ - name: $volumeName\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ mountPath: /$volumeName" "$variable" + done + sed -i "s|volumeMountsInitContainer|volumeMounts|" "$variable" + fi +done # shellcheck disable=SC1083 find ./ -name '*service.yaml' -exec sed -i "/^status:/,$ d" \{} \; # shellcheck disable=SC1083 find ./ -name '*deployment.yaml' -exec sed -i "s|manual-install-nextcloud-aio|nextcloud-aio|" \{} \; # shellcheck disable=SC1083 -find ./ -name '*deployment.yaml' -exec sed -i "/^ spec:/a\ \ \ \ \ \ securityContext:\n\ \ \ \ \ \ \ \ fsGroup: 65534\n\ \ \ \ \ \ \ \ fsGroupChangePolicy: \"OnRootMismatch\"" \{} \; -# shellcheck disable=SC1083 find ./ -name '*persistentvolumeclaim.yaml' -exec sed -i "s|ReadOnlyMany|ReadWriteOnce|" \{} \; # shellcheck disable=SC1083 find ./ -name '*persistentvolumeclaim.yaml' -exec sed -i "/accessModes:/i\ \ {{- if .Values.STORAGE_CLASS }}" \{} \; From be3798401cbf57c2713edadc08410817e99b14b0 Mon Sep 17 00:00:00 2001 From: Simon L Date: Wed, 1 Feb 2023 18:51:40 +0100 Subject: [PATCH 8/8] address review Signed-off-by: Simon L --- helm-chart/templates/nextcloud-aio-apache-deployment.yaml | 3 +-- helm-chart/templates/nextcloud-aio-clamav-deployment.yaml | 3 +-- helm-chart/templates/nextcloud-aio-collabora-deployment.yaml | 3 +-- helm-chart/templates/nextcloud-aio-database-deployment.yaml | 3 +-- .../templates/nextcloud-aio-fulltextsearch-deployment.yaml | 3 +-- helm-chart/templates/nextcloud-aio-nextcloud-deployment.yaml | 3 +-- helm-chart/templates/nextcloud-aio-onlyoffice-deployment.yaml | 3 +-- helm-chart/templates/nextcloud-aio-redis-deployment.yaml | 3 +-- helm-chart/update-helm.sh | 3 +-- 9 files changed, 9 insertions(+), 18 deletions(-) diff --git a/helm-chart/templates/nextcloud-aio-apache-deployment.yaml b/helm-chart/templates/nextcloud-aio-apache-deployment.yaml index 2c0d6e77..42a162a0 100755 --- a/helm-chart/templates/nextcloud-aio-apache-deployment.yaml +++ b/helm-chart/templates/nextcloud-aio-apache-deployment.yaml @@ -26,8 +26,7 @@ spec: image: alpine command: - chmod - - -R - - 777 + - "777" - /nextcloud-aio-nextcloud - /nextcloud-aio-apache volumeMounts: diff --git a/helm-chart/templates/nextcloud-aio-clamav-deployment.yaml b/helm-chart/templates/nextcloud-aio-clamav-deployment.yaml index 189721fc..79ba5fa0 100755 --- a/helm-chart/templates/nextcloud-aio-clamav-deployment.yaml +++ b/helm-chart/templates/nextcloud-aio-clamav-deployment.yaml @@ -27,8 +27,7 @@ spec: image: alpine command: - chmod - - -R - - 777 + - "777" - /nextcloud-aio-clamav volumeMounts: - name: nextcloud-aio-clamav diff --git a/helm-chart/templates/nextcloud-aio-collabora-deployment.yaml b/helm-chart/templates/nextcloud-aio-collabora-deployment.yaml index 024c8833..e45299b1 100755 --- a/helm-chart/templates/nextcloud-aio-collabora-deployment.yaml +++ b/helm-chart/templates/nextcloud-aio-collabora-deployment.yaml @@ -27,8 +27,7 @@ spec: image: alpine command: - chmod - - -R - - 777 + - "777" - /nextcloud-aio-collabora-fonts volumeMounts: - name: nextcloud-aio-collabora-fonts diff --git a/helm-chart/templates/nextcloud-aio-database-deployment.yaml b/helm-chart/templates/nextcloud-aio-database-deployment.yaml index 258bf0d7..1069990e 100755 --- a/helm-chart/templates/nextcloud-aio-database-deployment.yaml +++ b/helm-chart/templates/nextcloud-aio-database-deployment.yaml @@ -26,8 +26,7 @@ spec: image: alpine command: - chmod - - -R - - 777 + - "777" - /nextcloud-aio-database - /nextcloud-aio-database-dump volumeMounts: diff --git a/helm-chart/templates/nextcloud-aio-fulltextsearch-deployment.yaml b/helm-chart/templates/nextcloud-aio-fulltextsearch-deployment.yaml index 2060316a..0f9fc173 100755 --- a/helm-chart/templates/nextcloud-aio-fulltextsearch-deployment.yaml +++ b/helm-chart/templates/nextcloud-aio-fulltextsearch-deployment.yaml @@ -27,8 +27,7 @@ spec: image: alpine command: - chmod - - -R - - 777 + - "777" - /nextcloud-aio-elasticsearch volumeMounts: - name: nextcloud-aio-elasticsearch diff --git a/helm-chart/templates/nextcloud-aio-nextcloud-deployment.yaml b/helm-chart/templates/nextcloud-aio-nextcloud-deployment.yaml index 45b4da0e..4cb83af7 100755 --- a/helm-chart/templates/nextcloud-aio-nextcloud-deployment.yaml +++ b/helm-chart/templates/nextcloud-aio-nextcloud-deployment.yaml @@ -26,8 +26,7 @@ spec: image: alpine command: - chmod - - -R - - 777 + - "777" - /nextcloud-aio-nextcloud - /nextcloud-aio-nextcloud-data - /nextcloud-aio-nextcloud-trusted-cacerts diff --git a/helm-chart/templates/nextcloud-aio-onlyoffice-deployment.yaml b/helm-chart/templates/nextcloud-aio-onlyoffice-deployment.yaml index 374471c6..fe624307 100755 --- a/helm-chart/templates/nextcloud-aio-onlyoffice-deployment.yaml +++ b/helm-chart/templates/nextcloud-aio-onlyoffice-deployment.yaml @@ -27,8 +27,7 @@ spec: image: alpine command: - chmod - - -R - - 777 + - "777" - /nextcloud-aio-onlyoffice volumeMounts: - name: nextcloud-aio-onlyoffice diff --git a/helm-chart/templates/nextcloud-aio-redis-deployment.yaml b/helm-chart/templates/nextcloud-aio-redis-deployment.yaml index 57be9cd7..d47659a4 100755 --- a/helm-chart/templates/nextcloud-aio-redis-deployment.yaml +++ b/helm-chart/templates/nextcloud-aio-redis-deployment.yaml @@ -26,8 +26,7 @@ spec: image: alpine command: - chmod - - -R - - 777 + - "777" - /nextcloud-aio-redis volumeMounts: - name: nextcloud-aio-redis diff --git a/helm-chart/update-helm.sh b/helm-chart/update-helm.sh index e60d530b..b0602e74 100755 --- a/helm-chart/update-helm.sh +++ b/helm-chart/update-helm.sh @@ -46,8 +46,7 @@ cat << EOL > /tmp/initcontainers image: alpine command: - chmod - - -R - - 777 + - "777" volumeMountsInitContainer: EOL # shellcheck disable=SC1083