Kong / charts

Helm chart for Kong
Apache License 2.0
249 stars 480 forks source link

Single controller deployments support in kong helm chart #710

Closed pmalek closed 1 year ago

pmalek commented 1 year ago

When https://github.com/Kong/kubernetes-ingress-controller/issues/702 gets implemented and released, it should get full support in this helm chart.

This issue tracks the effort of adding support of said feature.

Proposed Solution

Similarly to https://github.com/Kong/kubernetes-ingress-controller/issues/3423

Acceptance criteria

rainest commented 1 year ago

Should this require any new functionality? We already support controller-only releases (disable the proxy container by toggling https://github.com/Kong/charts/blob/4f65be9ec7a304766683aba056a5649c48583545/charts/kong/values.yaml#L21 off), and you can set the controller environment to use whatever admin API URL value(s) you like manually (and I don't think there's a way to do it automatically).

We don't support a single-release option (you can't configure the chart such that it creates separate Deployments for the controller and proxy in a single release), which isn't perfectly convenient, but it's not absolutely necessary, and in line with our requiring multiple releases for most types of more complex topology (e.g. hybrid mode). I think multiple releases should be fine, especially for the initial release of single-controller.

If so, this should only require docs to indicate how you set up those multiple releases (one proxy-only, one controller-only, the latter manually set to use the former's admin API URL(s)).

pmalek commented 1 year ago

Maybe the name isn't especially fortunate: single controller deployments doesn't imply multiple proxy.

and you can set the controller environment to use whatever admin API URL value(s) you like manually (and I don't think there's a way to do it automatically

That's precisely the point in my view.

The point behind the underlying feature (implemented in KIC) is to allow:

rainest commented 1 year ago

Maybe the name isn't especially fortunate: single controller deployments doesn't imply multiple proxy.

It kinda does: while a single-controller, single-proxy deployment is supported by SCD, it's not particularly interesting, as that was something you could do already without SCD. SCD is interesting when there are multiple proxies. Possible point of confusion is that I'm using "proxy" the way you use "gateway", I think: "there are multiple Kong proxy instances" and "there are multiple Kong gateway instances" are basically the same thing to me.

https://github.com/Kong/kubernetes-ingress-controller/issues/3400 would mean you're no longer specifying an admin API URL, but rather a Service (or rather any replica that's currently providing an Endpoint for it).

pmalek commented 1 year ago

Oh my. It seems I've not used the correct wording (again?).

Maybe the name isn't especially fortunate: single controller deployments doesn't imply multiple proxy.

I meant the name. The feature as I understand it, is all about the usage of multiple gateways with single KIC.


Possible point of confusion is that I'm using "proxy" the way you use "gateway", I think: "there are multiple Kong proxy instances" and "there are multiple Kong gateway instances" are basically the same thing to me.

They are the same thing to me as well 👍


https://github.com/Kong/kubernetes-ingress-controller/issues/3400 would mean you're no longer specifying an admin API URL, but rather a Service (or rather any replica that's currently providing an Endpoint for it).

Yes and the idea would be to not need to recreate KIC's Pod and/or Deployment for that matter, with different set of flags/configs. This way you don't need to do any sort of trickery in the chart and use 1 helm release for Gateway(s), get their addresses and use those in another helm release for KIC where you use those addresses.