Skip to content

Conversation

borkmann
Copy link
Member

(see commit msg)

@borkmann borkmann added area/datapath Impacts bpf/ or low-level forwarding details, including map management and monitor messages. release-note/misc This PR makes changes that have no direct user impact. labels Oct 23, 2024
@borkmann borkmann requested review from brb, aspsk and mhofstetter October 23, 2024 11:20
@borkmann borkmann requested review from a team as code owners October 23, 2024 11:20
@borkmann
Copy link
Member Author

/test

Copy link
Member

@gandro gandro left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Helm LGTM

Copy link
Member

@mhofstetter mhofstetter left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the fix and improvements! I left some suggestions inline. 🎉

BTW: Commit checks are failing: Error: ERROR:BAD_SIGN_OFF: Unrecognized email address: '@judge-red' & Error: ERROR:CUSTOM: Please avoid long commit subjects (max: 75, found: 78)

@borkmann
Copy link
Member Author

are failing: Error: ERROR:BAD_SIGN_OFF: Unrecognized email address: '@judge-red' & Error: ERROR:CUSTOM: Please avoid long commit subjects (max: 75, found: 78)

It's a GH handle, in some of the cases we use these in the Reported-by where we don't have an email. The checkpatch commit subject nits imho can be ignored if they're <= ~80 chars, it's mostly a kernel thing and not even there strictly enforced (now obviously, one shouldn't have 90+ chars as subject).

@borkmann borkmann force-pushed the pr/lbsrcrange branch 3 times, most recently from a720b0c to 8b31e8f Compare October 23, 2024 13:53
checkLBSrcRange boolean determines whether the LB map service entry
has the flag to perform source CIDR checks or not. This should only
be set if the current service (not the old one) contains source CIDRs.

When the flag is not cleared after removing loadbalancerSourceRanges
from a LoadBalancer service, then all traffic to that service will
be blackholed as there is no CIDR entry to allow traffic anymore!

Fixes: #32617
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
@borkmann
Copy link
Member Author

/test

Copy link
Member

@mhofstetter mhofstetter left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks for addressing my suggestions. (only one non-blocking nit left)

…her types

Sandro Mathys reported that loadbalancerSourceRanges are only enforced for
LoadBalancer services, but not for NodePort services which poses a problem
in some environments such as OpenStack. He says:

  In OpenStack, the NodePort service is the backend of the load balancer,
  thus that's where the filtering needs to happen. And thus the NodePort
  allocation can't be disabled.

In order to avoid breaking existing behavior, add an option which is called
bpf-lb-source-range-all-types that can be set to {true,false} (default false)
and when enabled it installs the CIDR filters to all services which receive
cluster external (N/S) traffic.

Fixes: #34903
Reported-by: Sandro Mathys <sandro@mathys.io>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Add a config to make this option also accessible to Helm users.

Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Extend the section to document possibilities for filtering traffic.

Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Add proper docs as we use this now already in two examples, but a
dedicated section with explanation was still missing.

Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
@borkmann
Copy link
Member Author

/test

Copy link
Contributor

@learnitall learnitall left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM for docs, thanks!

@borkmann borkmann merged commit a78430e into main Oct 23, 2024
261 of 262 checks passed
@borkmann borkmann deleted the pr/lbsrcrange branch October 23, 2024 16:23
@borkmann borkmann added the ready-to-merge This PR has passed all tests and received consensus from code owners to merge. label Oct 23, 2024
@maintainer-s-little-helper maintainer-s-little-helper bot removed the ready-to-merge This PR has passed all tests and received consensus from code owners to merge. label Oct 23, 2024
@julianwiedmann julianwiedmann added the area/loadbalancing Impacts load-balancing and Kubernetes service implementations label Dec 11, 2024
@julianwiedmann
Copy link
Member

@borkmann I feel 0b7ea95 would be worth a backport to v1.16, no?

@borkmann
Copy link
Member Author

@borkmann I feel 0b7ea95 would be worth a backport to v1.16, no?

Yes, ack, I'll look into this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/datapath Impacts bpf/ or low-level forwarding details, including map management and monitor messages. area/loadbalancing Impacts load-balancing and Kubernetes service implementations release-note/misc This PR makes changes that have no direct user impact.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants