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