-
Notifications
You must be signed in to change notification settings - Fork 34
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
Implement Cluster Egress Traffic semantics (ANP&BANP NorthBound Support) - PART1 - Nodes #143
Implement Cluster Egress Traffic semantics (ANP&BANP NorthBound Support) - PART1 - Nodes #143
Conversation
Skipping CI for Draft Pull Request. |
/label api-review |
3735cf6
to
3cd4701
Compare
✅ Deploy Preview for kubernetes-sigs-network-policy-api ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
10a7267
to
234ed98
Compare
unless I'm missing something, it looks like the api-approved annotation on the CRD points at #135 which did not get a K8s API review (https://go.k8s.io/api-review). /assign @thockin @smarterclayton |
Hiya @liggitt 👋 V0.1.0 and V0.1.1 Was our very first release + patch release with almost the exact v1alpha1 API that was implemented with #30 (which was reviewed by @thockin and @danwinship ) This release was mainly to get that API into an official release so that our group could make sure that the release tooling and support we've implemented was in fact working and up to date, hence #135 being the "approval link". All of our tooling was inspired by the gateway-api group (which looking back now at its very beginning didn't even add the "api-approved" annotations to their CRD , see GWAPI v0.2.0 for reference, and didn't even add that annotation until https://github.com/kubernetes-sigs/gateway-api/releases/tag/v0.5.0-rc1 which when their first beta release ) If it's alright with you (for now) I propose we stop annotating our CRDs with Please LMK what you think :) |
We kind of had to do this to get successful CRD installs on clusters, we cannot stop that annotation IIUC. See https://github.com/kubernetes-sigs/network-policy-api/pull/40/files#diff-963e5daaaefbb96ed736d966ac4b1dcb7d9cf72414faf299ec69d3263404850cR6 We will start running into:
|
Good point... Looks like GWAPI made use of |
234ed98
to
f1c750c
Compare
Right... if you want to use an official |
f1c750c
to
43ef2d3
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: Dyanngg, tssurya The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
43ef2d3
to
b0d14b2
Compare
This resulted from discussions in network-policy-api meetings and after consulting apiserver team for best practices. So far ingress and egress peer expressions were symmetric. However moving forward, since we are adding support for egress (northbound) peers and fqdn which might have differences compared to what we want to allow for ingress, we have decided to split the peers into ingress and egress. Signed-off-by: Surya Seetharaman <[email protected]>
Some FTR things: 1) As an egress peer a user can selector either namespaces, or pods or nodes. In a given rule more than 1 type of selection is not allowed. 2) An empty node selector means it selects all nodes in the cluster. 3) nodes can be referred only from egress rule peers, since we only support northbound use cases. Signed-off-by: Surya Seetharaman <[email protected]>
b0d14b2
to
23d3882
Compare
/lgtm |
TBD, This is a PoC to link to NPEP, until the
implementable
API design on the NPEP is not agreed upon: #144 and merged, this PR shall remain in Draft state. It's just much easier to review/iterate on this PR and then copy the semantics into NPEP so that things don't go stale.A few things were discussed in the sig-network-policy-api meeting that happened on 10th October 2023:
AdminNetworkPolicyPeerIngress
andAdminNetworkPolicyPeerEgress
types -> this will be commit1 of this PR.Namespace
andPods
peer types do NOT account for host-networked pods ? CONSENSUS: Yes, makes sense; let's do that. Opened Callout namespaces/pods peers do not include host-net pods #156ExternalNetworks
CRD like mentioned in the NPEP? Both have advantages and disadvantages and during the meeting no-one had strong preferences and nobody opposed either OR which is good. But we wanted to check back with @rahulkjoshi on what would make sense for FQDN egress peers. So for now going ahead with whatever is present in the NPEP and then we can narrow in on that.When a pod is isolated for ingress, the only allowed connections into the pod are those from the pod's node
)? For ANP we don't want that, we want admins to be able to explicitly specify that relation. This can be the ability to expressisSameNode
relation for a pod dynamically in addition to giving outNodeSelectors
but this is an ingress traffic user story. CONSENSUS: Since we will split the peers as ingress/egress as per (1), this API design detail can be covered as part of ingress NPEP. As of now we don't have user stories that ask of this for egress traffic (I want pods to be able to talk to only my node).Relates #126