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 to fix conformance test #18

Open
wants to merge 11 commits into
base: v1.14.10-conformance-fix
Choose a base branch
from

Conversation

dhij
Copy link

@dhij dhij commented Sep 4, 2024

The cilium#33434 fix for the issue described in cilium#9207 will not be backported to older versions. So we would like to cherry-pick the upstream changes on the version we support now v1.14.10.

cilium#33434 has 8 commits but the cherry-picks don't include all of them.

The major merge conflicts happened in pkg/k8s/watchers/service.go

  • v1.14 has the service related methods in pkg/k8s/watchers/watcher.go ex) addK8sSVCs and delK8sSVCs whereas upstream has moved the service related methods to service.go file and extracted k8sServiceManager

jibi and others added 4 commits September 3, 2024 22:04
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]>
@dhij dhij changed the title V1.14.10 conformance cherry-picks from upstream to fix conformance test Sep 4, 2024
@dhij dhij requested a review from timoreimann September 4, 2024 13:25
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.

3 participants