Skip to content
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

cherry-picks from upstream on v1.14.18 for conformance test fix #23

Open
wants to merge 4 commits into
base: dkomsa/v1.14.18-conformance
Choose a base branch
from

Conversation

d-honeybadger
Copy link

@d-honeybadger d-honeybadger commented Jan 27, 2025

Cherry-picked the commits of #20 rather than the original f836705, 0cf22cc, b25daf9, 45a84b4
since there were quite a few merge conflicts and this allowed me to not re-do the resolving work that David has already done for 1.14.14

Run ARCH=amd64 DOCKER_REGISTRY=docker.io DOCKER_DEV_ACCOUNT=<docker account> DOCKER_IMAGE_TAG=v1.14.18-conformance-fix make docker-cilium-image docker-operator-generic-image to build the image.

@d-honeybadger d-honeybadger force-pushed the dkomsa/v1.14.18-conformance-fix branch 3 times, most recently from 9057d7f to fdd2946 Compare January 27, 2025 20:51
@d-honeybadger d-honeybadger marked this pull request as ready for review January 27, 2025 20:54
@d-honeybadger d-honeybadger changed the title service: differentiate UDP and TCP protocols cherry-picks from upstream on v1.14.18 for conformance test fix Jan 27, 2025
@d-honeybadger d-honeybadger force-pushed the dkomsa/v1.14.18-conformance-fix branch from 83b599b to f2584b8 Compare January 27, 2025 21:02
jibi and others added 4 commits January 29, 2025 15:10
this commit updates the service logic, from the agent all the way down
to the datapath, to take into account the L4 protocols specified in a
k8s service.

Historically Cilium has always been ignoring, at least from a end user
perspective, the protocol specified in a k8s service, resulting in the
inability to expose a port only for a given protocol, or in the opposite
case, resulting in a single protocol-agnostic service exposed whenever
2 TCP and UDP services on the same port were configured.

Co-authored-by: Nate Sweet <[email protected]>
Co-authored-by: Antonio Ojea <[email protected]>
Signed-off-by: Gilberto Bertin <[email protected]>
add a new bpf-lb-proto-diff flag that disables the
service protocol differentiation logic, allowing to keep the old Cilium
behavior where service protocols are not distinguished

Signed-off-by: Gilberto Bertin <[email protected]>
when upgrading to a version of Cilium that supports and has service
protocol differentiation enabled, existing services without protocol set
will be overwritten (or better, restored from the bpf maps, deleted
because they are orphan and the recreated) with their protocol set.

As this causes connection disruptions, keep those services without
protocol until the user explicitly deletes them.

To allow both type of services to co-exist, this commit:

- introduces a second service lookup in the datapath, without the
  protocol set, in case the protocol lookup fails
- updates the service allocation logic to check both for services with
  and without protocol before allocating a new one
- updates the deletion logic to look for both with and without protocol
  versions, to ensure all service versions are proper deleted

Co-authored-by: Antonio Ojea <[email protected]>
Signed-off-by: Gilberto Bertin <[email protected]>
@d-honeybadger d-honeybadger force-pushed the dkomsa/v1.14.18-conformance-fix branch from f2584b8 to 5418622 Compare January 29, 2025 20:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants