-
Notifications
You must be signed in to change notification settings - Fork 260
refactor: Modify CNI to Support AKS-Swift #1076
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
71ec584 to
4ee008d
Compare
4ee008d to
fa50928
Compare
86c0396 to
890f7a5
Compare
cni/network/invoker_cns.go
Outdated
| errInvalidArgs = errors.New("invalid arg(s)") | ||
| ) | ||
|
|
||
| const ( |
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.
remove this too
890f7a5 to
1e17642
Compare
tamilmani1989
left a comment
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.
added a comment + we have to test this in both windows multitenancy and linux multitenancy before merge
4f52d2c to
4ddfae3
Compare
73e4d6a to
d68ace3
Compare
d68ace3 to
ee1a2fc
Compare
cni/network/network.go
Outdated
| if nwCfg.MultiTenancy { | ||
| cnsclient, er := cnscli.New(nwCfg.CNSUrl, defaultRequestTimeout) | ||
| if err != nil { | ||
| cnsClient, er := cnscli.New(nwCfg.CNSUrl, defaultRequestTimeout) |
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.
i didnt see you addressed this?
cni/network/network.go
Outdated
| if err != nil { | ||
| log.Printf("GetMultiTenancyCNIResult failed with error %v", err) | ||
| return fmt.Errorf("GetMultiTenancyCNIResult failed:%w", err) | ||
| ipamAddResult.ipv4Result, ipamAddResult.ncResponse, ipamAddResult.hostSubnetPrefix, er = plugin.multitenancyClient.GetContainerNetworkConfiguration( |
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.
should not be returning result from GetContainerNetworkConfiguration as we discussed in call
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.
why are we changing the return here? (we use it throughout the rest of func and the call didn't explain why)
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.
removed and added conversion underneath via convertToCniResult
cni/network/network.go
Outdated
|
|
||
| plugin.report.Context = "AzureCNIMultitenancy" | ||
| plugin.multitenancyClient.Init(cnsClient, AzureNetIOShim{}) | ||
| plugin.ipamInvoker = NewCNSInvoker(k8sPodName, k8sNamespace, cnsClient, plugin.multitenancyClient) |
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.
remove this line if not used
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.
removed
324f07f to
848a9ab
Compare
cni/network/invoker_cns.go
Outdated
| return IPAMAddResult{}, err | ||
| } | ||
|
|
||
| // first result is ipv4, second is ipv6, SWIFT doesn't currently support IPv6 |
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.
update the comment
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.
removed this comment since it's already mentioned when describing func
cni/network/network.go
Outdated
| log.Printf("Result from multitenancy %+v", result) | ||
| ipamAddResult.ipv4Result = convertToCniResult(ipamAddResult.ncResponse, args.IfName) | ||
|
|
||
| log.Printf("PrimaryInterfaceIdentifier :%v", ipamAddResult.hostSubnetPrefix.IP.String()) |
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.
can we print ipv4result as well? Also make sure we print network config received from cns
848a9ab to
def2f90
Compare
def2f90 to
ff81fb7
Compare
|
pending windows e2e multitenancy tests |
Reason for Change:
Slight refactoring of multi tenant CNI bits to support AKS-Swift on Windows
Requirements:
Notes: