-
Notifications
You must be signed in to change notification settings - Fork 3.4k
cilium: add option to configure service annotation-based dispatch #35064
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
Conversation
Add a new mode to Cilium's service handling which is similar to hybrid SNAT/DSR but opts into DSR based on the user's annotation in the service object. Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
The nodeport_uses_dsr{4,6}() will be extended in upcoming commit to also pass in the service object. The latter is not available in below scenarios, therefore remove them for now. This only affects when DSR was enabled before which is not in majority of cases. Side-effect is that hybrid mode adds more SNAT entries when it detects a conflict. We need to see if this can later be resurrected through different means. Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Remove useless bpf-lb-dsr-l4-xlate as the non-default "backend" variant never worked out in practive and noone ended up using it. "frontend" is default and thus functionality-wise there are no changes. Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
015b66c
to
736c60a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚀
Add a new mode to Cilium's service handling which is similar to hybrid SNAT/DSR but opts into DSR based on the user's annotation in the service object. The following Cilium agent settings need to be set: --bpf-lb-mode=annotation --bpf-lb-acceleration=native --bpf-lb-dsr-dispatch=ipip --devices=xyz By default this will use SNAT for service handling, unless a service is specifically annotated to do otherwise: apiVersion: v1 kind: Service metadata: name: service-red namespace: example labels: color: red annotations: "service.cilium.io/type": "LoadBalancer" "service.cilium.io/mode": "dsr" spec: type: LoadBalancer ports: - port: 1234 Then, for the service DSR with IPIP dispatching will be used instead. Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Add a small section into our KPR guide. Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
736c60a
to
a9e43d6
Compare
/test |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Late to the party, but trying to stay in the loop for when I need to touch it next :)
This ports the service forwarding mode annotation to the new control-plane (cilium#35064). Signed-off-by: Jussi Maki <jussi@isovalent.com>
This ports the service forwarding mode annotation to the new control-plane (cilium#35064). Signed-off-by: Jussi Maki <jussi@isovalent.com>
This ports the service forwarding mode annotation to the new control-plane (cilium#35064). Signed-off-by: Jussi Maki <jussi@isovalent.com>
This ports the service forwarding mode annotation to the new control-plane (cilium#35064). Signed-off-by: Jussi Maki <jussi@isovalent.com>
This ports the service forwarding mode annotation to the new control-plane (cilium#35064). Signed-off-by: Jussi Maki <jussi@isovalent.com>
This ports the service forwarding mode annotation to the new control-plane (#35064). Signed-off-by: Jussi Maki <jussi@isovalent.com>
(see commit desc)