From 8383c4330ba1a5353ce08c969bc3b9f1620bc2c4 Mon Sep 17 00:00:00 2001 From: Guilhem Lavaux Date: Fri, 21 Mar 2025 09:28:03 +0100 Subject: [PATCH] Add tentative support for php ini config --- Chart.yaml | 4 ++-- templates/deployment.yaml | 16 ++++++++++++++++ values.yaml | 5 +++++ 3 files changed, 23 insertions(+), 2 deletions(-) diff --git a/Chart.yaml b/Chart.yaml index 989a43e..657f4eb 100644 --- a/Chart.yaml +++ b/Chart.yaml @@ -4,8 +4,8 @@ name: basic-web-app PullName: basic-app-puller description: A basic Helm chart to have PHP webapps in Kubernetes. It supports webhook for pulling from gitea type: application -version: 2.2.3 -appVersion: "2.2.3" +version: 2.3.0 +appVersion: "2.3.0" dependencies: - name: postgresql diff --git a/templates/deployment.yaml b/templates/deployment.yaml index 478e756..c9c5a62 100644 --- a/templates/deployment.yaml +++ b/templates/deployment.yaml @@ -66,6 +66,12 @@ spec: - name: {{ .name }} mountPath: {{ .path }} {{- end}} + {{- range .Value.extraPhpIni }} + - name: php-config + mountPath: {{ printf "/usr/local/etc/php/conf.d/%s .conf }} + readOnly: true + subPath: {{ .key }} + {{- end}} env: {{- with .Values.env.plain }} {{- toYaml . | nindent 12 }} @@ -169,6 +175,16 @@ spec: - key: {{ .Values.configWeb.key }} path: {{ .Values.configWeb.key }} {{- end }} + {{- if (gt (len .Values.extraPhpIni) 0) }} + - name: php-config + secret: + secretName: php-config-secret + {{- range .Values.extraPhpIni }} + items: + - key: {{ .key }} + path: {{ .key }} + {{- end }} + {{- end }} {{- range .Values.extraVolumesWeb }} - name: {{ .name }} persistentVolumeClaim: diff --git a/values.yaml b/values.yaml index 3ce063d..d1c6e92 100644 --- a/values.yaml +++ b/values.yaml @@ -94,3 +94,8 @@ env: # - name: API_KEY # secretName: app-secrets # key: api.key +# +extraPhpIni: [] +# Must add a secret 'php-config-secret' +# - key: upload-limit +# conf: upload-limit.ini