Kong / deck

decK: Configuration management and drift detection for Kong
https://docs.konghq.com/deck/overview
Apache License 2.0
439 stars 128 forks source link

feature: exclusion/inclusion of plugins via additional metadata on services/routes #339

Open hbagdi opened 3 years ago

hbagdi commented 3 years ago

Users have expressed a need for two things:

The scope here is to figure out a way to define these things using decK's state file and then decK does the heavy lifting in the background to render the correct state and sync it to Kong.

zekth commented 1 year ago

What about having something like:

---
_format_version: "3.0"
_info:
  defaults:
    service:
      plugins:
      - name: foo
      _tag_policy: exclude
      _tag: bar

So this would add the plugin foo to all services without the tag bar. _tag_policy would be include or exclude On the same note i'd expect when a service has already the plugin foo to have its own definition overriding the defaults one.

What do you think @hbagdi ? i can work on this.

hbagdi commented 1 year ago

I spent 10 minutes thinking about this but I cannot convince myself one way or another because there is just too much to think about when it comes to features like this. This needs a bit more product thought before we start executing on this and requires a bit more careful evaluation of the use cases that it enables/disables. That's not a very encouraging answer.

So here is another way to execute:

We must not skip the design phase here because quickly executing such a feature has backfired in Kong because (A) a change in one component affects others in ways that are not apparent on the surface (B) second-order effects show up after months/years and fixing those has proven to be very hard. We cannot do a perfect job but we want to account for these knock-on effects as much as possible because maintainability is a growing concern.

Please book some time on my calendar if you need to discuss this further. This feature has been highly requested and even though I have reservations about shipping it via decK, it can still be a worthwhile effort.