Kong / kong

🦍 The Cloud-Native API Gateway and AI Gateway.
https://konghq.com/install/#kong-community
Apache License 2.0
38.28k stars 4.75k forks source link

[Kong Ingress Controller Chart] High Load on k8s API with KongUpstreamPolicy and Multiple Ingress Controllers #13268

Closed kirillfomichev closed 5 days ago

kirillfomichev commented 1 week ago

Is there an existing issue for this?

Kong version ($ kong version)

Kong (version 3.6), KIC (version 3.2)

Current Behavior

When using UpstreamPolicy in a Kubernetes cluster with two ingress controllers, there is a cyclic configuration overwrite. Both ingress controllers compete for the UpstreamPolicy resource, leading to high load on the k8s API.

Expected Behavior

The ingress controllers should handle the UpstreamPolicy resource without cyclic overwrites, avoiding unnecessary load on the k8s API.

Steps To Reproduce

  1. Set up a Kubernetes cluster
  2. Deploy two ingress controllers via helm chart.
  3. Set up debug-level
  4. Create a CRD UpstreamPolicy for the ingress controllers.
  5. Observe the cyclic configuration overwrite and high load on the k8s API.

Anything else?

/logs/error.log controllers.KongUpstreamPolicy Reconciling resource {"KongV1beta1KongUpstreamPolicy": {"name":"sticky-session","namespace":"sso"}, "v": 1, "namespace": "sso", "name": "sticky-session-sso"}
hanshuebner commented 6 days ago

This seems to be an issue that would better be filed in https://github.com/Kong/kubernetes-ingress-controller - @kirillfomichev Do you think this is a Gateway issue? If not, please re-file in the KIC repository and close this issue. Thank you!