kubernetes-sigs / kube-network-policies

Kubernetes network policies
Apache License 2.0
21 stars 8 forks source link

Implement DomainNames Egress Peer in ANP API #32

Open tssurya opened 1 month ago

tssurya commented 1 month ago
  1. We would love kube-network-policies to implement https://network-policy-api.sigs.k8s.io/npeps/npep-133-fqdn-egress-selector/
  2. This API NPEP merged last week AND we will soon have the API merged and we don't yet have any implementations
  3. So its also hard to write conformance tests without a testing driver backend

API Details:

So implementing it here will help us make it part of our upstream CI tests.

tssurya commented 1 month ago

@rahulkjoshi : The API PR will follow soon right?

vaskozl commented 2 weeks ago

Got a few questions about the NPEP:

If a policy is applied after a lookup is already performed and cached by the client, is the implementor required to allow the traffic based on the past query?

Cilium's implementation forces you to specify matchPattern: "*" which explicitly caches all dns on port 53, or otherwise blocks DNS queries if matched with toFQDN (unlike the NPEP requirement) which ensures that an old lookup is not used.

The other thing that's not super clear is what DNS traffic is expected to be detected: