Declarative Configuration in a lua file #7283
Replies: 5 comments
-
@hishamhm currently (after the issue you referenced is merged) this piece of code in
In addition, when you guys decide to fix that and support Lua declarative configuration, it would be nice to change this line It would be nice the be updated here if and when this support is going to be added. |
Beta Was this translation helpful? Give feedback.
-
Should I make a different PR for these changes or continue in the last PR?
|
Beta Was this translation helpful? Give feedback.
-
@dorongold I'm currently trying to put together a tool that allows to configure Kong in a declarative way, pretty much like you described here. It's not open sourced yet, but I plan to do it in the foreseeable future. I have a question though: Is your idea only for Kong configurations in the DB-less mode? |
Beta Was this translation helpful? Give feedback.
-
@andrepiske We only use DB-less mode, so that is the only use-case I was aiming at. |
Beta Was this translation helpful? Give feedback.
-
@dorongold Oh that might be it, you're using DB-less mode. |
Beta Was this translation helpful? Give feedback.
-
Summary
Currently Kong supports writing configuration in a file, in YAML or JSON.
To provide a more flexible configuration, especially for those running Kong in different environments (dev, staging, production), an option to write configuration in
lua
can be very useful.Additional Details
There are many use-cases that come to mind:
Injecting parts of the configuration from a file, a Kubernetes config-map, or any other source which has different content in different environments.
This can be done using lua functions such as
dofile
,load
,loadfile
,loadstring
.etc.
Beta Was this translation helpful? Give feedback.
All reactions