Kubernetes and PHP-FPM with multiple environments, problems with environment variables
You could put the clear_env = no
in your php-fpm.conf or a file included from it, as discussed here.
I ended up using the solution I proposed in my original post, thanks for trying to help! It works fine, I was just looking for something a bit cleaner!