nextcloud / nextcloud/helm

phpConfigs ignored in FPM images

Open
#663 3 comments 8 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Go Template
Stars
534
Forks
314
Avg merge
42m
Merged PRs (30d)
1

Description

Describe your Issue

Overview

The changes introduced in [PR 71] have affected the handling of phpConfigs, leading to some confusion about the expected values in this parameter.

Background

The original purpose of the /usr/local/etc/php-fpm.d directory is to permit customization of php-fpm pool definitions via *.conf files. This is defined under the include parameter in the php-fpm.conf file.

According to the current README, the phpConfigs setting is designed for custom php.ini values. An example provided demonstrates how to change the php memory_limit parameter.

Logs and Errors

In the current deployment of nginx + php-fpm, settings added to phpConfigs appear ineffective.
Following [PR 71], generated configmap files are mounted to the /usr/local/etc/php-fpm.d directory, but this directory is not utilized as a source for ini files. Instead, the php-fpm process reads additional ini files from /usr/local/etc/php/conf.d, similar to the behavior of the PHP-SAPI module for Apache.

Describe your Environment

  • Kubernetes distribution: Vanilla v1.23.17

  • Helm version: 3.15.4 (using helmfile, 0.168.0)

  • Helm Chart Version: 6.2.3

  • values.yaml:

...
  phpConfigs:
    opcache-tunning.ini: |-
      opcache.memory_consumption=256
...

Additional context, if any

Workaround

As a temporary solution, I added the following environment variable:

PHP_INI_SCAN_DIR=:/usr/local/etc/php-fpm.d/

This instructs PHP to also search for ini files in /usr/local/etc/php-fpm.d, in addition to /usr/local/etc/php/conf.d. However, this feels like a makeshift workaround.

Suggestion

I suggest introducing an additional Helm value to distinguish between the two functionalities: one for ini settings and another for php-fpm pool settings. This would involve:

  • Keeping phpConfigs for custom ini files.
  • Adding a distinct parameter for php-fpm pool configurations, such as phpFpmPools.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with values.yaml and the changes from PR 71, then trace where phpConfigs is rendered and mounted relative to /usr/local/etc/php-fpm.d and /usr/local/etc/php/conf.d. Verify that ini settings are read by PHP-FPM and that a separate pool-configuration value can be defined and documented without relying on PHP_INI_SCAN_DIR.

Written by the indexing model from the issue text.

Assessment

Tech stack
helm, kubernetes, php
Domain
cloud, devops
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.