helm - disable volumes if corresponding feature is disabled

Signed-off-by: Simon L <szaimen@e.mail.de>
This commit is contained in:
Simon L 2023-11-23 11:34:57 +01:00
parent 75784dc736
commit e6d0059986
5 changed files with 10 additions and 1 deletions

View file

@ -1,6 +1,6 @@
name: nextcloud-aio-helm-chart
description: A generated Helm Chart for Nextcloud AIO from Skippbox Kompose
version: 7.7.1-dev
version: 7.7.1-dev2
apiVersion: v2
keywords:
- latest

View file

@ -1,3 +1,4 @@
{{- if eq .Values.CLAMAV_ENABLED "yes" }}
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
@ -14,3 +15,4 @@ spec:
resources:
requests:
storage: {{ .Values.CLAMAV_STORAGE_SIZE }}
{{- end }}

View file

@ -1,3 +1,4 @@
{{- if eq .Values.ONLYOFFICE_ENABLED "yes" }}
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
@ -14,3 +15,4 @@ spec:
resources:
requests:
storage: {{ .Values.ONLYOFFICE_STORAGE_SIZE }}
{{- end }}

View file

@ -308,6 +308,10 @@ for variable in "${ENABLED_VARIABLES[@]}"; do
find ./ -name "*nextcloud-aio-$name-service.yaml" -exec sed -i "1i\\{{- if eq .Values.$variable \"yes\" }}" \{} \;
# shellcheck disable=SC1083
find ./ -name "*nextcloud-aio-$name-service.yaml" -exec sed -i "$ a {{- end }}" \{} \;
# shellcheck disable=SC1083
find ./ -name "*nextcloud-aio-$name-persistentvolumeclaim.yaml" -exec sed -i "1i\\{{- if eq .Values.$variable \"yes\" }}" \{} \;
# shellcheck disable=SC1083
find ./ -name "*nextcloud-aio-$name-persistentvolumeclaim.yaml" -exec sed -i "$ a {{- end }}" \{} \;
done
chmod 777 -R ./

View file

@ -49,6 +49,7 @@ REDIS_STORAGE_SIZE: 1Gi # You can change the size of the redis volume that
NAMESPACE: default # By changing this, you can adjust the namespace of the installation which allows to install multiple instances on one kubernetes cluster
SUBSCRIPTION_KEY: # This allows to set the Nextcloud Enterprise key via ENV
APPS_ALLOWLIST: # This allows to configure allowed apps that will be shown in Nextcloud's Appstore. You need to enter the app-IDs of the apps here and separate them with spaces. E.g. 'files richdocuments'
ADDITIONAL_TRUSTED_PROXY: # Allows to add one additional ip-address to Nextcloud's trusted proxies and to the Office WOPI-allowlist automatically. Set it e.g. like this: 'your.public.ip-address'. You can also use an ip-range here.
SMTP_HOST: # (empty by default): The hostname of the SMTP server.
SMTP_SECURE: # (empty by default): Set to 'ssl' to use SSL, or 'tls' to use STARTTLS.
SMTP_PORT: # (default: '465' for SSL and '25' for non-secure connections): Optional port for the SMTP connection. Use '587' for an alternative port for STARTTLS.