From 50f067952641bc6dd2d0f77e877e4d3651951e9a Mon Sep 17 00:00:00 2001 From: Camryn Lee Date: Wed, 21 May 2025 21:55:58 +0000 Subject: [PATCH 1/9] ci: azure-ipam patch upgrade testing conditions and variables added --- .../cilium-overlay-load-test-template.yaml | 137 +++++++----- .../pod-deployment-template.yaml | 6 +- .../restart-cns-template.yaml | 6 +- .../restart-node-template.yaml | 6 +- .pipelines/cni/pipeline.yaml | 195 ++++++++++++++++-- .pipelines/templates/log-template.yaml | 5 +- 6 files changed, 280 insertions(+), 75 deletions(-) diff --git a/.pipelines/cni/cilium/cilium-overlay-load-test-template.yaml b/.pipelines/cni/cilium/cilium-overlay-load-test-template.yaml index 98a2305c46..b11f252776 100644 --- a/.pipelines/cni/cilium/cilium-overlay-load-test-template.yaml +++ b/.pipelines/cni/cilium/cilium-overlay-load-test-template.yaml @@ -11,37 +11,40 @@ parameters: hubbleEnabled: false dualstackVersion: "" cni: "cilium" + upgradeScenario: "" + upgradeAzureIpam: "" # Condition confirms that: # Previous job has reported Succeeded. Previous job is currently setup which controls variable assignment and we are dependent on its success. # CONTROL_CNI either contains 'cniv1' or 'all'. It is not case sensitive stages: - - stage: create_${{ parameters.name }} - condition: and( succeeded(), and( or( contains(variables.CONTROL_CNI, 'cilium') , contains(variables.CONTROL_CNI, 'all') ), or( contains(variables.CONTROL_OS, 'linux'), contains(variables.CONTROL_OS, 'all') ) ) ) - variables: - ${{ if contains(parameters.clusterName, 'rdma') }}: - location: $(LOCATION_RDMA) - ${{ elseif eq(parameters.arch, 'arm64') }}: - location: $(LOCATION_ARM64) - ${{ else }}: - location: $(LOCATION_AMD64) - commitID: $[ stagedependencies.setup.env.outputs['SetEnvVars.commitID'] ] - dependsOn: - - setup - - build_images - displayName: "Create Cluster - ${{ parameters.clusterName }}" - jobs: - - job: create_aks_cluster_with_${{ parameters.name }} - pool: - name: "$(BUILD_POOL_NAME_DEFAULT)" - steps: - - template: ../load-test-templates/create-cluster-template.yaml - parameters: - clusterType: ${{ parameters.clusterType }} - clusterName: ${{ parameters.clusterName }}-$(commitID) - nodeCount: ${{ parameters.nodeCount }} - vmSize: ${{ parameters.vmSize }} - region: $(location) + - ${{if eq(parameters.upgradeAzureIpam, '')}}: + - stage: create_${{ parameters.name }} + condition: and( succeeded(), and( or( contains(variables.CONTROL_CNI, 'cilium') , contains(variables.CONTROL_CNI, 'all') ), or( contains(variables.CONTROL_OS, 'linux'), contains(variables.CONTROL_OS, 'all') ) ) ) + variables: + ${{ if contains(parameters.clusterName, 'rdma') }}: + location: $(LOCATION_RDMA) + ${{ elseif eq(parameters.arch, 'arm64') }}: + location: $(LOCATION_ARM64) + ${{ else }}: + location: $(LOCATION_AMD64) + commitID: $[ stagedependencies.setup.env.outputs['SetEnvVars.commitID'] ] + dependsOn: + - setup + - build_images + displayName: "Create Cluster - ${{ parameters.clusterName }}" + jobs: + - job: create_aks_cluster_with_${{ parameters.name }} + pool: + name: "$(BUILD_POOL_NAME_DEFAULT)" + steps: + - template: ../load-test-templates/create-cluster-template.yaml + parameters: + clusterType: ${{ parameters.clusterType }} + clusterName: ${{ parameters.clusterName }}-$(commitID) + nodeCount: ${{ parameters.nodeCount }} + vmSize: ${{ parameters.vmSize }} + region: $(location) # Conditions for below E2E test scenarios confirm that: # Pipeline has not been canceled and that the previous job has reports anything other than failure(Succeeded, SuccededWithIssues, Skipped). Previous job is declared by dependsOn: @@ -60,7 +63,10 @@ stages: pool: name: "$(BUILD_POOL_NAME_DEFAULT)" dependsOn: - - create_${{ parameters.name }} + - ${{ if and(eq(parameters.upgradeAzureIpam, ''), eq(parameters.upgradeScenario, false)) }}: + - create_${{ parameters.name }} + - ${{ else }}: + - ${{ parameters.dependsOn }} - publish - setup displayName: "Cilium Test - ${{ parameters.name }}" @@ -118,22 +124,33 @@ stages: envsubst '${CILIUM_VERSION_TAG},${CILIUM_IMAGE_REGISTRY}' < test/integration/manifests/cilium/v${DIR}/cilium-operator/templates/deployment.yaml | kubectl apply -f - kubectl get po -owide -A - if [ -z "$TEST_AZURE_IPAM_VERSION" ] - then - echo "TEST_AZURE_IPAM_VERSION is not set, using default value" - IPAM=$(make azure-ipam-version) - else - IPAM=$(TEST_AZURE_IPAM_VERSION) - echo "TEST_AZURE_IPAM_VERSION is set to $IPAM" - fi - if [ -z "$TEST_CNS_VERSION" ] + if [ "$UPGRADE_SCENARIO" = "true" ] then - echo "TEST_CNS_VERSION is not set, using default value" - CNS=$(make cns-version) + echo "Upgrade scenario is true, using upgrade azure ipam and cns version from pipeline variables" + IPAM=$(UPGRADE_AZURE_IPAM_VERSION) + IPAM_IMAGE_REPO=$(UPGRADE_IPAM_IMAGE_REPO) + CNS=$(UPGRADE_CNS_VERSION) + CNS_IMAGE_REPO=$(UPGRADE_CNS_IMAGE_REPO) + echo Deploying with Azure Ipam version $IPAM from $IPAM_IMAGE_REPO and CNS version $CNS from $CNS_IMAGE_REPO else - CNS=$(TEST_CNS_VERSION) - echo "TEST_CNS_VERSION is set to $CNS" + if [ -z "$TEST_AZURE_IPAM_VERSION" ] + then + echo "TEST_AZURE_IPAM_VERSION is not set, using default value" + IPAM=$(make azure-ipam-version) + else + IPAM=$(TEST_AZURE_IPAM_VERSION) + echo "TEST_AZURE_IPAM_VERSION is set to $IPAM" + fi + if [ -z "$TEST_CNS_VERSION" ] + then + echo "TEST_CNS_VERSION is not set, using default value" + CNS=$(make cns-version) + else + CNS=$(TEST_CNS_VERSION) + echo "TEST_CNS_VERSION is set to $CNS" + fi fi + echo "Deploy Azure-CNS" sudo -E env "PATH=$PATH" make test-integration AZURE_IPAM_VERSION=${IPAM} CNS_VERSION=${CNS} INSTALL_CNS=true INSTALL_OVERLAY=true CNS_IMAGE_REPO=$(CNS_IMAGE_REPO) IPAM_IMAGE_REPO=$(IPAM_IMAGE_REPO) kubectl get po -owide -A @@ -169,22 +186,33 @@ stages: envsubst '${CILIUM_IMAGE_REGISTRY},${CILIUM_VERSION_TAG}' < test/integration/manifests/cilium/v${DIR}/cilium-operator/templates/deployment.yaml | kubectl apply -f - kubectl get po -owide -A - if [ -z "$TEST_AZURE_IPAM_VERSION" ] - then - echo "TEST_AZURE_IPAM_VERSION is not set, using default value" - IPAM=$(make azure-ipam-version) - else - IPAM=$(TEST_AZURE_IPAM_VERSION) - echo "TEST_AZURE_IPAM_VERSION is set to $IPAM" - fi - if [ -z "$TEST_CNS_VERSION" ] + if [ "$UPGRADE_SCENARIO" = "true" ] then - echo "TEST_CNS_VERSION is not set, using default value" - CNS=$(make cns-version) + echo "Upgrade scenario is true, using upgrade azure ipam and cns version from pipeline variables" + IPAM=$(UPGRADE_AZURE_IPAM_VERSION) + IPAM_IMAGE_REPO=$(UPGRADE_IPAM_IMAGE_REPO) + CNS=$(UPGRADE_CNS_VERSION) + CNS_IMAGE_REPO=$(UPGRADE_CNS_IMAGE_REPO) + echo Deploying with Azure Ipam version $IPAM from $IPAM_IMAGE_REPO and CNS version $CNS from $CNS_IMAGE_REPO else - CNS=$(TEST_CNS_VERSION) - echo "TEST_CNS_VERSION is set to $CNS" + if [ -z "$TEST_AZURE_IPAM_VERSION" ] + then + echo "TEST_AZURE_IPAM_VERSION is not set, using default value" + IPAM=$(make azure-ipam-version) + else + IPAM=$(TEST_AZURE_IPAM_VERSION) + echo "TEST_AZURE_IPAM_VERSION is set to $IPAM" + fi + if [ -z "$TEST_CNS_VERSION" ] + then + echo "TEST_CNS_VERSION is not set, using default value" + CNS=$(make cns-version) + else + CNS=$(TEST_CNS_VERSION) + echo "TEST_CNS_VERSION is set to $CNS" + fi fi + echo "Deploy Azure-CNS" sudo -E env "PATH=$PATH" make test-integration AZURE_IPAM_VERSION=${IPAM} CNS_VERSION=${CNS} INSTALL_CNS=true INSTALL_OVERLAY=true CNS_IMAGE_REPO=$(CNS_IMAGE_REPO) IPAM_IMAGE_REPO=$(IPAM_IMAGE_REPO) kubectl get po -owide -A @@ -203,6 +231,7 @@ stages: iterations: ${ITERATIONS_CILIUM} nodeCount: ${{ parameters.nodeCount }} cni: cilium + upgradeScenario: ${{ parameters.upgradeScenario }} - template: ../load-test-templates/validate-state-template.yaml parameters: clusterName: ${{ parameters.clusterName }}-$(commitID) @@ -218,6 +247,7 @@ stages: os: ${{ parameters.os }} cni: cilium region: $(location) + upgradeScenario: ${{ parameters.upgradeScenario }} - template: ../load-test-templates/validate-state-template.yaml parameters: clusterName: ${{ parameters.clusterName }}-$(commitID) @@ -235,6 +265,7 @@ stages: scaleup: ${SCALEUP_CILIUM} nodeCount: ${{ parameters.nodeCount }} cni: ${{ parameters.cni }} + upgradeScenario: ${{ parameters.upgradeScenario }} - job: cni_tests displayName: "Cilium Test" dependsOn: restart_cns diff --git a/.pipelines/cni/load-test-templates/pod-deployment-template.yaml b/.pipelines/cni/load-test-templates/pod-deployment-template.yaml index 002b25ab36..bb5168a237 100644 --- a/.pipelines/cni/load-test-templates/pod-deployment-template.yaml +++ b/.pipelines/cni/load-test-templates/pod-deployment-template.yaml @@ -6,6 +6,7 @@ parameters: nodeCount: 10 cni: "" jobName: "deploy_pods" + upgradeScenario: "" steps: - task: AzureCLI@2 @@ -26,7 +27,10 @@ steps: - template: ../../templates/log-template.yaml parameters: clusterName: ${{ parameters.clusterName }} - logType: scaleTest os: ${{ parameters.os }} cni: ${{ parameters.cni }} jobName: ${{ parameters.jobName }} + ${{ if eq(parameters.upgradeScenario, 'true') }}: + logType: upgradeScaleTest + ${{ else }}: + logType: scaleTest diff --git a/.pipelines/cni/load-test-templates/restart-cns-template.yaml b/.pipelines/cni/load-test-templates/restart-cns-template.yaml index e0527c408f..bc6887f65b 100644 --- a/.pipelines/cni/load-test-templates/restart-cns-template.yaml +++ b/.pipelines/cni/load-test-templates/restart-cns-template.yaml @@ -5,6 +5,7 @@ parameters: nodeCount: 10 os: "" jobName: "restart_cns" + upgradeScenario: "" steps: - task: AzureCLI@2 @@ -38,7 +39,10 @@ steps: - template: ../../templates/log-template.yaml parameters: clusterName: ${{ parameters.clusterName }} - logType: restartCNS + ${{ if eq(parameters.upgradeScenario, 'true') }}: + logType: upgradeRestartCNS + ${{ else }}: + logType: restartCNS os: ${{ parameters.os }} cni: ${{ parameters.cni }} jobName: ${{ parameters.jobName }} diff --git a/.pipelines/cni/load-test-templates/restart-node-template.yaml b/.pipelines/cni/load-test-templates/restart-node-template.yaml index 2cdd4230f3..0ff754b62a 100644 --- a/.pipelines/cni/load-test-templates/restart-node-template.yaml +++ b/.pipelines/cni/load-test-templates/restart-node-template.yaml @@ -4,6 +4,7 @@ parameters: cni: "" jobName: "restart_nodes" region: "" + upgradeScenario: "" steps: - task: AzureCLI@2 @@ -56,7 +57,10 @@ steps: - template: ../../templates/log-template.yaml parameters: clusterName: ${{ parameters.clusterName }} - logType: restartNode + ${{ if eq(parameters.upgradeScenario, 'true') }}: + logType: upgradeRestartNode + ${{ else }}: + logType: restartNode os: ${{ parameters.os }} cni: ${{ parameters.cni }} jobName: ${{ parameters.jobName }} diff --git a/.pipelines/cni/pipeline.yaml b/.pipelines/cni/pipeline.yaml index 941cc4cf1b..346ff6d671 100644 --- a/.pipelines/cni/pipeline.yaml +++ b/.pipelines/cni/pipeline.yaml @@ -5,6 +5,10 @@ trigger: - dropgz/* - azure-ipam/* - v* +parameters: + - name: upgradeScenario + type: boolean + default: false stages: - stage: setup @@ -24,7 +28,7 @@ stages: name: "SetEnvVars" displayName: "Set Environment Variables" condition: always() - + - stage: build_images dependsOn: setup displayName: "Build Images" @@ -75,29 +79,29 @@ stages: name: "$(BUILD_POOL_NAME_LINUX_ARM64)" strategy: matrix: - azure_ipam_linux_arm64: - arch: arm64 - name: azure-ipam - os: linux - cni_linux_arm64: - arch: arm64 - name: cni - os: linux - ipv6_hp_bpf_linux_arm64: - arch: arm64 - name: ipv6-hp-bpf - os: linux - npm_linux_arm64: - arch: arm64 - name: npm - os: linux + azure_ipam_linux_arm64: + arch: arm64 + name: azure-ipam + os: linux + cni_linux_arm64: + arch: arm64 + name: cni + os: linux + ipv6_hp_bpf_linux_arm64: + arch: arm64 + name: ipv6-hp-bpf + os: linux + npm_linux_arm64: + arch: arm64 + name: npm + os: linux steps: - template: ../containers/container-template.yaml parameters: arch: $(arch) name: $(name) os: $(os) - + - stage: binaries displayName: Build Binaries dependsOn: setup @@ -304,6 +308,8 @@ stages: vmSize: ${VM_SIZE_CILIUM} arch: amd64 cni: "cilium" + upgradeAzureIpam: '' + upgradeScenario: false - template: cilium/cilium-overlay-load-test-template.yaml parameters: @@ -315,6 +321,8 @@ stages: vmSize: ${VM_SIZE_CILIUM} arch: amd64 cni: "cilium" + upgradeAzureIpam: '' + upgradeScenario: false - template: cilium/cilium-overlay-load-test-template.yaml parameters: @@ -326,6 +334,8 @@ stages: arch: amd64 osSKU: AzureLinux cni: "cilium" + upgradeAzureIpam: '' + upgradeScenario: false - template: cilium/cilium-overlay-load-test-template.yaml parameters: @@ -336,6 +346,8 @@ stages: vmSize: Standard_D8ps_v5 arch: arm64 cni: "cilium" + upgradeAzureIpam: '' + upgradeScenario: false - template: cilium/cilium-overlay-load-test-template.yaml parameters: @@ -346,6 +358,8 @@ stages: vmSize: Standard_HC44-16rs arch: amd64 cni: "cilium" + upgradeAzureIpam: '' + upgradeScenario: false - template: cilium/cilium-overlay-load-test-template.yaml parameters: @@ -357,6 +371,8 @@ stages: arch: amd64 dualstackVersion: ${CILIUM_DUALSTACK_VERSION} cni: "cilium_dualstack" + upgradeAzureIpam: '' + upgradeScenario: false - template: cilium/cilium-overlay-load-test-template.yaml parameters: @@ -368,6 +384,8 @@ stages: arch: arm64 dualstackVersion: ${CILIUM_DUALSTACK_VERSION} cni: "cilium_dualstack" + upgradeAzureIpam: '' + upgradeScenario: false - template: cilium/cilium-overlay-load-test-template.yaml parameters: @@ -380,6 +398,8 @@ stages: osSKU: AzureLinux dualstackVersion: ${CILIUM_DUALSTACK_VERSION} cni: "cilium_dualstack" + upgradeAzureIpam: '' + upgradeScenario: false - template: cilium/cilium-overlay-load-test-template.yaml parameters: @@ -391,6 +411,135 @@ stages: arch: amd64 dualstackVersion: ${CILIUM_DUALSTACK_VERSION} cni: "cilium_dualstack" + upgradeAzureIpam: '' + upgradeScenario: false + + + ## If upgrade_scenario is set, redeploy new IPAM version to existing clusters and run tests + - ${{if eq(parameters.upgradeScenario, true)}}: + - template: cilium/cilium-overlay-load-test-template.yaml + parameters: + name: cilium_overlay_upgrade + clusterType: overlay-byocni-nokubeproxy-up + clusterName: "cilium-over" + nodeCount: ${NODE_COUNT_CILIUM} + vmSize: ${VM_SIZE_CILIUM} + arch: amd64 + cni: "cilium" + upgradeAzureIpam: ${UPGRADE_AZURE_IPAM} + upgradeScenario: true + dependsOn: cilium_overlay + + - template: cilium/cilium-overlay-load-test-template.yaml + parameters: + name: cilium_overlay_hubble_upgrade + clusterType: overlay-byocni-nokubeproxy-up + clusterName: "cil-over-hub" + hubbleEnabled: true + nodeCount: ${NODE_COUNT_CILIUM} + vmSize: ${VM_SIZE_CILIUM} + arch: amd64 + cni: "cilium" + upgradeAzureIpam: ${UPGRADE_AZURE_IPAM} + upgradeScenario: true + dependsOn: cilium_overlay_hubble + + - template: cilium/cilium-overlay-load-test-template.yaml + parameters: + name: cilium_overlay_mariner_upgrade + clusterType: overlay-byocni-nokubeproxy-up + clusterName: "cil-over-mar" + nodeCount: ${NODE_COUNT_CILIUM} + vmSize: ${VM_SIZE_CILIUM} + arch: amd64 + osSKU: AzureLinux + cni: "cilium" + upgradeAzureIpam: ${UPGRADE_AZURE_IPAM} + upgradeScenario: true + dependsOn: cilium_overlay_mariner + + - template: cilium/cilium-overlay-load-test-template.yaml + parameters: + name: cilium_overlay_arm_upgrade + clusterType: overlay-byocni-nokubeproxy-up + clusterName: "cil-over-arm" + nodeCount: ${NODE_COUNT_CILIUM} + vmSize: Standard_D8ps_v5 + arch: arm64 + cni: "cilium" + upgradeAzureIpam: ${UPGRADE_AZURE_IPAM} + upgradeScenario: true + dependsOn: cilium_overlay_arm + + - template: cilium/cilium-overlay-load-test-template.yaml + parameters: + name: cilium_overlay_rdma_upgrade + clusterType: overlay-byocni-nokubeproxy-up + clusterName: "cil-over-rdma" + nodeCount: 2 + vmSize: Standard_HC44-16rs + arch: amd64 + cni: "cilium" + upgradeAzureIpam: ${UPGRADE_AZURE_IPAM} + upgradeScenario: true + dependsOn: cilium_overlay_rdma + + - template: cilium/cilium-overlay-load-test-template.yaml + parameters: + name: cilium_overlay_ds_upgrade + clusterType: dualstack-byocni-nokubeproxy-up + clusterName: "cil-ds-ov" + nodeCount: ${NODE_COUNT_CILIUM} + vmSize: ${VM_SIZE_CILIUM} + arch: amd64 + dualstackVersion: ${CILIUM_DUALSTACK_VERSION} + cni: "cilium_dualstack" + upgradeAzureIpam: ${UPGRADE_AZURE_IPAM} + upgradeScenario: true + dependsOn: cilium_overlay_ds + + - template: cilium/cilium-overlay-load-test-template.yaml + parameters: + name: cilium_ds_arm_upgrade + clusterType: dualstack-byocni-nokubeproxy-up + clusterName: "cil-ds-arm" + nodeCount: ${NODE_COUNT_CILIUM} + vmSize: Standard_D8ps_v5 + arch: arm64 + dualstackVersion: ${CILIUM_DUALSTACK_VERSION} + cni: "cilium_dualstack" + upgradeAzureIpam: ${UPGRADE_AZURE_IPAM} + upgradeScenario: true + dependsOn: cilium_ds_arm + + - template: cilium/cilium-overlay-load-test-template.yaml + parameters: + name: cilium_ds_mariner_upgrade + clusterType: dualstack-byocni-nokubeproxy-up + clusterName: "cil-ds-mar" + nodeCount: ${NODE_COUNT_CILIUM} + vmSize: ${VM_SIZE_CILIUM} + arch: amd64 + osSKU: AzureLinux + dualstackVersion: ${CILIUM_DUALSTACK_VERSION} + cni: "cilium_dualstack" + upgradeAzureIpam: ${UPGRADE_AZURE_IPAM} + upgradeScenario: true + dependsOn: cilium_ds_mariner + + - template: cilium/cilium-overlay-load-test-template.yaml + parameters: + name: cilium_ds_rdma_upgrade + clusterType: dualstack-byocni-nokubeproxy-up + clusterName: "cil-ds-rdma" + nodeCount: 2 + vmSize: Standard_HC44-16rs + arch: amd64 + dualstackVersion: ${CILIUM_DUALSTACK_VERSION} + cni: "cilium_dualstack" + upgradeAzureIpam: ${UPGRADE_AZURE_IPAM} + upgradeScenario: true + dependsOn: cilium_ds_rdma - stage: delete_resources displayName: "Delete Resources" @@ -418,6 +567,16 @@ stages: - windows_overlay_HNS - windows19_overlay_HNS - setup + - ${{if eq(parameters.upgradeScenario, true)}}: + - cilium_overlay_upgrade + - cilium_overlay_hubble_upgrade + - cilium_overlay_mariner_upgrade + - cilium_overlay_arm_upgrade + - cilium_overlay_rdma_upgrade + - cilium_overlay_ds_upgrade + - cilium_ds_arm_upgrade + - cilium_ds_mariner_upgrade + - cilium_ds_rdma_upgrade variables: commitID: $[ stagedependencies.setup.env.outputs['SetEnvVars.commitID'] ] jobs: diff --git a/.pipelines/templates/log-template.yaml b/.pipelines/templates/log-template.yaml index fee969889f..cb68cd263a 100644 --- a/.pipelines/templates/log-template.yaml +++ b/.pipelines/templates/log-template.yaml @@ -270,6 +270,9 @@ steps: - publish: $(System.DefaultWorkingDirectory)/${{ parameters.clusterName }}_${{ parameters.logType }}_Attempt_#$(System.StageAttempt) condition: always() - artifact: ${{ parameters.clusterName }}_${{ parameters.os }}${{ parameters.jobName }}_Attempt_#$(System.StageAttempt) + ${{ if contains(parameters.logType, 'upgrade') }}: + artifact: ${{ parameters.clusterName }}_upgrade_${{ parameters.os }}${{ parameters.jobName }}_Attempt_#$(System.StageAttempt) + ${{ else }}: + artifact: ${{ parameters.clusterName }}_${{ parameters.os }}${{ parameters.jobName }}_Attempt_#$(System.StageAttempt) name: acnLogs_${{ parameters.logType }} displayName: Publish Cluster logs From 677d88f658bd430450c7b8eaccc0b22a3fe9938c Mon Sep 17 00:00:00 2001 From: Camryn Lee Date: Thu, 22 May 2025 20:11:45 +0000 Subject: [PATCH 2/9] update to only use parameter.upgradeScenario and remove --- .pipelines/cni/cilium/cilium-overlay-load-test-template.yaml | 4 ++-- .pipelines/cni/pipeline.yaml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.pipelines/cni/cilium/cilium-overlay-load-test-template.yaml b/.pipelines/cni/cilium/cilium-overlay-load-test-template.yaml index b11f252776..8c5c0da5d5 100644 --- a/.pipelines/cni/cilium/cilium-overlay-load-test-template.yaml +++ b/.pipelines/cni/cilium/cilium-overlay-load-test-template.yaml @@ -124,7 +124,7 @@ stages: envsubst '${CILIUM_VERSION_TAG},${CILIUM_IMAGE_REGISTRY}' < test/integration/manifests/cilium/v${DIR}/cilium-operator/templates/deployment.yaml | kubectl apply -f - kubectl get po -owide -A - if [ "$UPGRADE_SCENARIO" = "true" ] + if [ ${{parameters.upgradeScenario}} = "true" ] then echo "Upgrade scenario is true, using upgrade azure ipam and cns version from pipeline variables" IPAM=$(UPGRADE_AZURE_IPAM_VERSION) @@ -186,7 +186,7 @@ stages: envsubst '${CILIUM_IMAGE_REGISTRY},${CILIUM_VERSION_TAG}' < test/integration/manifests/cilium/v${DIR}/cilium-operator/templates/deployment.yaml | kubectl apply -f - kubectl get po -owide -A - if [ "$UPGRADE_SCENARIO" = "true" ] + if [ ${{parameters.upgradeScenario}} = "true" ] then echo "Upgrade scenario is true, using upgrade azure ipam and cns version from pipeline variables" IPAM=$(UPGRADE_AZURE_IPAM_VERSION) diff --git a/.pipelines/cni/pipeline.yaml b/.pipelines/cni/pipeline.yaml index 346ff6d671..a9b98c86e1 100644 --- a/.pipelines/cni/pipeline.yaml +++ b/.pipelines/cni/pipeline.yaml @@ -415,7 +415,7 @@ stages: upgradeScenario: false - ## If upgrade_scenario is set, redeploy new IPAM version to existing clusters and run tests + ## If upgradeScenario is set, redeploy new IPAM version to existing clusters and run tests - ${{if eq(parameters.upgradeScenario, true)}}: - template: cilium/cilium-overlay-load-test-template.yaml parameters: From 592fe6f60ad77ce0aa4f3a218410ba57e1f24ad1 Mon Sep 17 00:00:00 2001 From: Camryn Lee Date: Tue, 3 Jun 2025 17:29:41 +0000 Subject: [PATCH 3/9] test empty upgrade vars --- .../cilium-overlay-load-test-template.yaml | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/.pipelines/cni/cilium/cilium-overlay-load-test-template.yaml b/.pipelines/cni/cilium/cilium-overlay-load-test-template.yaml index 8c5c0da5d5..d01b08677c 100644 --- a/.pipelines/cni/cilium/cilium-overlay-load-test-template.yaml +++ b/.pipelines/cni/cilium/cilium-overlay-load-test-template.yaml @@ -189,9 +189,24 @@ stages: if [ ${{parameters.upgradeScenario}} = "true" ] then echo "Upgrade scenario is true, using upgrade azure ipam and cns version from pipeline variables" - IPAM=$(UPGRADE_AZURE_IPAM_VERSION) + if [ -z "$UPGRADE_AZURE_IPAM_VERSION" ] + then + echo "UPGRADE_AZURE_IPAM_VERSION is not set, using default value" + IPAM=$(make azure-ipam-version) + else + IPAM=$(UPGRADE_AZURE_IPAM_VERSION) + echo "UPGRADE_AZURE_IPAM_VERSION is set to $IPAM" + fi + + if [ -z "$UPGRADE_CNS_VERSION" ] + then + echo "UPGRADE_CNS_VERSION is not set, using default value" + CNS=$(make cns-version) + else + CNS=$(UPGRADE_CNS_VERSION) + echo "UPGRADE_CNS_VERSION is set to $CNS" + fi IPAM_IMAGE_REPO=$(UPGRADE_IPAM_IMAGE_REPO) - CNS=$(UPGRADE_CNS_VERSION) CNS_IMAGE_REPO=$(UPGRADE_CNS_IMAGE_REPO) echo Deploying with Azure Ipam version $IPAM from $IPAM_IMAGE_REPO and CNS version $CNS from $CNS_IMAGE_REPO else From 346f3cf778c1cb043c10ec6eba1601a223ff8331 Mon Sep 17 00:00:00 2001 From: Camryn Lee Date: Tue, 3 Jun 2025 19:21:17 +0000 Subject: [PATCH 4/9] add var check to non-hubble job --- .../cilium-overlay-load-test-template.yaml | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/.pipelines/cni/cilium/cilium-overlay-load-test-template.yaml b/.pipelines/cni/cilium/cilium-overlay-load-test-template.yaml index d01b08677c..8aa3788358 100644 --- a/.pipelines/cni/cilium/cilium-overlay-load-test-template.yaml +++ b/.pipelines/cni/cilium/cilium-overlay-load-test-template.yaml @@ -127,9 +127,24 @@ stages: if [ ${{parameters.upgradeScenario}} = "true" ] then echo "Upgrade scenario is true, using upgrade azure ipam and cns version from pipeline variables" - IPAM=$(UPGRADE_AZURE_IPAM_VERSION) + if [ -z "$UPGRADE_AZURE_IPAM_VERSION" ] + then + echo "UPGRADE_AZURE_IPAM_VERSION is not set, using default value" + IPAM=$(make azure-ipam-version) + else + IPAM=$(UPGRADE_AZURE_IPAM_VERSION) + echo "UPGRADE_AZURE_IPAM_VERSION is set to $IPAM" + fi + + if [ -z "$UPGRADE_CNS_VERSION" ] + then + echo "UPGRADE_CNS_VERSION is not set, using default value" + CNS=$(make cns-version) + else + CNS=$(UPGRADE_CNS_VERSION) + echo "UPGRADE_CNS_VERSION is set to $CNS" + fi IPAM_IMAGE_REPO=$(UPGRADE_IPAM_IMAGE_REPO) - CNS=$(UPGRADE_CNS_VERSION) CNS_IMAGE_REPO=$(UPGRADE_CNS_IMAGE_REPO) echo Deploying with Azure Ipam version $IPAM from $IPAM_IMAGE_REPO and CNS version $CNS from $CNS_IMAGE_REPO else From 8b711fe33497e05683677ff6cdfd0ea0e6abd63f Mon Sep 17 00:00:00 2001 From: Camryn Lee Date: Wed, 11 Jun 2025 23:40:51 +0000 Subject: [PATCH 5/9] removing upgradeAzureIpam parameter --- .../cilium-overlay-load-test-template.yaml | 5 ++--- .pipelines/cni/pipeline.yaml | 18 ------------------ 2 files changed, 2 insertions(+), 21 deletions(-) diff --git a/.pipelines/cni/cilium/cilium-overlay-load-test-template.yaml b/.pipelines/cni/cilium/cilium-overlay-load-test-template.yaml index 8aa3788358..370f8e1dbf 100644 --- a/.pipelines/cni/cilium/cilium-overlay-load-test-template.yaml +++ b/.pipelines/cni/cilium/cilium-overlay-load-test-template.yaml @@ -12,13 +12,12 @@ parameters: dualstackVersion: "" cni: "cilium" upgradeScenario: "" - upgradeAzureIpam: "" # Condition confirms that: # Previous job has reported Succeeded. Previous job is currently setup which controls variable assignment and we are dependent on its success. # CONTROL_CNI either contains 'cniv1' or 'all'. It is not case sensitive stages: - - ${{if eq(parameters.upgradeAzureIpam, '')}}: + - ${{if eq(parameters.upgradeScenario, false)}}: - stage: create_${{ parameters.name }} condition: and( succeeded(), and( or( contains(variables.CONTROL_CNI, 'cilium') , contains(variables.CONTROL_CNI, 'all') ), or( contains(variables.CONTROL_OS, 'linux'), contains(variables.CONTROL_OS, 'all') ) ) ) variables: @@ -63,7 +62,7 @@ stages: pool: name: "$(BUILD_POOL_NAME_DEFAULT)" dependsOn: - - ${{ if and(eq(parameters.upgradeAzureIpam, ''), eq(parameters.upgradeScenario, false)) }}: + - ${{ if eq(parameters.upgradeScenario, false) }}: - create_${{ parameters.name }} - ${{ else }}: - ${{ parameters.dependsOn }} diff --git a/.pipelines/cni/pipeline.yaml b/.pipelines/cni/pipeline.yaml index a9b98c86e1..66ff3d1087 100644 --- a/.pipelines/cni/pipeline.yaml +++ b/.pipelines/cni/pipeline.yaml @@ -308,7 +308,6 @@ stages: vmSize: ${VM_SIZE_CILIUM} arch: amd64 cni: "cilium" - upgradeAzureIpam: '' upgradeScenario: false - template: cilium/cilium-overlay-load-test-template.yaml @@ -321,7 +320,6 @@ stages: vmSize: ${VM_SIZE_CILIUM} arch: amd64 cni: "cilium" - upgradeAzureIpam: '' upgradeScenario: false - template: cilium/cilium-overlay-load-test-template.yaml @@ -334,7 +332,6 @@ stages: arch: amd64 osSKU: AzureLinux cni: "cilium" - upgradeAzureIpam: '' upgradeScenario: false - template: cilium/cilium-overlay-load-test-template.yaml @@ -346,7 +343,6 @@ stages: vmSize: Standard_D8ps_v5 arch: arm64 cni: "cilium" - upgradeAzureIpam: '' upgradeScenario: false - template: cilium/cilium-overlay-load-test-template.yaml @@ -358,7 +354,6 @@ stages: vmSize: Standard_HC44-16rs arch: amd64 cni: "cilium" - upgradeAzureIpam: '' upgradeScenario: false - template: cilium/cilium-overlay-load-test-template.yaml @@ -371,7 +366,6 @@ stages: arch: amd64 dualstackVersion: ${CILIUM_DUALSTACK_VERSION} cni: "cilium_dualstack" - upgradeAzureIpam: '' upgradeScenario: false - template: cilium/cilium-overlay-load-test-template.yaml @@ -384,7 +378,6 @@ stages: arch: arm64 dualstackVersion: ${CILIUM_DUALSTACK_VERSION} cni: "cilium_dualstack" - upgradeAzureIpam: '' upgradeScenario: false - template: cilium/cilium-overlay-load-test-template.yaml @@ -398,7 +391,6 @@ stages: osSKU: AzureLinux dualstackVersion: ${CILIUM_DUALSTACK_VERSION} cni: "cilium_dualstack" - upgradeAzureIpam: '' upgradeScenario: false - template: cilium/cilium-overlay-load-test-template.yaml @@ -411,7 +403,6 @@ stages: arch: amd64 dualstackVersion: ${CILIUM_DUALSTACK_VERSION} cni: "cilium_dualstack" - upgradeAzureIpam: '' upgradeScenario: false @@ -426,7 +417,6 @@ stages: vmSize: ${VM_SIZE_CILIUM} arch: amd64 cni: "cilium" - upgradeAzureIpam: ${UPGRADE_AZURE_IPAM} upgradeScenario: true dependsOn: cilium_overlay @@ -440,7 +430,6 @@ stages: vmSize: ${VM_SIZE_CILIUM} arch: amd64 cni: "cilium" - upgradeAzureIpam: ${UPGRADE_AZURE_IPAM} upgradeScenario: true dependsOn: cilium_overlay_hubble @@ -454,7 +443,6 @@ stages: arch: amd64 osSKU: AzureLinux cni: "cilium" - upgradeAzureIpam: ${UPGRADE_AZURE_IPAM} upgradeScenario: true dependsOn: cilium_overlay_mariner @@ -467,7 +455,6 @@ stages: vmSize: Standard_D8ps_v5 arch: arm64 cni: "cilium" - upgradeAzureIpam: ${UPGRADE_AZURE_IPAM} upgradeScenario: true dependsOn: cilium_overlay_arm @@ -480,7 +467,6 @@ stages: vmSize: Standard_HC44-16rs arch: amd64 cni: "cilium" - upgradeAzureIpam: ${UPGRADE_AZURE_IPAM} upgradeScenario: true dependsOn: cilium_overlay_rdma @@ -494,7 +480,6 @@ stages: arch: amd64 dualstackVersion: ${CILIUM_DUALSTACK_VERSION} cni: "cilium_dualstack" - upgradeAzureIpam: ${UPGRADE_AZURE_IPAM} upgradeScenario: true dependsOn: cilium_overlay_ds @@ -508,7 +493,6 @@ stages: arch: arm64 dualstackVersion: ${CILIUM_DUALSTACK_VERSION} cni: "cilium_dualstack" - upgradeAzureIpam: ${UPGRADE_AZURE_IPAM} upgradeScenario: true dependsOn: cilium_ds_arm @@ -523,7 +507,6 @@ stages: osSKU: AzureLinux dualstackVersion: ${CILIUM_DUALSTACK_VERSION} cni: "cilium_dualstack" - upgradeAzureIpam: ${UPGRADE_AZURE_IPAM} upgradeScenario: true dependsOn: cilium_ds_mariner @@ -537,7 +520,6 @@ stages: arch: amd64 dualstackVersion: ${CILIUM_DUALSTACK_VERSION} cni: "cilium_dualstack" - upgradeAzureIpam: ${UPGRADE_AZURE_IPAM} upgradeScenario: true dependsOn: cilium_ds_rdma From dabf56b101dd2c9b42008f29b23451d06127cbd2 Mon Sep 17 00:00:00 2001 From: Camryn Lee Date: Tue, 17 Jun 2025 19:28:16 +0000 Subject: [PATCH 6/9] make deploy cns independent job from deploy cilium --- .../cilium-overlay-load-test-template.yaml | 83 +++++++------------ 1 file changed, 28 insertions(+), 55 deletions(-) diff --git a/.pipelines/cni/cilium/cilium-overlay-load-test-template.yaml b/.pipelines/cni/cilium/cilium-overlay-load-test-template.yaml index 370f8e1dbf..178ef76570 100644 --- a/.pipelines/cni/cilium/cilium-overlay-load-test-template.yaml +++ b/.pipelines/cni/cilium/cilium-overlay-load-test-template.yaml @@ -122,53 +122,7 @@ stages: envsubst '${CILIUM_VERSION_TAG},${CILIUM_IMAGE_REGISTRY}' < test/integration/manifests/cilium/v${DIR}/cilium-operator/templates/deployment.yaml | kubectl apply -f - kubectl get po -owide -A - - if [ ${{parameters.upgradeScenario}} = "true" ] - then - echo "Upgrade scenario is true, using upgrade azure ipam and cns version from pipeline variables" - if [ -z "$UPGRADE_AZURE_IPAM_VERSION" ] - then - echo "UPGRADE_AZURE_IPAM_VERSION is not set, using default value" - IPAM=$(make azure-ipam-version) - else - IPAM=$(UPGRADE_AZURE_IPAM_VERSION) - echo "UPGRADE_AZURE_IPAM_VERSION is set to $IPAM" - fi - - if [ -z "$UPGRADE_CNS_VERSION" ] - then - echo "UPGRADE_CNS_VERSION is not set, using default value" - CNS=$(make cns-version) - else - CNS=$(UPGRADE_CNS_VERSION) - echo "UPGRADE_CNS_VERSION is set to $CNS" - fi - IPAM_IMAGE_REPO=$(UPGRADE_IPAM_IMAGE_REPO) - CNS_IMAGE_REPO=$(UPGRADE_CNS_IMAGE_REPO) - echo Deploying with Azure Ipam version $IPAM from $IPAM_IMAGE_REPO and CNS version $CNS from $CNS_IMAGE_REPO - else - if [ -z "$TEST_AZURE_IPAM_VERSION" ] - then - echo "TEST_AZURE_IPAM_VERSION is not set, using default value" - IPAM=$(make azure-ipam-version) - else - IPAM=$(TEST_AZURE_IPAM_VERSION) - echo "TEST_AZURE_IPAM_VERSION is set to $IPAM" - fi - if [ -z "$TEST_CNS_VERSION" ] - then - echo "TEST_CNS_VERSION is not set, using default value" - CNS=$(make cns-version) - else - CNS=$(TEST_CNS_VERSION) - echo "TEST_CNS_VERSION is set to $CNS" - fi - fi - echo "Deploy Azure-CNS" - sudo -E env "PATH=$PATH" make test-integration AZURE_IPAM_VERSION=${IPAM} CNS_VERSION=${CNS} INSTALL_CNS=true INSTALL_OVERLAY=true CNS_IMAGE_REPO=$(CNS_IMAGE_REPO) IPAM_IMAGE_REPO=$(IPAM_IMAGE_REPO) - kubectl get po -owide -A - kubectl get crd -A - ${{if eq(parameters.hubbleEnabled, true)}}: - job: deploy_cilium_components displayName: Deploy Cilium with Hubble @@ -200,8 +154,27 @@ stages: envsubst '${CILIUM_IMAGE_REGISTRY},${CILIUM_VERSION_TAG}' < test/integration/manifests/cilium/v${DIR}/cilium-operator/templates/deployment.yaml | kubectl apply -f - kubectl get po -owide -A - if [ ${{parameters.upgradeScenario}} = "true" ] - then + - job: deploy_cns_and_ipam + displayName: "Deploy CNS and IPAM" + dependsOn: deploy_cilium_components + steps: + - task: AzureCLI@2 + displayName: "Install CNS and IPAM" + inputs: + azureSubscription: $(BUILD_VALIDATIONS_SERVICE_CONNECTION) + scriptLocation: "inlineScript" + scriptType: "bash" + addSpnToEnvironment: true + inlineScript: | + set -ex + az extension add --name aks-preview + make -C ./hack/aks set-kubeconf AZCLI=az CLUSTER=${{ parameters.clusterName }}-$(commitID) + ls -lah + pwd + kubectl cluster-info + kubectl get po -owide -A + if [ ${{parameters.upgradeScenario}} = "true" ] + then echo "Upgrade scenario is true, using upgrade azure ipam and cns version from pipeline variables" if [ -z "$UPGRADE_AZURE_IPAM_VERSION" ] then @@ -223,7 +196,7 @@ stages: IPAM_IMAGE_REPO=$(UPGRADE_IPAM_IMAGE_REPO) CNS_IMAGE_REPO=$(UPGRADE_CNS_IMAGE_REPO) echo Deploying with Azure Ipam version $IPAM from $IPAM_IMAGE_REPO and CNS version $CNS from $CNS_IMAGE_REPO - else + else if [ -z "$TEST_AZURE_IPAM_VERSION" ] then echo "TEST_AZURE_IPAM_VERSION is not set, using default value" @@ -240,12 +213,12 @@ stages: CNS=$(TEST_CNS_VERSION) echo "TEST_CNS_VERSION is set to $CNS" fi - fi - - echo "Deploy Azure-CNS" - sudo -E env "PATH=$PATH" make test-integration AZURE_IPAM_VERSION=${IPAM} CNS_VERSION=${CNS} INSTALL_CNS=true INSTALL_OVERLAY=true CNS_IMAGE_REPO=$(CNS_IMAGE_REPO) IPAM_IMAGE_REPO=$(IPAM_IMAGE_REPO) - kubectl get po -owide -A - kubectl get crd -A + fi + + echo "Deploy Azure-CNS" + sudo -E env "PATH=$PATH" make test-integration AZURE_IPAM_VERSION=${IPAM} CNS_VERSION=${CNS} INSTALL_CNS=true INSTALL_OVERLAY=true CNS_IMAGE_REPO=$(CNS_IMAGE_REPO) IPAM_IMAGE_REPO=$(IPAM_IMAGE_REPO) + kubectl get po -owide -A + kubectl get crd -A - job: deploy_pods condition: and( and( not(canceled()), not(failed()) ), or( contains(variables.CONTROL_SCENARIO, 'scaleTest') , contains(variables.CONTROL_SCENARIO, 'all') ) ) From e03de2f33a4c2e8cda3595ecd3ff7a645f888b8c Mon Sep 17 00:00:00 2001 From: Camryn Lee Date: Wed, 18 Jun 2025 18:44:59 +0000 Subject: [PATCH 7/9] pass logtype to artifact name --- .pipelines/templates/log-template.yaml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/.pipelines/templates/log-template.yaml b/.pipelines/templates/log-template.yaml index cb68cd263a..17a9d25ab7 100644 --- a/.pipelines/templates/log-template.yaml +++ b/.pipelines/templates/log-template.yaml @@ -270,9 +270,6 @@ steps: - publish: $(System.DefaultWorkingDirectory)/${{ parameters.clusterName }}_${{ parameters.logType }}_Attempt_#$(System.StageAttempt) condition: always() - ${{ if contains(parameters.logType, 'upgrade') }}: - artifact: ${{ parameters.clusterName }}_upgrade_${{ parameters.os }}${{ parameters.jobName }}_Attempt_#$(System.StageAttempt) - ${{ else }}: - artifact: ${{ parameters.clusterName }}_${{ parameters.os }}${{ parameters.jobName }}_Attempt_#$(System.StageAttempt) + artifact: ${{ parameters.clusterName }}_${{ parameters.logType }}_${{ parameters.os }}${{ parameters.jobName }}_Attempt_#$(System.StageAttempt) name: acnLogs_${{ parameters.logType }} displayName: Publish Cluster logs From c8058f1ab0f37eb2b2ccb74e953bc79c50ac0265 Mon Sep 17 00:00:00 2001 From: Camryn Lee Date: Thu, 26 Jun 2025 21:43:49 +0000 Subject: [PATCH 8/9] move conditional logType check to main template --- .../cni/cilium/cilium-overlay-load-test-template.yaml | 6 ++++-- .../cni/load-test-templates/pod-deployment-template.yaml | 7 ++----- .../cni/load-test-templates/restart-node-template.yaml | 7 ++----- 3 files changed, 8 insertions(+), 12 deletions(-) diff --git a/.pipelines/cni/cilium/cilium-overlay-load-test-template.yaml b/.pipelines/cni/cilium/cilium-overlay-load-test-template.yaml index 178ef76570..3369d126da 100644 --- a/.pipelines/cni/cilium/cilium-overlay-load-test-template.yaml +++ b/.pipelines/cni/cilium/cilium-overlay-load-test-template.yaml @@ -233,7 +233,8 @@ stages: iterations: ${ITERATIONS_CILIUM} nodeCount: ${{ parameters.nodeCount }} cni: cilium - upgradeScenario: ${{ parameters.upgradeScenario }} + ${{ if eq(parameters.upgradeScenario, 'true') }}: + logType: upgradeScaleTest - template: ../load-test-templates/validate-state-template.yaml parameters: clusterName: ${{ parameters.clusterName }}-$(commitID) @@ -249,7 +250,8 @@ stages: os: ${{ parameters.os }} cni: cilium region: $(location) - upgradeScenario: ${{ parameters.upgradeScenario }} + ${{ if eq(parameters.upgradeScenario, 'true') }}: + logType: upgradeRestartNode - template: ../load-test-templates/validate-state-template.yaml parameters: clusterName: ${{ parameters.clusterName }}-$(commitID) diff --git a/.pipelines/cni/load-test-templates/pod-deployment-template.yaml b/.pipelines/cni/load-test-templates/pod-deployment-template.yaml index bb5168a237..d87c510914 100644 --- a/.pipelines/cni/load-test-templates/pod-deployment-template.yaml +++ b/.pipelines/cni/load-test-templates/pod-deployment-template.yaml @@ -6,7 +6,7 @@ parameters: nodeCount: 10 cni: "" jobName: "deploy_pods" - upgradeScenario: "" + logType: "scaleTest" steps: - task: AzureCLI@2 @@ -30,7 +30,4 @@ steps: os: ${{ parameters.os }} cni: ${{ parameters.cni }} jobName: ${{ parameters.jobName }} - ${{ if eq(parameters.upgradeScenario, 'true') }}: - logType: upgradeScaleTest - ${{ else }}: - logType: scaleTest + logType: ${{ parameters.logType }} diff --git a/.pipelines/cni/load-test-templates/restart-node-template.yaml b/.pipelines/cni/load-test-templates/restart-node-template.yaml index 0ff754b62a..f07940a992 100644 --- a/.pipelines/cni/load-test-templates/restart-node-template.yaml +++ b/.pipelines/cni/load-test-templates/restart-node-template.yaml @@ -4,7 +4,7 @@ parameters: cni: "" jobName: "restart_nodes" region: "" - upgradeScenario: "" + logType: "restartNode" steps: - task: AzureCLI@2 @@ -57,10 +57,7 @@ steps: - template: ../../templates/log-template.yaml parameters: clusterName: ${{ parameters.clusterName }} - ${{ if eq(parameters.upgradeScenario, 'true') }}: - logType: upgradeRestartNode - ${{ else }}: - logType: restartNode + logType: ${{ parameters.logType }} os: ${{ parameters.os }} cni: ${{ parameters.cni }} jobName: ${{ parameters.jobName }} From 22248278d3d20804696dd91172cffdb42a8dad09 Mon Sep 17 00:00:00 2001 From: Camryn Lee Date: Mon, 30 Jun 2025 16:47:29 +0000 Subject: [PATCH 9/9] pass log type to restart cns --- .../cni/cilium/cilium-overlay-load-test-template.yaml | 3 ++- .../cni/load-test-templates/restart-cns-template.yaml | 7 ++----- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/.pipelines/cni/cilium/cilium-overlay-load-test-template.yaml b/.pipelines/cni/cilium/cilium-overlay-load-test-template.yaml index 3369d126da..4d97f3fc41 100644 --- a/.pipelines/cni/cilium/cilium-overlay-load-test-template.yaml +++ b/.pipelines/cni/cilium/cilium-overlay-load-test-template.yaml @@ -269,7 +269,8 @@ stages: scaleup: ${SCALEUP_CILIUM} nodeCount: ${{ parameters.nodeCount }} cni: ${{ parameters.cni }} - upgradeScenario: ${{ parameters.upgradeScenario }} + ${{ if eq(parameters.upgradeScenario, 'true') }}: + logType: upgradeRestartCNS - job: cni_tests displayName: "Cilium Test" dependsOn: restart_cns diff --git a/.pipelines/cni/load-test-templates/restart-cns-template.yaml b/.pipelines/cni/load-test-templates/restart-cns-template.yaml index bc6887f65b..f0d02cb1c7 100644 --- a/.pipelines/cni/load-test-templates/restart-cns-template.yaml +++ b/.pipelines/cni/load-test-templates/restart-cns-template.yaml @@ -5,7 +5,7 @@ parameters: nodeCount: 10 os: "" jobName: "restart_cns" - upgradeScenario: "" + logType: "restartCNS" steps: - task: AzureCLI@2 @@ -39,10 +39,7 @@ steps: - template: ../../templates/log-template.yaml parameters: clusterName: ${{ parameters.clusterName }} - ${{ if eq(parameters.upgradeScenario, 'true') }}: - logType: upgradeRestartCNS - ${{ else }}: - logType: restartCNS + logType: ${{ parameters.logType }} os: ${{ parameters.os }} cni: ${{ parameters.cni }} jobName: ${{ parameters.jobName }}