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
coverage: 52.701% (-0.05%) from 52.747%
when pulling 6d9c583e13aebff2a8fe883e2b08808fd2582870 on jxiaobin:skip-ipam
into afd362fc240c75decc6b915ba3c211734afe541d on ovn-org:master.
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