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

Support for endPort in multi-networkpolicy #14

Closed
girishmg opened this issue Feb 5, 2022 · 4 comments · Fixed by #16
Closed

Support for endPort in multi-networkpolicy #14

girishmg opened this issue Feb 5, 2022 · 4 comments · Fixed by #16
Labels
enhancement New feature or request

Comments

@girishmg
Copy link

girishmg commented Feb 5, 2022

Now that K8s v1.21+ supports endPort in NetworkPolicyPort field, should we also add it to multi-networkpolicy CRD?

From here: https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.21/#networkpolicyport-v1-networking-k8s-io

endPortinteger | If set, indicates that the range of ports from port to endPort, inclusive, should be allowed by the policy. This field cannot be defined if the port field is not defined or if the port field is defined as a named (string) port. The endPort 
must be equal or greater than port. This feature is in Alpha state and should be enabled using the Feature Gate 
"NetworkPolicyEndPort".

@dougbtv @s1061123 any thoughts?

@s1061123 s1061123 added the enhancement New feature or request label Feb 7, 2022
@s1061123
Copy link
Member

s1061123 commented Feb 7, 2022

Thank you for the info, @girishmg !

I suppose we should support it in the future but not immediately due to following reasons:

  • multi-networkpolicy itself is not matured as we noted in Current Status of the Repository
    in README.md
    so we need to track Kubernetes update as soon as possible
  • multi-networkpolicy's dataplane implementation (and only one consumer of multi-networkpolicy as far as I know of), multi-networkpolicy-iptables does not implemented it yet (please let me know if some implementation wants to have the field)

Hence I suppose we could introduce this field in next API revision 'v1beta2' of our scheme.

What do you think about it?

@girishmg
Copy link
Author

@s1061123 we are adding support for multi-networkpolicy in the OVN Kubernetes CNI project. That implementation will need endPort support. Can we please introduce this field in the next API version v1beta2? Thank you.

@s1061123
Copy link
Member

@girishmg sure. will do that and let you know when I'm done. BTW, does this mean ovn-k supports secondary networks? Currently multi-networkpolicy is only for secondary network interface. Just a double check.

@girishmg
Copy link
Author

Thank you @s1061123 . Yes we are adding support to OVN-K8s for secondary networks. The WIP PR is here: ovn-kubernetes/ovn-kubernetes#2775

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants