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

kongfig - diff against API and automatically delete what's not on config #88

Open
luispabon opened this issue Jul 25, 2017 · 5 comments

Comments

@luispabon
Copy link

When automating kong config deployments with kong, sometimes changes are made that remove elements from kong. I believe kongfig caters for this with the ensure: present|absent property on each object.

This however creates a great deal of technical debt. Cannot be removed until it's been deployed everywhere, which is difficult to keep track of.

It would be great if kongfig would compare the config file given to it against what's on kong's admin API, and proceed to delete anything on the API that's not on config.

This way we could fully automate deployments without littering our config files with @todos and technical debt.

@kjsteuer
Copy link
Contributor

kjsteuer commented Jul 25, 2017

We ran into a similar issue recently where we removed a value from config, deployed, and expected the entry to be deleted. After digging, we understood why, however, it would be more intuitive to remove the entry in kong.

If worried about accidental deletion we could add a second step/command confirming potential deletions for the entries not present in konfig.

@ankona
Copy link

ankona commented Aug 29, 2017

I didn't want to thumbs-down you without an explanation. I felt just as odd about the ensure property at first, but we ended up using it to our advantage (or disadvantage from another viewpoint, I suppose). Rather than centrally manage our 'one true kongfig' for all of our apis, each microservice/repository has it's own. We like that model because it ensures a minimal deployment, less chance of conflicts as those services get released so often, and no dependent builds in jenkins.

I do like the suggestion by @kjsteuer to allow it to be an additional apply option, though. Something like:

kongfig apply --path kongfig.yml --host x --ensureoff

@JnMik
Copy link
Contributor

JnMik commented Oct 13, 2017

I like the ensure property, if you want to add only 1 consumers through kongfig with a custom 1 entry yaml, I don't expect kongfig to delete all other consumers.

@bparthu
Copy link

bparthu commented Feb 5, 2018

When are we expecting this feature ? - #107

@CyExy
Copy link
Contributor

CyExy commented Feb 5, 2018

@bparthu cannot give you a date but it is happening soon, not 100% settled yet.

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

No branches or pull requests

6 participants