Adds fields for max execution time and memory limit of PHP (#1464)

This commit is contained in:
Stavros Kois
2023-08-22 14:06:03 +03:00
committed by GitHub
parent 9487765e53
commit 09432ae933
5 changed files with 29 additions and 1 deletions

View File

@@ -4,7 +4,7 @@ description: A file sharing server that puts the control and security of your ow
annotations:
title: Nextcloud
type: application
version: 1.6.39
version: 1.6.40
apiVersion: v2
appVersion: 27.0.2
kubeVersion: '>=1.16.0-0'

View File

@@ -18,6 +18,8 @@ nextcloud:
install_ffmpeg: true
install_smbclient: true
max_upload_size: 5
max_execution_time: 30
php_memory_limit: 512
opcache_memory_consumption: 128
password: changeme
username: admin

View File

@@ -148,6 +148,23 @@ questions:
default: 3
min: 1
required: true
- variable: max_execution_time
label: "Max Execution Time (Seconds)"
description: "Configures the max execution time of php"
schema:
type: int
default: 30
min: 30
required: true
- variable: php_memory_limit
label: "PHP Memory Limit (Mega Bytes)"
description: "Configures the memory limit of php"
schema:
type: int
default: 512
min: 128
max: 4096
required: true
- variable: opcache_memory_consumption
label: "Opcache Memory Consumption (Mega Bytes)"
description: "Configures the memory consumption of the opcache"

View File

@@ -78,6 +78,7 @@ spec: {{ include "common.deployment.common_spec" . | nindent 2 }}
{{ $envList = mustAppend $envList (dict "name" "POSTGRES_DB" "value" (include "postgres.DatabaseName" .)) }}
{{ $envList = mustAppend $envList (dict "name" "NEXTCLOUD_DATA_DIR" "value" .Values.nextcloud.datadir) }}
{{ $envList = mustAppend $envList (dict "name" "PHP_UPLOAD_LIMIT" "value" (printf "%vG" (.Values.nextcloud.max_upload_size | default 3))) }}
{{ $envList = mustAppend $envList (dict "name" "PHP_MEMORY_LIMIT" "value" (printf "%vM" (.Values.nextcloud.php_memory_limit | default 512))) }}
{{ if eq (include "nginx.certAvailable" .) "true" }}
{{ $envList = mustAppend $envList (dict "name" "APACHE_DISABLE_REWRITE_IP" "value" "1") }}
{{ if and .Values.nextcloud.host .Values.service.nodePort }}
@@ -183,6 +184,11 @@ spec: {{ include "common.deployment.common_spec" . | nindent 2 }}
# after the default opcache file nextcloud provides.
mountPath: /usr/local/etc/php/conf.d/opcache-z-99.ini
subPath: opcache.ini
- name: nextcloud-configuration
# We use -z-99 to ensure that this file is loaded
# after the default php config file nextcloud provides.
mountPath: /usr/local/etc/php/conf.d/nextcloud-z-99.ini
subPath: php.ini
{{ range $index, $hostPathConfiguration := .Values.extraAppVolumeMounts }}
- name: extrappvolume-{{ $index }}
mountPath: {{ $hostPathConfiguration.mountPath }}

View File

@@ -5,3 +5,6 @@ metadata:
data:
opcache.ini: |
opcache.memory_consumption={{ .Values.nextcloud.opcache_memory_consumption }}
php.ini: |
max_execution_time={{ .Values.nextcloud.max_execution_time }}