-
Notifications
You must be signed in to change notification settings - Fork 591
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
Gateway API: HttpRoute with weight and namespace doesn't work well. #3860
Comments
I did some testing and found some things that didn’t work as expected.
|
Thanks for reporting this, @parkjeongryul. I'll test your configuration and get back to you soon. |
After an initial investigation, it looks like we actually have a cross-namespace problem. With this configuration, only the newest backend is pushed to the dataplane (for this reason, the LB isn't performed), while if we move everything into the same namespace, the routing works as expected as both the backends are pushed to the dataplane. It requires further investigation. I'll keep you posted @parkjeongryul. |
Thanks for investigation.
apiVersion: v1
kind: Service
metadata:
name: clous-jrpark-green-2304061502
namespace: clous-jrpark
spec:
type: ExternalName
externalName: s-common-sas.clous-jrpark-green-2304061502.svc.cluster.local
ports:
- name: http
port: 80
protocol: TCP
targetPort: http
---
apiVersion: v1
kind: Service
metadata:
name: clous-jrpark-blue-2304032002
namespace: clous-jrpark
spec:
type: ExternalName
externalName: s-common-sas.clous-jrpark-blue-2304032002.svc.cluster.local
ports:
- name: http
port: 80
protocol: TCP
targetPort: http
---
apiVersion: gateway.networking.k8s.io/v1beta1
kind: HTTPRoute
metadata:
name: clous-jrpark
namespace: clous-jrpark
annotations:
konghq.com/strip-path: 'true'
spec:
parentRefs:
- name: kong
namespace: kong
rules:
- matches:
- path:
type: PathPrefix
value: /clous-jrpark/common-sas
backendRefs:
- name: clous-jrpark-green-2304061502
port: 80
weight: 30
- name: clous-jrpark-blue-2304032002
port: 80
weight: 5 |
Is there an existing issue for this?
Current Behavior
We have each backend service separated by a namespace, and we want to distribute the traffic by weighting it as follows, but it doesn’t seem to be working, any idea why?
But traffic flows to only one backend.
Expected Behavior
traffic should flow to both backend with the weight.
Steps To Reproduce
Kong Ingress Controller version
Kubernetes version
Anything else?
No response
The text was updated successfully, but these errors were encountered: