network-policy-api icon indicating copy to clipboard operation
network-policy-api copied to clipboard

npep-187: More protocols support

Open npinaeva opened this issue 7 months ago • 11 comments

Issue: https://github.com/kubernetes-sigs/network-policy-api/issues/187 Also fixes https://github.com/kubernetes-sigs/network-policy-api/issues/247 - no more pointers to lists We have a plan for https://github.com/kubernetes-sigs/network-policy-api/issues/340 so this npep can move on

Option2: Join by protocol has won the design discussion.

protocols:
  tcp:
    - port:
        number: 8080
      flags: [syn] # future extension example
    - port:
        range: 
          start: 8080
          end: 9090
  udp:
    - port:
        number: 8080
    - port:
        number: 9090
  namedPort:
    - http
    - monitoring
  icmp: # that doesn't exist yet, but may be added
    - type: 7
      code: 3

npinaeva avatar Apr 22 '25 14:04 npinaeva

Deploy Preview for kubernetes-sigs-network-policy-api ready!

Name Link
Latest commit 4906618035bac503b5ca24d1be9d9fff9c8afad4
Latest deploy log https://app.netlify.com/projects/kubernetes-sigs-network-policy-api/deploys/691b35704852c4000807d1a9
Deploy Preview https://deploy-preview-297--kubernetes-sigs-network-policy-api.netlify.app
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

netlify[bot] avatar Apr 22 '25 14:04 netlify[bot]

High level looks ok to me plus aligns with what was discussed.

/lgtm

bowei avatar May 14 '25 17:05 bowei

How do we make progress on this?

bowei avatar Jun 02 '25 16:06 bowei

The Kubernetes project currently lacks enough contributors to adequately respond to all PRs.

This bot triages PRs according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the PR is closed

You can:

  • Mark this PR as fresh with /remove-lifecycle stale
  • Close this PR with /close
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle stale

k8s-triage-robot avatar Aug 31 '25 17:08 k8s-triage-robot

/remove-lifecycle stale /lifecycle freeze

npinaeva avatar Sep 02 '25 14:09 npinaeva

New changes are detected. LGTM label has been removed.

k8s-ci-robot avatar Oct 23 '25 09:10 k8s-ci-robot

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: npinaeva

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 /approve in a comment Approvers can cancel approval by writing /approve cancel in a comment

k8s-ci-robot avatar Oct 23 '25 09:10 k8s-ci-robot

So in the process of writing up #340 I came to the conclusion that requiring implementations to automatically detect unsupported API (eg validating that you can round-trip the JSON representation through the compiled representation without losing any fields) is much better than struggling to design the API in a way that just makes it possible to manually detect that something got dropped.

danwinship avatar Nov 05 '25 16:11 danwinship

So in the process of writing up #340 I came to the conclusion that requiring implementations to automatically detect unsupported API (eg validating that you can round-trip the JSON representation through the compiled representation without losing any fields) is much better than struggling to design the API in a way that just makes it possible to manually detect that something got dropped.

100% agree, do you think this is enough to unblock this NPEP and reference the open issue for the future guidance, or does the issue have to be resolved first?

npinaeva avatar Nov 06 '25 12:11 npinaeva

Updated the okep with the link to the new issue, if we consider older client problem will solved separately, option 2 looks like the best one for now, opinions?

npinaeva avatar Nov 06 '25 13:11 npinaeva

I took option #2 and Tim's suggestion of changing Protocols to Match:

https://github.com/kubernetes-sigs/network-policy-api/pull/342

bowei avatar Nov 07 '25 23:11 bowei