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

bpf_metadata: cleanup case for N/S L7 LB #1072

Merged
merged 3 commits into from
Jan 7, 2025

Conversation

mhofstetter
Copy link
Member

@mhofstetter mhofstetter commented Dec 20, 2024

see individual commits

This commit combines the nested conditions in the method `getPolicy`
that are handling the special case for N/S L7 Loadbalancing.
(Allow all traffic if no explicit Ingress policy is set)

Signed-off-by: Marco Hofstetter <[email protected]>
@mhofstetter mhofstetter marked this pull request as ready for review December 20, 2024 12:48
@mhofstetter mhofstetter requested a review from a team as a code owner December 20, 2024 12:48
Copy link
Member

@jrajahalme jrajahalme left a comment

Choose a reason for hiding this comment

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

small nit about repeating calls to addressAsString()

cilium/bpf_metadata.cc Show resolved Hide resolved
@mhofstetter mhofstetter force-pushed the pr/mhofstetter/bpfmetadata-clarify-ns-l7lb branch from 8cdf1b4 to 0021cc7 Compare January 7, 2025 08:05
@mhofstetter mhofstetter requested a review from jrajahalme January 7, 2025 08:05
cilium/bpf_metadata.cc Outdated Show resolved Hide resolved
This commit simplifies the variable naming for the N/S L7 LB
case in getMetadata.

* Rename `ip` to `ingress_ip`
* use `ingress_ip` instead of `pod_ip` to avoid confusion

Signed-off-by: Marco Hofstetter <[email protected]>
This commit removes an outdated comment about Ingress IP handling.

Currently, the existence of an Ingress source IP with the right IP
family is validated in the config.

See

```
    const Network::Address::Ip* ingress_ip = selectIPVersion(sip->version(), source_addresses);

    if (!ingress_ip) {
      // IP family of the connection has no configured local ingress source address
      ENVOY_LOG(
          warn,
          "cilium.bpf_metadata (north/south L7 LB): No local Ingress IP source address configured "
          "for the family of {}",
          sip->addressAsString());
      return nullptr;
    }
```

Signed-off-by: Marco Hofstetter <[email protected]>
@mhofstetter mhofstetter force-pushed the pr/mhofstetter/bpfmetadata-clarify-ns-l7lb branch from 0021cc7 to 2c4e3c7 Compare January 7, 2025 08:17
@mhofstetter mhofstetter requested a review from jrajahalme January 7, 2025 08:18
@mhofstetter mhofstetter added this pull request to the merge queue Jan 7, 2025
Merged via the queue into main with commit 3bb8ccd Jan 7, 2025
5 checks passed
@mhofstetter mhofstetter deleted the pr/mhofstetter/bpfmetadata-clarify-ns-l7lb branch January 7, 2025 09:06
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