ovn-org / ovn-kubernetes

A robust Kubernetes networking platform
https://ovn-kubernetes.io/
Apache License 2.0
767 stars 333 forks source link

Skip IP allocation for interfaces on layer2/localnet networks #4460

Closed jxiaobin closed 4 days ago

jxiaobin commented 1 week ago

What this PR does and why is it needed

For some workload, IP is not needed for secondary interfaces on layer2 or localnet networks. To achieve this, user may annotate a pod to skip IP allocation for particular networks, e.g. k8s.ovn.org/skip-ip-on-networks: default/ovn-l2-net,default/ovn-localnet

User may also manually specify allowed IPs to be configured on those secondary interfaces without ipam, e.g. k8s.ovn.org/port-security-info: '{"default/ovn-localnet": {"ip_addresses": ["10.193.2.21"]}}'

Which issue(s) this PR fixes

None

Special notes for reviewers

None

How to verify it

Test case in go-controller/pkg/ovn/base_network_controller_pods_skip_ipam_test.go

Details to documentation updates

None

Description for the changelog

Skip IP allocation for interfaces on layer2/localnet networks

Does this PR introduce a user-facing change?

None

coveralls commented 1 week ago

Coverage Status

Changes unknown when pulling 1d785c71025a9e5ed74039ce170b541ce7e5aed1 on jxiaobin:skip-ipam into on ovn-org:master.

coveralls commented 1 week ago

Coverage Status

coverage: 52.701% (-0.05%) from 52.747% when pulling 6d9c583e13aebff2a8fe883e2b08808fd2582870 on jxiaobin:skip-ipam into afd362fc240c75decc6b915ba3c211734afe541d on ovn-org:master.

jxiaobin commented 4 days ago

discussed with @girishmg , we decided to not upstream this feature. closing the PR.