charts
charts copied to clipboard
[bitnami/discourse] Add env for passenger extraFlags and custom Nginx template
Signed-off-by: Deprecastor Git [email protected]
Description of the change
With this change, the Helm Chart can provide 'DISCOURSE_PASSENGER_EXTRA_FLAGS' environment variable to the docker image beneath to configure the passenger before start up. This change makes it possible to provide a custom nginx template to passenger.
Benefits
Can work around performance issues with passenger. For example this case. The environment variable is already implemented in the docker image in use. Just need to expose it into the values file and deployment.yaml. At the moment we just have to "exec" into the container and run commands to have changes temporally, but this is not acceptable workaround that has to applied every time the POD moves or is updated. To have a config change in passenger, the exposed env var in the values is needed. To have a config change in the nginx template, like we need in the case of the issue 8746 mentioned, we need the configMap to be mounted and then the config option "nginx-config-template" in combination with the mounted file is in use. Please read this for the option needed and this for the template thingy.
Also this case is related to my problem and have a good analyses why this is happening.
Please keep in mind that the provided solution in that old thread of "issue 172" is possible anymore. Like many others, I can see the option in UI is gone, but you can set the same behavior by applying the solution via this exposed env var and the configMap the.
Possible drawbacks
Static mount path custom template as configMap. Maybe the path is also not as the community would like to have it placed.
Another drawback is the config template itself. The user has to follow the provided documentation link of nginx standalone with passenger, to collect it. Then apply the changes and load it into a configMap and apply the name to the values file.
Applicable issues
none
Additional information
The option "DISCOURSE_PASSENGER_EXTRA_FLAGS" wide open, could have tight it down to only use by providing a custom nginx template to passenger. But I guess it is better to have this open for other use cases different from those that led to this PR. But if it is better to have it more closed, I could change that.
Checklist
- [X] Chart version bumped in
Chart.yaml
according to semver. This is not necessary when the changes only affect README.md files. - [X] Variables are documented in the values.yaml and added to the
README.md
using readme-generator-for-helm - [X] Title of the pull request follows this pattern [bitnami/<name_of_the_chart>] Descriptive title
- [X] All commits signed off and in agreement of Developer Certificate of Origin (DCO)
Hi @deprecastor, thanks a lot for your contribution!
Before assigning it to one of our engineers, could you review the PR? it seems some Tomcat changes has been included by mistake
Hi @fmulero, thank you for your assist. I am about to fix that. I guess this is related to Helm version bump, I did this wrong and will fix it after my work shift has ended.
Hi @deprecastor, thanks a lot for your contribution!
Before assigning it to one of our engineers, could you review the PR? it seems some Tomcat changes has been included by mistake
Hey, I really tried to get rid of the change in Tomcat README.md. But it comes back automatically. Could you help me with that? The other problem is gone, found my mistake. Bumped appVersion instead of version.. silly me :-D
@fmulero well someone else did not updated the README.md I guess, but I checked the versions of the tomcat thingy and it is ok. But in the CONTRIBUTE.md is written, a README change should not require a chart version bump, but it really needed one. So I hope it can be merged now :-D
Not sure if this will help (please make a copy of your changes):
# d654e308bbfaa98b1b22643bd5c5d80f15b072a5 -> Parent commit before your changes
git reset d654e308bbfaa98b1b22643bd5c5d80f15b072a5 -- bitnami/tomcat
# Undo any change done
git checkout bitnami/tomcat
# Commit
git commit -asm "Undo tomcat changes"
# Merge master in your branch
git merge <upstream>/master
# Check changes
git diff <upstream>/master
@fmulero Thanks a lot for your help. I followed your instructions and it worked!
Is there anything I could do, to move on with this?
I solved the merge conflict.
Would be great if someone could take a look and merge this :)
Hi @alemorcuq thanks for you response. Well you are right, the extraVolumeMount makes half of the thing obsolete. I'll try to load the passenger options to the extraEnvVars and test if this fits the solution. Maybe I can do the same there, I have to read into it.
Well, I decided to do something else and move on.