haproxytech / kubernetes-ingress

HAProxy Kubernetes Ingress Controller
https://www.haproxy.com/documentation/kubernetes/
Apache License 2.0
706 stars 200 forks source link

annotation "haproxy.org/load-balance: uri path-only" causes configuration reloads #678

Open alexkayzer opened 2 days ago

alexkayzer commented 2 days ago

We found a bug, when using the kubernetes ingress annotation "haproxy.org/load-balance: uri path-only" , it constantly configuration reloads. DEBUG service/service.go:134 Service 'example-app/example-app': backend 'example-app_example-app_http-8080' updated: [Balance.URIPathOnly: true != false] Reload required versions that have tested applications 1.10.16, 3.0.1, 11.0

hdurand0710 commented 2 days ago

Thanks @alexkayzer for reporting this. The root cause is similar to https://github.com/haproxytech/kubernetes-ingress/issues/673, we are working on a fix.

Here, it's not linked to the use of the Backend CRD, but the root cause is the same. Even though the configuration is correctly written in the haproxy.cfg file

When we reconcile the Backend we detect a diff on the field, update the field and reload.

hdurand0710 commented 2 days ago

The issue comes from the included library client-library. The issue has already been fixed in the client-native >= 5.1.5 but for Ingress Controller version:

We need to bump client-native library and build a new version of Ingress Controller. We will keep you posted.