-
Notifications
You must be signed in to change notification settings - Fork 2k
Adding and enabling third party modules. #957
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
The The easiest way for you would be to add the following Configmap key: Let me know if it works and/or you have any other question. |
Hi @Rulox Thanks for the information. It works as you have mentioned and I was also able to have the nginx modules loaded by modifying the nginx.tmpl file. Could you help me out in setting up a configuration for a custom 404/500 html that is present on the /usr/share/nginx/html inside the container? Like you have mentioned, should I use Server-snippet to add this configuration?
or is there any other way or a best practice that you would suggest to do? |
Hey @chronograph3r glad you did this. About your approach, yeah By the way, if you want to modify the template anyways, you can do it using a ConfigMap key as well (so you can change it without having to re-build the Ingress Controller image), check this. This way you don't need to change the Let me know if this makes sense, thanks! |
Hey @Rulox That makes sense and thank you for notifying me of the useful features. I wonder this behavior is because of how the grpc error codes mentioned in the nginx.ingress.tmpl redirects to a plain and simple default nginx 404 page. I am yet to try out the errorPages feature with VirtualServer. I will let you know how that goes as well. |
Can you show me your Ingress Resources/Config map keys and the changes you did in the template? That would help me to understand what's happening in your config and I'll be able to assist you better. Thanks! PS: I don't think grpc error pages is the issue here. |
Thank you so much @Rulox for helping me understand the usage of snippets and template, Yes you're correct, grpc wasn't the issue. i was having a duplicate location block. I was able to achieve a custom 404 error page via the ingress as well. I just had to add the I was also able to add custom cors configuration as well with the help of @pleshakov on this comment I was able to modify the desired configurations with this
This guided me in the right path to enabling the third party modules compiled on a custom image.
|
That's great news @chronograph3r Closing this issue then, as it seems you're happy with the result. |
@chronograph3r Can you please share Dockerfile to create nginx-ingress image with more_header module. I need to create nginx-ingress with all modules. |
@chronograph3r can you please share Dockerfile to create nginx-ingress image with more_header module. I need to create nginx-ingress with all modules. |
You can find the Dockerfile here, I wrote an article about it. I don't know if it is relevant now, please let me know if it's useful |
Hi everyone.
Goal :
I am trying to include a thirdparty module a Http_more_headers to provide a custom name to the server in the headers.
I am able to build a custom controller image with the module installed with a slightly tweaked DockerFile.
Issue:
To enable this third party module I need to add the load_module directive in the nginx.conf I am however confused on how the ingress controller interprets the nginx.conf file. If I add the load_module in the server-snippet annotation, will it work? or do I have to modify the .tmpl file to enable the third party module? or should I just modify the nginx.conf and use a COPY during the image build itself? which would be the best way to achieve the goal?
The text was updated successfully, but these errors were encountered: