diff --git a/helm-chart/Chart.yaml b/helm-chart/Chart.yaml index 606c05ff..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.0.1 -apiVersion: v1 +version: 4.2.0 +apiVersion: v2 keywords: - latest sources: https://github.com/nextcloud/all-in-one/tree/main/helm-chart diff --git a/helm-chart/templates/nextcloud-aio-apache-deployment.yaml b/helm-chart/templates/nextcloud-aio-apache-deployment.yaml index 6b23459a..42a162a0 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,11 +16,24 @@ 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 spec: + initContainers: + - name: init-volumes + image: alpine + command: + - chmod + - "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 @@ -41,10 +54,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..35c851a6 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: {{ .Values.APACHE_STORAGE_SIZE }} 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..79ba5fa0 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,18 +17,28 @@ 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 spec: + initContainers: + - name: init-volumes + image: alpine + command: + - chmod + - "777" + - /nextcloud-aio-clamav + volumeMounts: + - name: nextcloud-aio-clamav + mountPath: /nextcloud-aio-clamav containers: - env: - name: CLAMD_STARTUP_TIMEOUT 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..68709d1f 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: {{ .Values.CLAMAV_STORAGE_SIZE }} diff --git a/helm-chart/templates/nextcloud-aio-collabora-deployment.yaml b/helm-chart/templates/nextcloud-aio-collabora-deployment.yaml index 2f83b739..e45299b1 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,11 +17,21 @@ 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 spec: + initContainers: + - name: init-volumes + image: alpine + command: + - chmod + - "777" + - /nextcloud-aio-collabora-fonts + volumeMounts: + - name: nextcloud-aio-collabora-fonts + mountPath: /nextcloud-aio-collabora-fonts containers: - env: - name: TZ @@ -32,7 +42,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..ea0b9c00 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: {{ .Values.COLLABORA_FONTS_STORAGE_SIZE }} diff --git a/helm-chart/templates/nextcloud-aio-database-deployment.yaml b/helm-chart/templates/nextcloud-aio-database-deployment.yaml index b5bae70e..1069990e 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,11 +16,24 @@ 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 spec: + initContainers: + - name: init-volumes + image: alpine + command: + - chmod + - "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 @@ -33,7 +46,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..78ff6742 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: {{ .Values.DATABASE_DUMP_STORAGE_SIZE }} diff --git a/helm-chart/templates/nextcloud-aio-database-persistentvolumeclaim.yaml b/helm-chart/templates/nextcloud-aio-database-persistentvolumeclaim.yaml index 71a78ad6..a8522aae 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: {{ .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 ec2ecbce..8ec6bbb4 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: {{ .Values.ELASTICSEARCH_STORAGE_SIZE }} diff --git a/helm-chart/templates/nextcloud-aio-fulltextsearch-deployment.yaml b/helm-chart/templates/nextcloud-aio-fulltextsearch-deployment.yaml index 33408159..0f9fc173 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,11 +17,21 @@ 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 spec: + initContainers: + - name: init-volumes + image: alpine + command: + - chmod + - "777" + - /nextcloud-aio-elasticsearch + volumeMounts: + - name: nextcloud-aio-elasticsearch + mountPath: /nextcloud-aio-elasticsearch containers: - env: - name: ES_JAVA_OPTS @@ -30,7 +40,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..50594a1f 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: {{ .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 72483cfe..4cb83af7 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,11 +16,27 @@ 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 spec: + initContainers: + - name: init-volumes + image: alpine + command: + - chmod + - "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 @@ -55,8 +71,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 @@ -101,15 +115,13 @@ 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/ - name: nextcloud-aio-nextcloud-mount - mountPath: /usr/local/share/ca-certificates name: nextcloud-aio-nextcloud-trusted-cacerts readOnly: true @@ -120,9 +132,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 ced4114b..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: - - ReadWriteMany - resources: - requests: - storage: {{ .Values.MAX_STORAGE_SIZE }} diff --git a/helm-chart/templates/nextcloud-aio-nextcloud-persistentvolumeclaim.yaml b/helm-chart/templates/nextcloud-aio-nextcloud-persistentvolumeclaim.yaml index b047dc5a..d07e3b61 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: {{ .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 6a46650c..58384bde 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: {{ .Values.NEXTCLOUD_TRUSTED_CACERTS_STORAGE_SIZE }} diff --git a/helm-chart/templates/nextcloud-aio-onlyoffice-deployment.yaml b/helm-chart/templates/nextcloud-aio-onlyoffice-deployment.yaml index 1da2dbb7..fe624307 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,11 +17,21 @@ 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 spec: + initContainers: + - name: init-volumes + image: alpine + command: + - chmod + - "777" + - /nextcloud-aio-onlyoffice + volumeMounts: + - name: nextcloud-aio-onlyoffice + mountPath: /nextcloud-aio-onlyoffice containers: - env: - name: JWT_ENABLED @@ -32,7 +42,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..674ad7b6 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: {{ .Values.ONLYOFFICE_STORAGE_SIZE }} diff --git a/helm-chart/templates/nextcloud-aio-redis-deployment.yaml b/helm-chart/templates/nextcloud-aio-redis-deployment.yaml index 0dc84638..d47659a4 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,18 +16,28 @@ 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 spec: + initContainers: + - name: init-volumes + image: alpine + command: + - chmod + - "777" + - /nextcloud-aio-redis + volumeMounts: + - name: nextcloud-aio-redis + mountPath: /nextcloud-aio-redis containers: - env: - name: REDIS_HOST_PASSWORD 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..10f3e7da 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: {{ .Values.REDIS_STORAGE_SIZE }} 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..b0602e74 100755 --- a/helm-chart/update-helm.sh +++ b/helm-chart/update-helm.sh @@ -28,21 +28,48 @@ 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 "/\${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 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|" \{} \; +cat << EOL > /tmp/initcontainers + initContainers: + - name: init-volumes + image: alpine + command: + - chmod + - "777" + volumeMountsInitContainer: +EOL # shellcheck disable=SC1083 -find ./ -name '*persistentvolumeclaim.yaml' -exec sed -i "s|ReadOnlyMany|ReadWriteMany|" \{} \; +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 '*persistentvolumeclaim.yaml' -exec sed -i "s|ReadWriteOnce|ReadWriteMany|" \{} \; +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 '*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 @@ -69,6 +96,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/ @@ -85,15 +120,17 @@ 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 '/^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 -echo 'MAX_STORAGE_SIZE: 10Gi # You can adjust the max storage that each volume can use with this value' >> /tmp/sample.conf +# shellcheck disable=SC2129 echo 'STORAGE_CLASS: # By setting this, you can adjust the storage class for your volumes' >> /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 5ec3fcdf..d0232f5e 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 @@ -16,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 @@ -30,5 +30,15 @@ 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 +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