Skip to content

ci: azure-ipam patch upgrade testing #3678

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

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

camrynl
Copy link
Contributor

@camrynl camrynl commented May 22, 2025

Reason for Change:
First pr for patch upgrade testing in CNI release pipeline. The CNI release patch upgrade tests will follow the same flow that we use for cilium patch upgrade tests.
Create cluster > deploy current images > e2e > deploy upgrade images > e2e > delete cluster

  • Adding TEST_AZURE_IPAM_VERSION/UPGRADE_AZURE_IPAM_VERSION and TEST_CNS_VERSION/UPGRADE_CNS_VERSION and new conditions to check these vars in the upgrade scenario.
    (CNS patch upgrade work still needs to be completed for non cilium)

  • Adding parameter upgradeScenario as a field to check off in pipeline run to determine if new patch needs to be deployed/tested

further documentation/instruction for use will be added when pipeline work is complete, but here is a quick guide for how values are expected to be set

  • upgradeScenario [T/F] - true will deploy patches and retest, false will run pipeline as usual
  • if upgradeScenario is true
    TEST_AZURE_IPAM_VERSION: set to current azure ipam patch
    UPGRADE_AZURE_IPAM_VERSION: set to upgrade azure ipam patch
    TEST_CNS_VERSION: set to current cns patch
    UPGRADE_CNS_VERSION: set to upgrade cns patch

if the TEST_* or UPGRADE_* values are not set it will use make to get the pipeline image build

Issue Fixed:

Requirements:

Notes:

@camrynl camrynl added the ci Infra or tooling. label May 22, 2025
@camrynl camrynl marked this pull request as ready for review May 29, 2025 17:54
@Copilot Copilot AI review requested due to automatic review settings May 29, 2025 17:54
@camrynl camrynl requested a review from a team as a code owner May 29, 2025 17:54
@camrynl camrynl requested a review from ibezrukavyi May 29, 2025 17:54
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR introduces patch upgrade testing for Azure Container Networking by adding upgrade-specific pipeline parameters and stages to mirror the existing Cilium patch upgrade flow.

  • Added new parameters (upgradeScenario, upgradeAzureIpam) and conditions to support upgrade testing.
  • Updated multiple pipeline and load test templates to conditionally publish logs and deploy upgrade-specific jobs.
  • Extended the cilium overlay load test template with upgrade logic for IPAM and CNS versions.

Reviewed Changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
.pipelines/templates/log-template.yaml Added conditional artifact publishing based on logType.
.pipelines/cni/pipeline.yaml Introduced new upgradeScenario parameter and upgrade job stages.
.pipelines/cni/load-test-templates/restart-node-template.yaml Updated logType condition to support upgrade scenarios.
.pipelines/cni/load-test-templates/restart-cns-template.yaml Updated logType condition to support upgrade scenarios.
.pipelines/cni/load-test-templates/pod-deployment-template.yaml Added conditional logType assignment for pod deployment testing.
.pipelines/cni/cilium/cilium-overlay-load-test-template.yaml Extended upgrade logic with conditional deployment steps for IPAM/CNS.

@@ -60,7 +63,10 @@ stages:
pool:
name: "$(BUILD_POOL_NAME_DEFAULT)"
dependsOn:
- create_${{ parameters.name }}
- ${{ if and(eq(parameters.upgradeAzureIpam, ''), eq(parameters.upgradeScenario, false)) }}:
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this the only condition where we depend on cluster creation ?
what if parameters.upgradeScenario is "" ? Can we add a table of the combination/expectation of these variables in the description ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

for this PR, yes. eventually when we have cns or cni patch upgrades, we will need to skip the cluster create there as well.

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

Choose a reason for hiding this comment

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

Even if upgradeAzureIpam is false, will we use the UPGRADE_AZURE_IPAM_VERSION ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

oh, will need to add in another condition to check whether or not UPGRADE_AZURE_IPAM_VERSION is set because even if upgradeScenario is true we may only be testing the upgrade for cns and not azure-ipam

vipul-21
vipul-21 previously approved these changes Jun 11, 2025


## If upgradeScenario is set, redeploy new IPAM version to existing clusters and run tests
- ${{if eq(parameters.upgradeScenario, true)}}:
Copy link
Contributor

Choose a reason for hiding this comment

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

if this is performing the same e2e test as above, would it be possible to make a template that performs the upgrade test where we pass all these parameters and the template automatically creates the before and after upgrade stages? The template could potentially also take in the upgrade scenario as true or false or a pipeline variable/expression for enable/disable. If we add more scenarios in the future I feel like it would be easy to forget to add the upgrade stage

Copy link
Contributor Author

Choose a reason for hiding this comment

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

will keep this in mind to address in a follow up

nodeCount: ${{ parameters.nodeCount }}
vmSize: ${{ parameters.vmSize }}
region: $(location)
- ${{if eq(parameters.upgradeScenario, false)}}:
Copy link
Contributor

Choose a reason for hiding this comment

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

If upgradeScenario is false we are not creating cluster ? the description says we need to create the cluster for upgrade scenario ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

if upgradeScenario is false we create the cluster, if upgradeScenario is true we skip this since the cluster is already created

Copy link
Contributor Author

Choose a reason for hiding this comment

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

in the pipeline.yaml I am calling this template and passing the parameter upgradeScenario.
- template: cilium/cilium-overlay-load-test-template.yaml
for each scenario there are two calls to the template, the first contains upgradeScenario: false, and the next contains upgradeScenario: true

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ci Infra or tooling.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants