Skip to content
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

Support of DBless Kong #747

Closed
StarlightIbuki opened this issue Sep 6, 2022 · 8 comments
Closed

Support of DBless Kong #747

StarlightIbuki opened this issue Sep 6, 2022 · 8 comments

Comments

@StarlightIbuki
Copy link

It seems we could just do that with the /config endpoint?

@hbagdi
Copy link
Member

hbagdi commented Sep 22, 2022

@StarlightIbuki Could you please elaborate on what you would like decK to do?
Do you wish to use decK to push the configuration into a DB-less instance of Kong?

@StarlightIbuki
Copy link
Author

@StarlightIbuki Could you please elaborate on what you would like decK to do? Do you wish to use decK to push the configuration into a DB-less instance of Kong?

Yes. Maybe there's some reason we do not support this?

@hbagdi
Copy link
Member

hbagdi commented Sep 23, 2022

That would make decK a "Control-Plane". We do not have plans to build a third Control-Plane for Kong.

@lgtti
Copy link

lgtti commented Nov 16, 2022

I want to add a real use case for this request.
In our organization we have our code splitted in different microservices with different git repositories. Every repostory own its Kong configuration.
Usually, we use a Kong Postgres database installation so we can use deck to sync the configuration using a CICD pipeline.

Now we have a customer that wants a local installation without a database.

Merge all files in a single one is not a problem but the file is only a template (using
${{ env DECK_VAR }} syntax. Without deck we need to replace all variables using a custom script and this is errore prone. In addtition deck requires a different format that the standard one $VAR to define a variable ${{ env "VAR" }} and this is more difficoult to manage with standard tools like envsubst.

I think it is not so difficoult to add a simple flag (--db-less) to inform deck to invoke /config instead using a different endpoint or logic.

@StarlightIbuki
Copy link
Author

StarlightIbuki commented Nov 16, 2022

@lgtti Actually, I was thinking about something much simpler. Most functionality of decK does not need it to understand the internals of the kong and its config. We could support DBless without sync, and decK doesn't need to maintain states.
What you want may need decK to have a database or something, so it can remember what changes it has already seen.

@hbagdi
Copy link
Member

hbagdi commented Nov 30, 2022

Merge all files in a single one is not a problem but the file is only a template (using
${{ env DECK_VAR }} syntax. Without deck we need to replace all variables using a custom script and this is errore prone. In addtition deck requires a different format that the standard one $VAR to define a variable ${{ env "VAR" }} and this is more difficoult to manage with standard tools like envsubst.

Would it help if decK can take in all the files, merge them, resolve the variables if present and outputs the config file? You can then POST the file. This way, you get rid of the error-prone aspects and the focus of this project remains intact. What do you think?

@lgtti
Copy link

lgtti commented Dec 5, 2022

Yes, is exactly what i need

@cello86
Copy link

cello86 commented Dec 12, 2022

@hbagdi it could be a relevant improvement in a CI/CD local environment, because deck provides variables, plugin config deduplication and defaults configs natively as mentioned in #604

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants