From 453ed243e39adeb771f9039ef91fd3bc3b1ef15d Mon Sep 17 00:00:00 2001 From: Stavros kois Date: Wed, 17 Apr 2024 18:13:03 +0300 Subject: [PATCH] add some configs --- .../templates/_nextcloud-configs.tpl | 15 +++++++++ .../nextcloud/templates/_persistence.tpl | 33 +++++++++++++++++++ .../charts/nextcloud/templates/common.yaml | 1 + 3 files changed, 49 insertions(+) create mode 100644 library/ix-dev/charts/nextcloud/templates/_nextcloud-configs.tpl diff --git a/library/ix-dev/charts/nextcloud/templates/_nextcloud-configs.tpl b/library/ix-dev/charts/nextcloud/templates/_nextcloud-configs.tpl new file mode 100644 index 0000000000..4c27361f70 --- /dev/null +++ b/library/ix-dev/charts/nextcloud/templates/_nextcloud-configs.tpl @@ -0,0 +1,15 @@ +{{- define "nextcloud.configs" -}} +{{ $bytesGB := 1073741824 }} +configmap: + nextcloud-config: + enabled: true + data: + opcache.ini: | + opcache.memory_consumption={{ .Values.ncConfig.opCacheMemoryConsumption }} + + php.ini: | + max_execution_time={{ .Values.ncConfig.maxExecutionTime }} + + limitrequestbody.conf: | + LimitRequestBody {{ mul .Values.ncConfig.maxUploadLimit $bytesGB }} +{{- end -}} diff --git a/library/ix-dev/charts/nextcloud/templates/_persistence.tpl b/library/ix-dev/charts/nextcloud/templates/_persistence.tpl index 57151346f2..5007872a0e 100644 --- a/library/ix-dev/charts/nextcloud/templates/_persistence.tpl +++ b/library/ix-dev/charts/nextcloud/templates/_persistence.tpl @@ -7,6 +7,39 @@ persistence: nextcloud: nextcloud: mountPath: /var/www/html + nc-config-opcache: + enabled: true + type: configmap + objectName: nextcloud-config + defaultMode: "0600" + targetSelector: + nextcloud: + nextcloud: + # z-99 is used to ensure that this file is loaded last + mountPath: /usr/local/etc/php/conf.d/opcache-z-99.ini + subPath: opcache.ini + nc-config-php: + enabled: true + type: configmap + objectName: nextcloud-config + defaultMode: "0600" + targetSelector: + nextcloud: + nextcloud: + # z-99 is used to ensure that this file is loaded last + mountPath: /usr/local/etc/php/conf.d/nextcloud-z-99.ini + subPath: php.ini + nc-config-limreqbody: + enabled: true + type: configmap + objectName: nextcloud-config + defaultMode: "0600" + targetSelector: + nextcloud: + nextcloud: + # https://github.com/nextcloud/docker/issues/1796 + mountPath: /etc/apache2/conf-enabled/limitrequestbody.conf + subPath: limitrequestbody.conf # config: # enabled: true diff --git a/library/ix-dev/charts/nextcloud/templates/common.yaml b/library/ix-dev/charts/nextcloud/templates/common.yaml index 5fc6aa110a..8f7da2aeb6 100644 --- a/library/ix-dev/charts/nextcloud/templates/common.yaml +++ b/library/ix-dev/charts/nextcloud/templates/common.yaml @@ -5,6 +5,7 @@ {{/* Merge the templates with Values */}} {{- $_ := mustMergeOverwrite .Values (include "nextcloud.workload" $ | fromYaml) -}} {{- $_ := mustMergeOverwrite .Values (include "nextcloud.configuration" $ | fromYaml) -}} +{{- $_ := mustMergeOverwrite .Values (include "nextcloud.configs" $ | fromYaml) -}} {{- if .Values.ncNetwork.certificateID }} {{- $_ := mustMergeOverwrite .Values (include "nginx.workload" $ | fromYaml) -}} {{- end }}