Kong(1.3.0) with DB(postgresql) and Ingress(0.5.0)
stable chart
upload lua file in kong and kong Ingress pod (by configmap)
loc : /etc/kong/plugins/custom-checker/handler.lua
/etc/kong/plugins/custom-checker/schema.lua
/etc/kong/kong.conf
4. error log in ingress-controller
E0904 13:09:15.395497 1 kong.go:208] error filling in defaults for plugin: custom-checker
E0904 13:09:15.407342 1 controller.go:125] unexpected failure updating Kong configuration:
1 errors occured:
while processing event: {Create} failed: 400 Bad Request {āmessageā:āschema violation (name: plugin ācustom-checkerā not enabled; add it to the āpluginsā configuration property)ā,ānameā:āschema violationā,āfieldsā:{ānameā:āplugin ācustom-checkerā not enabled; add it to the āpluginsā configuration propertyā},ācodeā:2}
** I also enabled jwt plugin in bundle like this
jwt plugin enable successfully.
Have you changed the plugins property in kong.conf using environment variables or using the the config file?
Also, please ensure that you have changed these variables for all the Kong containers (one in the Admin API container) and another in the regular Kong deployment.
Please set the KONG_PLUGINS environment variable to bundled, custom-checker.
And set the KONG_LUA_PACKAGE_PATH environment variable as well.
Exec into the Kong container and curl the / on Admin interface and make sure that these properties are set correctly.
Also, ensure that the files that are mount using ConfigMap are readable by the user under which the Kong process is running.
Iād also advise you to not mount the plugins at /etc/ but something like /opt/kong.
Once these are all set up correctly, you should be able load the custom plugin and enable them using Kong Ingress Controller.
Thank you for your quick response and your time.
I tried it as you told me and it works fine.
Is it wrong to add configuration to kong.conf?
Or is it a bug inside kong?
This is the procedure I did. I will leave it to help others
Hi @hbagdi
I read your advise again.
Why we should mount plugins /opt?
kong.conf file mount /etc/kong.conf
Please let me know why the location of plugin is ā/optā?