-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
How to load a custom module to an ingress-nginx deployment? #12765
Comments
This issue is currently awaiting triage. If Ingress contributors determines this is a relevant issue, they will accept it by applying the The Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
I tried using main-snippets directive in the config map, but did not work for me |
We don't support loading custom modules because of difficulty in supporting and securing the controller with custom modules. You can look up older issues where others have tried and/or succeeded. |
You can define an image which is being used as init container here: https://github.com/kubernetes/ingress-nginx/blob/main/charts/ingress-nginx/values.yaml#L712 This image needs to contain the script described in the footer of the value. This script is then being executed on startup. You can also use distroless images, the binary executed changes to |
@Gacko does this document(https://docs.nginx.com/nginx-ingress-controller/tutorials/nginx-dynamic-module/) not work anymore? I mounted my module to the pod and edited the config map, but still not seeing the module being there in the nginx.conf file |
this is the K8S community controller project. That link is from the commercial product from NGINX INC |
Ah sorry for being naive here. Thanks for all the help :) |
I've been going though the helm charts, one thing I dont understand is how the nginx.conf gets modified with the new dynamic module's load_module directive when I specify an extraModule? Not very familiar with k8s or nginx, apologies if I missed something |
we may need to add this line to /etc/nginx/nginx.conf. Try if it works |
I was able to update the nginx conf to load the new dynamic module using config map itself. This was the key to use:
|
oh greate, previous comment made me think it's impossibile, I use server-snippet to include new config and config map to load custom template, your comment is very helpful |
We have a custom module that we deploy to our nginx deployments? How can we load the same module to ingress-nginx deployments? We we using a custom lua plugin in place of it till now, but looks like that support got stopped and now we would like to load the ingress-nginx deployment with our custom nginx module
The text was updated successfully, but these errors were encountered: