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 single controller deployments #702

Closed
10 of 12 tasks
hbagdi opened this issue May 22, 2020 · 23 comments · Fixed by #3268
Closed
10 of 12 tasks

Support single controller deployments #702

hbagdi opened this issue May 22, 2020 · 23 comments · Fixed by #3268
Labels
area/feature New feature or request area/spike
Milestone

Comments

@hbagdi
Copy link
Member

hbagdi commented May 22, 2020

Problem Statement

Currently the ingress controller is only capable of deploying configuration to one Kong Gateway at a time, the consequence of which is that to horizontally scale the data-plane in DBLESS mode you must create an ingress controller for each gateway which has some performance costs and wastes associated with it. The purpose of this issue is to make it possible to configure the KIC with multiple Gateways so that they all receive the same configuration updates.

Proposed Solution

Additional information

  • Previous iterations of this issue described adding mTLS auth between the KIC and Gateways, but this was already resolved separately as part of mTLS Kong Admin API authentication support #1958
  • Horizontal scaling options where each Gateway has the same configuration is covered by this scope
  • Multi-tenancy options where each Gateway has it's own separate configuration are not covered by this scope if you're interested in such a feature please file a separate issue

Acceptance Criteria

@seh
Copy link
Contributor

seh commented May 26, 2020

We are definitely interested in this capability. If you need help, please let me know.

@marcoam
Copy link

marcoam commented May 28, 2020

+1

@hbagdi hbagdi added area/feature New feature or request priority/high labels Sep 11, 2020
@hbagdi hbagdi added this to the 1.1.0 milestone Sep 11, 2020
@mflendrich mflendrich self-assigned this Oct 20, 2020
@rainest rainest modified the milestones: 1.1.0, 1.2.0 Dec 8, 2020
@mflendrich mflendrich removed their assignment Jan 14, 2021
@shaneutt shaneutt self-assigned this Jan 21, 2021
@shaneutt
Copy link
Contributor

shaneutt commented Jan 25, 2021

Plan:

  1. proxy containers will now have their own pod in the Kong Ingress Controller
  2. controller and proxies will have mTLS now that they will communicate over the container network and not over local host
  3. service discovery
  4. reconciliation needs to operate on N proxies now
  5. include NetworkPolicy resources with KIC deployment which restrict access to the Kong Admin APIs now that they'll be exposed over the container network.

Notes:

  • mTLS is on Kong side
  • need to update kong/kong-operator, kong/charts

@shaneutt
Copy link
Contributor

After discussing further with @mflendrich we're going to take some time to do some further investigation on the problem domain here (as opposed to going right into implementation as currently written) as we feel that there's some potential for large gains in rethinking our approach to this crossroads in how we deploy and manage the proxy.

@shaneutt
Copy link
Contributor

shaneutt commented Feb 5, 2021

The team has decided that we'll hold on this issue for now as we try to make some architectural changes to the KIC which will ultimately make implementing this easier.

@shaneutt shaneutt removed their assignment Feb 5, 2021
@swapnilpotnis
Copy link

Plan:

  1. proxy containers will now have their own pod in the Kong Ingress Controller
  2. controller and proxies will have mTLS now that they will communicate over the container network and not over local host
  3. service discovery
  4. reconciliation needs to operate on N proxies now
  5. include NetworkPolicy resources with KIC deployment which restrict access to the Kong Admin APIs now that they'll be exposed over the container network.

Notes:

  • mTLS is on Kong side
  • need to update kong/kong-operator, kong/charts

So does this mean, in future, kong would be able to support mTLS communication between kong <-> service??
If so, then could you please let us know if https://docs.konghq.com/kubernetes-ingress-controller/1.1.x/guides/upstream-mtls/ is something different than what is being implemented??

We basically have a use-case where we have an outside service communicating with kong running over AKS. Now we wish to establish mTLS between the two. As we have installed kong from helm charts, we were not able to accomodate the variables as mentioned in the above given link. Hence wanted to know if it was possible with the current kong release or is the mTLS support by kong yet to be implemented?

@shaneutt
Copy link
Contributor

So does this mean, in future, kong would be able to support mTLS communication between kong <-> service??

In this particular case:

This covers mTLS between the Kubernete Ingress Controller Pod and access to the Admin API in the Kong Proxy Pod. Note that historically the containers have been in a single pod together and used localhost connectivity so mTLS was not enabled.

This does not pertain to any other services (e.g. the services being proxied to) for this scope.

@stale
Copy link

stale bot commented Mar 20, 2021

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale Will be closed unless advocated for within 7 days label Mar 20, 2021
@shaneutt shaneutt removed the blocked label Mar 22, 2021
@stale stale bot removed the stale Will be closed unless advocated for within 7 days label Mar 22, 2021
@shaneutt
Copy link
Contributor

Several weeks ago we started some work on this but it was not finished due to a desire by the maintainers to wait until KIC 2.0 which will bring a major re-architecture that would better support this feature.

We'll consider this blocked on the KIC 2.0 milestone for now and revisit once that is completed.

@pmalek pmalek linked a pull request Jan 11, 2023 that will close this issue
1 task
@pmalek
Copy link
Member

pmalek commented Jan 11, 2023

This is currently being worked on.

#3268 aims to enable rendering and sending configs for multiple Kong Gateways: this will be done via the same flag that's in place today --kong-admin-url (by passing multiple, comma separated values).

When that's done then we'll work on making this not be bound to controller's Pod's lifetime, specifically to use a label selector for Kong's Admin API Service.

If all that gets released we'll be able to then incorporate those changes into helm chart so that users can utilize that deployment method to deploy single controller with multiple Gateways.

@mflendrich
Copy link
Contributor

The remaining work here is to complete all the remaining checkboxes in the AC.

@czeslavo
Copy link
Contributor

We still have

For any number of data-planes, the KIC should be able to be configured with separate mTLS credentials for each

in ACs which didn't have its tracking issue. I created one, but I'm not sure how would that work having gateways discovered dynamically via a headless service. 🤔 Did we try to design this anywhere?

@pmalek
Copy link
Member

pmalek commented Feb 27, 2023

We still have

For any number of data-planes, the KIC should be able to be configured with separate mTLS credentials for each

in ACs which didn't have its tracking issue. I created one, but I'm not sure how would that work having gateways discovered dynamically via a headless service. 🤔 Did we try to design this anywhere?

For posterity: as agreed on sync meeting #3603 will track this effort but it won't be land in v2.9.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/feature New feature or request area/spike
Projects
None yet