Skip to content

Commit 4fded4f

Browse files
Merge branch 'master' into sv2-long-running-pipeline-scaletests
Signed-off-by: sivakami-projects <[email protected]>
2 parents 58f35f3 + 2d2db4c commit 4fded4f

File tree

58 files changed

+12037
-280
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

58 files changed

+12037
-280
lines changed

.devcontainer/devcontainer.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"build": {
66
"dockerfile": "Dockerfile",
77
"args": {
8-
"VARIANT": "1.24",
8+
"VARIANT": "1.24-bullseye",
99
"NODE_VERSION": "none"
1010
}
1111
},
@@ -58,7 +58,7 @@
5858
"remoteUser": "vscode",
5959
"features": {
6060
"ghcr.io/devcontainers/features/go:1": {
61-
"version": "1.23.2"
61+
"version": "1.24.1"
6262
},
6363
"docker-in-docker": "latest",
6464
"kubectl-helm-minikube": "latest",
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
parameters:
2+
name: ""
3+
dependsOn: ""
4+
5+
stages:
6+
- stage: manifold_e2e
7+
displayName: E2E - AKS Swiftv2 Manifold
8+
variables:
9+
TAG: $[ stageDependencies.setup.env.outputs['EnvironmentalVariables.Tag'] ]
10+
IMAGE_REPO_PATH: $[ format('{0}/', stageDependencies.setup.env.outputs['EnvironmentalVariables.imageRepositoryPath']) ]
11+
${{ if eq(parameters.dependsOn, 'publish') }}:
12+
IMAGE_REPO_PATH_REF: 'azure-'
13+
${{ else }}:
14+
IMAGE_REPO_PATH_REF: $(IMAGE_REPO_PATH)
15+
dependsOn:
16+
- ${{ parameters.dependsOn }}
17+
- setup
18+
jobs:
19+
- job: ${{ parameters.name }}
20+
displayName: AKS Swiftv2 Multitenancy Manifold E2E Test Suite - (${{ parameters.name }})
21+
timeoutInMinutes: 210
22+
pool:
23+
name: $(BUILD_POOL_NAME_DEFAULT)
24+
isCustom: true
25+
type: linux
26+
steps:
27+
- task: TriggerBuild@3
28+
inputs:
29+
buildDefinition: '391699'
30+
templateParameters: 'regions: ["westus2"], useAcnPublic: true, cnscniversion: $(TAG), cnscniversionwindows: $(TAG), cnscniImagePrefix: $(IMAGE_REPO_PATH_REF)'
31+
useSameBranch: false
32+
queueBuildForUserThatTriggeredBuild: true
33+
branchToUse: 'refs/heads/master'
34+
waitForQueuedBuildsToFinish: true
35+
authenticationMethod: 'OAuth Token'

.pipelines/pipeline.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -488,6 +488,13 @@ stages:
488488
dependsOn: ["test"]
489489
scaleup: 50
490490

491+
- ${{ if eq(variables['Build.Reason'], 'Schedule') }}:
492+
# AKS Swiftv2 Manifold E2E tests
493+
- template: multitenancy/swiftv2-manifold-e2e.stages.yaml
494+
parameters:
495+
name: "swiftv2_manifold_e2e"
496+
dependsOn: publish
497+
491498
- stage: delete
492499
displayName: Delete Clusters
493500
condition: always()

.pipelines/run-pipeline.yaml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -479,7 +479,12 @@ stages:
479479
vmSize: Standard_B2ms
480480
dependsOn: manifests
481481
scaleup: 50
482-
482+
483+
# AKS Swiftv2 Manifold E2E tests
484+
- template: multitenancy/swiftv2-manifold-e2e.stages.yaml
485+
parameters:
486+
name: "swiftv2_manifold_e2e"
487+
dependsOn: manifests
483488

484489
- stage: delete
485490
displayName: Delete Clusters
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
{
2+
"cniVersion": "1.0.0",
3+
"name": "azure",
4+
"plugins": [
5+
{
6+
"type": "azure-vnet",
7+
"mode": "bridge",
8+
"bridge": "azure0",
9+
"capabilities": {
10+
"portMappings": true,
11+
"dns": true
12+
},
13+
"ipam": {
14+
"type": "azure-cns"
15+
},
16+
"dns": {
17+
"Nameservers": [
18+
"168.63.129.16"
19+
],
20+
"Search": [
21+
"svc.cluster.local"
22+
]
23+
},
24+
"disableAsyncDelete": true
25+
}
26+
]
27+
}

cni/netconfig.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@ type NetworkConfig struct {
7272
EnableExactMatchForPodName bool `json:"enableExactMatchForPodName,omitempty"`
7373
DisableHairpinOnHostInterface bool `json:"disableHairpinOnHostInterface,omitempty"`
7474
DisableIPTableLock bool `json:"disableIPTableLock,omitempty"`
75+
DisableAsyncDelete bool `json:"disableAsyncDelete,omitempty"`
7576
CNSUrl string `json:"cnsurl,omitempty"`
7677
ExecutionMode string `json:"executionMode,omitempty"`
7778
IPAM IPAM `json:"ipam,omitempty"`

cni/network/invoker_cns.go

Lines changed: 32 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ func (invoker *CNSIPAMInvoker) Add(addConfig IPAMAddConfig) (IPAMAddResult, erro
165165
}
166166

167167
logger.Info("Received info for pod",
168-
zap.Any("ipInfo", info),
168+
zap.Any("ipInfo", response.PodIPInfo[i]),
169169
zap.Any("podInfo", podInfo))
170170

171171
//nolint:exhaustive // ignore exhaustive types check
@@ -192,6 +192,11 @@ func (invoker *CNSIPAMInvoker) Add(addConfig IPAMAddConfig) (IPAMAddResult, erro
192192
if err := addBackendNICToResult(&info, &addResult, key); err != nil {
193193
return IPAMAddResult{}, err
194194
}
195+
case cns.ApipaNIC:
196+
if err := configureApipaAddResult(&addResult, &response.PodIPInfo[i], key); err != nil {
197+
return IPAMAddResult{}, err
198+
}
199+
195200
case cns.InfraNIC, "":
196201
// if we change from legacy cns, the nicType will be empty, so we assume it is infra nic
197202
info.nicType = cns.InfraNIC
@@ -508,6 +513,32 @@ func configureSecondaryAddResult(info *IPResultInfo, addResult *IPAMAddResult, p
508513
return nil
509514
}
510515

516+
func configureApipaAddResult(addResult *IPAMAddResult, info *cns.PodIpInfo, key string) error {
517+
ip, ipnet, err := info.PodIPConfig.GetIPNet()
518+
if ip == nil {
519+
return errors.Wrap(err, "GetIPNet failed while configuring apipa AddResult")
520+
}
521+
522+
addResult.interfaceInfo[key] = network.InterfaceInfo{
523+
IPConfigs: []*network.IPConfig{
524+
{
525+
Address: net.IPNet{
526+
IP: ip,
527+
Mask: ipnet.Mask,
528+
},
529+
Gateway: net.ParseIP(info.NetworkContainerPrimaryIPConfig.GatewayIPAddress),
530+
},
531+
},
532+
NICType: info.NICType,
533+
SkipDefaultRoutes: true,
534+
NetworkContainerID: info.NetworkContainerID,
535+
AllowHostToNCCommunication: info.AllowHostToNCCommunication,
536+
AllowNCToHostCommunication: info.AllowNCToHostCommunication,
537+
}
538+
539+
return nil
540+
}
541+
511542
func addBackendNICToResult(info *IPResultInfo, addResult *IPAMAddResult, key string) error {
512543
macAddress, err := net.ParseMAC(info.macAddress)
513544
if err != nil {

0 commit comments

Comments
 (0)