-
Notifications
You must be signed in to change notification settings - Fork 260
CNI to support transparent mode #279
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
Conversation
…working into calico_change # Conflicts: # cni/netconfig.go # netlink/link.go # netlink/netlink_test.go # network/endpoint_linux.go
cni/network/network.go
Outdated
| // (network name, container id, name of the interface inside the container) | ||
| vethName := fmt.Sprintf("%s%s%s", networkId, k8sContainerID, k8sIfName) | ||
| if nwCfg.Mode == opModeCalico { | ||
| vethName = fmt.Sprintf("%s.%s", k8sNamespace, k8sPodName) |
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.
lets note here that this mechanism of using only namespace and name is not unique for different incarnations of POD/container. IT will result in unpredictable behavior if API server decides to reorder DELETE and ADD call for new incarnation of same POD.
network/endpoint_linux.go
Outdated
| // Prefix for host virtual network interface names. | ||
| hostVEthInterfacePrefix = commonInterfacePrefix + "v" | ||
|
|
||
| transPrefix = "cali" |
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.
Add a commen tto indicate this is prefix in transparent mode
network/endpoint_linux.go
Outdated
| nlRoute := &netlink.Route{ | ||
| Family: netlink.GetIpAddressFamily(route.Gw), | ||
| Dst: &route.Dst, | ||
| Src: route.Src, |
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.
lets ensure that multitenancy works with this change.
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.
we dint change anything here.. i can remove this also. we are not setting source anywhere
network/endpoint_linux.go
Outdated
| nlRoute := &netlink.Route{ | ||
| Family: netlink.GetIpAddressFamily(route.Gw), | ||
| Dst: &route.Dst, | ||
| Src: route.Src, |
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.
ensure that we can delete successfully for multitenancy
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.
same as above
What this PR does / why we need it:
This PR adds support for azure cni to support calico policies in Azure VMs
Which issue this PR fixes (optional, in
fixes #<issue number>(, fixes #<issue_number>, ...)format, will close that issue when PR gets merged): fixes #Special notes for your reviewer:
Release note: