Skip to content

Conversation

@tamilmani1989
Copy link
Member

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:

// (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)
Copy link
Contributor

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.

// Prefix for host virtual network interface names.
hostVEthInterfacePrefix = commonInterfacePrefix + "v"

transPrefix = "cali"
Copy link
Contributor

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

nlRoute := &netlink.Route{
Family: netlink.GetIpAddressFamily(route.Gw),
Dst: &route.Dst,
Src: route.Src,
Copy link
Contributor

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.

Copy link
Member Author

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

nlRoute := &netlink.Route{
Family: netlink.GetIpAddressFamily(route.Gw),
Dst: &route.Dst,
Src: route.Src,
Copy link
Contributor

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

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same as above

@tamilmani1989 tamilmani1989 changed the title CNI to support calico policy CNI to support transparent mode Dec 26, 2018
@sharmasushant sharmasushant merged commit b7f6742 into Azure:master Jan 5, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants