Skip to content

[BUG] Clarify the way Services of Type LoadBalancer and ANPs will work #203

@tssurya

Description

@tssurya

What happened:
Meeting notes from 27th Feb 2024:

RE: policies and services : In Network Policies
Cluster ingress and egress mechanisms often require rewriting the source or destination IP of packets. In cases where this happens, it is not defined whether this happens before or after NetworkPolicy processing, and the behavior may be different for different combinations of network plugin, cloud provider, Service implementation, etc.
For egress, this means that connections from pods to Service IPs that get rewritten to cluster-external IPs may or may not be subject to ipBlock-based policies.

  • We should certainly make pod2pod work even if its through the services (clusterIP)

  • we should get rid of “undefined” and “unspecified” behaviour for ANP; we shouldn’t have the same ambiguity as we have for NetPol

  • Svc rewrite happens before the netpol application => rule that matches service IPs has no effect since it anyways doesn’t or won’t match on that!

  • User case: block users from connecting to x service => block the endpoints instead?

  • CONSENSUS: Write, don't do it for service VIPs! => clarify which IPs? clusterIPs, externalIPs, loadBalancerVIPs

  • Let’s also update the NPEP and ensure we call this out!

  • Cilium’s implementation ignores CIDR block totally for internal traffic

  • Cannot define pods by IP

  • Only labels

What you expected to happen:

We are trying to clarify at least the egress bits in the API change here: #185

See ideas from @danwinship 's comment here: #185 (comment)

We need to zoom in on an agreement and get that done in a separate PR so that the original PR can move forward first.

How to reproduce it (as minimally and precisely as possible):

Anything else we need to know?:

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/bugCategorizes issue or PR as related to a bug.lifecycle/rottenDenotes an issue or PR that has aged beyond stale and will be auto-closed.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions