Skip to content
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

feat: cni refactor for swift v2 #2330

Merged
merged 64 commits into from
Nov 1, 2023
Merged

feat: cni refactor for swift v2 #2330

merged 64 commits into from
Nov 1, 2023

Conversation

jaer-tsun
Copy link
Contributor

combining 4 CNI PRs from forked repo

Reason for Change:

CNI changes for Swift 2

  • update contract when CNI RequestIPs from CNS to include
  • MacAddress of secondary (multitenant) interface
  • NICType to define whether the IP config is InfraNIC (existing scenarios) or DelegatedVMNIC (swift 2)
  • SkipDefaultRoutes to specify which interface traffic will go through by default
  • Routes to configure on interface
  • refactor existing endpoint creation flow to support multiple 'EndpointInfo' which represents an interface and consolidate into 'endpoint' struct which maps to pod
  • added SecondaryInterfaces to endpoint struct
  • add SecondaryEndpointClient to configure secondary interface

Issue Fixed:

Requirements:

Notes:

wantErr bool
}{
{
name: "happy add ipv4",
fields: fields{
plugin: &mockDelegatePlugin{
add: add{
resultsIPv4: getResult("10.0.0.1/24"),
resultsIPv4: getSingleResult("10.0.0.1/24"),
Copy link
Contributor

Choose a reason for hiding this comment

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

Can you move the subnet to a var at the beginning of the file?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

updated

@@ -145,16 +152,16 @@ func TestAzureIPAMInvoker_Add(t *testing.T) {
nwCfg: &cni.NetworkConfig{},
subnetPrefix: getCIDRNotationForAddress("10.0.0.0/24"),
},
want: getResult("10.0.0.1/24")[0],
want: getResult("10.0.0.1/24"),
Copy link
Contributor

Choose a reason for hiding this comment

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

same thing

Copy link
Contributor Author

Choose a reason for hiding this comment

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

updated

errInvalidDefaultRouting = errors.New("add result requires exactly one interface with default routes")
errInvalidGatewayIP = errors.New("invalid gateway IP")
overlayGatewayV6IP = "fe80::1234:5678:9abc"
watcherPath = "/var/run/azure-vnet/deleteIDs"
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we need a path for Windows?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

not supported atm

@tamilmani1989
Copy link
Member

@jaer-tsun can we also validate this commit with release pipelines.. check with @jpayne3506 on this

@jaer-tsun
Copy link
Contributor Author

/azp run CNI Load Test

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@jpayne3506
Copy link
Contributor

/azp run CNI Load Test

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@jaer-tsun jaer-tsun enabled auto-merge (squash) November 1, 2023 17:11
@jaer-tsun jaer-tsun merged commit 83fca75 into master Nov 1, 2023
83 checks passed
@jaer-tsun jaer-tsun deleted the cniSwift2 branch November 1, 2023 19:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants