Closed MihaiMoldovanu closed 1 year ago
I have made a small modification that allows me to do just that . In secureconfig.yaml i changed to:
{{- with .Values.settings }}
{{- if .tablePrefix }}
WORDPRESS_TABLE_PREFIX: {{ .tablePrefix | b64enc }}
{{- end }}
{{- if .extra }}
WORDPRESS_CONFIG_EXTRA: {{ .extra | b64enc }}
{{- end }}
{{- end }}
and this allows to set it in values like this:
## Wordpress specific settings
settings:
## Database table name prefix
tablePrefix:
## Maximum file upload size (default: 64M)
maxFileUploadSize: 256M
## PHP memory limit (default: 128M)
memoryLimit: 256M
extra: |
define('MY_CUSTOM_FLAG', true);
Yes, that is one solution. I would like to adapt the chart and allow extra environment variables as ConfigMap and as Secret (depending on the needs). For now you also have the option to simply define an env.-variable in the chart with:
env:
- name: WORDPRESS_CONFIG_EXTRA
value: ...
@MihaiMoldovanu : Please have a look at the PR https://github.com/groundhog2k/helm-charts/pull/1234 and give me feedback.
in official wordpress image there is a setting to add custom directives to wp-config.php called WORDPRESS_CONFIG_EXTRA . It is possible to add support for it ?