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

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

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]>
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 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
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.

1 participant