Unrelated ingresses targeting the same service/port: annotations for session stickyness not respected #12399
Labels
kind/support
Categorizes issue or PR as a support question.
needs-priority
needs-triage
Indicates an issue or PR lacks a `triage/foo` label and requires one.
triage/needs-information
Indicates an issue needs more information in order to work on it.
We have two ingresses on separate hostnames which target the same service and port. When we annotated the second ingress with
nginx.ingress.kubernetes.io/upstream-hash-by: $remote_addr
this was not added to the nginx configuration and session stickyness did not work. We were able to trace it down to the list provided by
kubectl ingress-nginx backends
which would show that the upstream hash
for both ingresses because it is in a section labeled by the namespace-service-port triplicate.
NGINX Ingress controller version 1.10.
Kubernetes version v1.29.9
Environment:
uname -a
): 6.6.54-flatcarHow to reproduce this issue:
It is important that both ingresses in the above example are in the same namespace, and both point to the same service and same port, and that the first is alphabetically before the second.
The session stickyness annotation will not be applied and can be verified with
kubectl ingress-nginx backends
and looking for the presence of
"upstream-hash-by": "$remote_addr",
in the output.Because these are two separate hostnames I would expect the ingress controller to handle them separately, and that annotations on the seemingly unrelated ingress
I can follow up later with a minikube example
The text was updated successfully, but these errors were encountered: