allow to adjust the volumes

Signed-off-by: Simon L <szaimen@e.mail.de>
This commit is contained in:
Simon L 2023-01-29 00:02:18 +01:00
parent 83c68da0a0
commit 7d36204397
12 changed files with 29 additions and 35 deletions

View file

@ -12,4 +12,4 @@ spec:
- ReadWriteOnce
resources:
requests:
storage: 1Gi
storage: 100Mi

View file

@ -12,4 +12,4 @@ spec:
- ReadWriteOnce
resources:
requests:
storage: 1Gi
storage: 100Mi

View file

@ -12,4 +12,4 @@ spec:
- ReadWriteOnce
resources:
requests:
storage: 1Gi
storage: {{ .Values.DATABASE_STORAGE_SIZE }}

View file

@ -12,4 +12,4 @@ spec:
- ReadWriteOnce
resources:
requests:
storage: 1Gi
storage: {{ .Values.DATABASE_STORAGE_SIZE }}

View file

@ -12,4 +12,4 @@ spec:
- ReadWriteOnce
resources:
requests:
storage: 1Gi
storage: {{ .Values.FULLTEXTSEARCH_STORAGE_SIZE }}

View file

@ -12,4 +12,4 @@ spec:
- ReadWriteOnce
resources:
requests:
storage: 1Gi
storage: {{ .Values.NEXTCLOUD_DATA_STORAGE_SIZE }}

View file

@ -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

View file

@ -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

View file

@ -12,4 +12,4 @@ spec:
- ReadWriteOnce
resources:
requests:
storage: 1Gi
storage: 2Gi

View file

@ -12,4 +12,4 @@ spec:
- ReadWriteOnce
resources:
requests:
storage: 1Gi
storage: 100Mi

View file

@ -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)"

View file

@ -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