From 39184d1c128fec73f4265529efcb63f7a6351506 Mon Sep 17 00:00:00 2001 From: vittoria salim Date: Wed, 13 May 2026 15:25:03 +1000 Subject: [PATCH 1/5] move test to canadacentral --- .../node-auto-provisioning-benchmark.yml | 4 +- test-nap.sh | 154 ++++++++++++++++++ 2 files changed, 156 insertions(+), 2 deletions(-) create mode 100644 test-nap.sh diff --git a/pipelines/perf-eval/Autoscale Benchmark/node-auto-provisioning-benchmark.yml b/pipelines/perf-eval/Autoscale Benchmark/node-auto-provisioning-benchmark.yml index fb5808d876..5b74bddae6 100644 --- a/pipelines/perf-eval/Autoscale Benchmark/node-auto-provisioning-benchmark.yml +++ b/pipelines/perf-eval/Autoscale Benchmark/node-auto-provisioning-benchmark.yml @@ -128,7 +128,7 @@ stages: credential_type: service_connection ssh_key_enabled: false - - stage: azure_australiaeast_small_scale + - stage: azure_canadacentral_small_scale condition: | or( eq(variables['Build.CronSchedule.DisplayName'], '3:00 AM Daily'), @@ -140,7 +140,7 @@ stages: parameters: cloud: azure regions: - - australiaeast + - canadacentral engine: clusterloader2 engine_input: image: "ghcr.io/azure/clusterloader2:v20250423" diff --git a/test-nap.sh b/test-nap.sh new file mode 100644 index 0000000000..860fca62c4 --- /dev/null +++ b/test-nap.sh @@ -0,0 +1,154 @@ +# ========================================= +# VARIABLES +# ========================================= + +RG=nap-test +LOCATION=australiaeast + +CLUSTER=nap + +VNET=nap-vnet +VNET_CIDR=10.192.0.0/10 + +SUBNET=nap-subnet +SUBNET_CIDR=10.192.0.0/16 + +IDENTITY=nap-identity + +NODEPOOL=system +NODECOUNT=5 +VMSIZE=Standard_D4_v5 + + + +# ========================================= +# CREATE VNET +# ========================================= + +az network vnet create \ + -g $RG \ + -n $VNET \ + --address-prefixes $VNET_CIDR \ + --subnet-name $SUBNET \ + --subnet-prefixes $SUBNET_CIDR + + +# ========================================= +# GET SUBNET ID (IMPORTANT) +# ========================================= + +SUBNET_ID=$(az network vnet subnet show \ + -g $RG \ + --vnet-name $VNET \ + -n $SUBNET \ + --query id -o tsv) + +echo $SUBNET_ID + + +# ========================================= +# CREATE MANAGED IDENTITY +# ========================================= + +az identity create \ + -g $RG \ + -n $IDENTITY + + +# ========================================= +# GET IDENTITY RESOURCE ID +# ========================================= + +IDENTITY_ID=$(az identity show \ + -g $RG \ + -n $IDENTITY \ + --query id -o tsv) + +echo $IDENTITY_ID + + +# ========================================= +# GET IDENTITY PRINCIPAL ID +# ========================================= + +PRINCIPAL_ID=$(az identity show \ + -g $RG \ + -n $IDENTITY \ + --query principalId -o tsv) + +echo $PRINCIPAL_ID + + +# ========================================= +# ASSIGN NETWORK CONTRIBUTOR +# ========================================= + +az role assignment create \ + --assignee-object-id $PRINCIPAL_ID \ + --role "Network Contributor" \ + --scope /subscriptions/$(az account show --query id -o tsv)/resourceGroups/$RG + + +# ========================================= +# CREATE AKS CLUSTER +# CRITICAL: +# USE FULL SUBNET ID +# ========================================= + +az aks create \ + -g $RG \ + -n $CLUSTER \ + --location $LOCATION \ + --sku-tier standard \ + --enable-managed-identity \ + --assign-identity $IDENTITY_ID \ + --network-plugin azure \ + --vnet-subnet-id $SUBNET_ID \ + --node-count $NODECOUNT \ + --nodepool-name $NODEPOOL \ + --node-vm-size $VMSIZE \ + --node-init-taints CriticalAddonsOnly=true:NoSchedule \ + --node-provisioning-mode Auto \ + --enable-oidc-issuer \ + --generate-ssh-keys + + +# ========================================= +# GET KUBECONFIG +# ========================================= + +az aks get-credentials \ + -g $RG \ + -n $CLUSTER \ + --overwrite-existing + + +# ========================================= +# VERIFY CLUSTER SUBNET BINDING +# MUST POINT TO 66998-3093b6fc +# NOT MC_* +# ========================================= + +az aks show \ + -g $RG \ + -n $CLUSTER \ + --query agentPoolProfiles[0].vnetSubnetId -o tsv + + +# ========================================= +# VERIFY KARPENTER NODECLASS +# ========================================= + +kubectl get aksnodeclass -o yaml + + +# ========================================= +# EXPECTED RESULT +# ========================================= +# +# status: +# conditions: +# - type: SubnetsReady +# status: "True" +# +# ========================================= From 4b9ad724ab481104aebe64e14f6192474f51e202 Mon Sep 17 00:00:00 2001 From: vittoria salim Date: Mon, 25 May 2026 15:07:04 +1000 Subject: [PATCH 2/5] add workflow for cl2 --- .github/workflows/cl2-image.yml | 115 ++++++++++++++++++++++++++++++++ 1 file changed, 115 insertions(+) create mode 100644 .github/workflows/cl2-image.yml diff --git a/.github/workflows/cl2-image.yml b/.github/workflows/cl2-image.yml new file mode 100644 index 0000000000..bfb601dbd0 --- /dev/null +++ b/.github/workflows/cl2-image.yml @@ -0,0 +1,115 @@ +name: Build ClusterLoader2 Image + +on: + schedule: + # Every 2 weeks at 03:00 UTC (Sunday). + - cron: "0 3 */14 * 0" + workflow_dispatch: + inputs: + upstream_ref: + description: "Upstream kubernetes/perf-tests ref (branch/tag/SHA)" + required: false + default: "master" + push_target: + description: "Where to push the built image" + required: false + default: "telescope" + type: choice + options: + - telescope + run_validation: + description: "Run go-based validation (go run cmd/clusterloader2.go)" + required: false + default: true + type: boolean + +permissions: + contents: read + packages: write + +env: + # Telescope default package location + TELESCOPE_IMAGE: ghcr.io/azure/clusterloader2 + +jobs: + build: + name: Build, Validate, and Push + runs-on: ubuntu-latest + outputs: + image_tag: ${{ steps.meta.outputs.image_tag }} + upstream_ref: ${{ steps.meta.outputs.upstream_ref }} + push_target: ${{ steps.meta.outputs.push_target }} + telescope_image: ${{ steps.meta.outputs.telescope_image }} + steps: + - name: Set workflow metadata + id: meta + shell: bash + run: | + set -euo pipefail + + IMAGE_TAG="v$(date -u +%Y%m%d)" + UPSTREAM_REF="${{ github.event_name == 'workflow_dispatch' && inputs.upstream_ref || 'master' }}" + PUSH_TARGET="${{ github.event_name == 'workflow_dispatch' && inputs.push_target || 'telescope' }}" + TELESCOPE_IMAGE="${TELESCOPE_IMAGE}" + + echo "image_tag=${IMAGE_TAG}" >> "$GITHUB_OUTPUT" + echo "upstream_ref=${UPSTREAM_REF}" >> "$GITHUB_OUTPUT" + echo "push_target=${PUSH_TARGET}" >> "$GITHUB_OUTPUT" + echo "telescope_image=${TELESCOPE_IMAGE}" >> "$GITHUB_OUTPUT" + + - name: Checkout upstream perf-tests + uses: actions/checkout@v4 + with: + repository: kubernetes/perf-tests + ref: ${{ steps.meta.outputs.upstream_ref }} + path: perf-tests + fetch-depth: 1 + + - name: Set up Go + if: ${{ github.event_name != 'workflow_dispatch' || inputs.run_validation }} + uses: actions/setup-go@v5 + with: + go-version-file: perf-tests/clusterloader2/go.mod + + - name: Validate with go run cmd/clusterloader2.go + if: ${{ github.event_name != 'workflow_dispatch' || inputs.run_validation }} + working-directory: perf-tests/clusterloader2 + shell: bash + run: | + set -euo pipefail + if [[ ! -f cmd/clusterloader2.go ]]; then + echo "cmd/clusterloader2.go not found in upstream ref ${{ steps.meta.outputs.upstream_ref }}" + ls -la cmd + exit 1 + fi + go run cmd/clusterloader2.go --help > /tmp/cl2-help.txt + head -n 40 /tmp/cl2-help.txt + + - name: Build local clusterloader2 image + shell: bash + run: | + set -euo pipefail + docker build \ + -f perf-tests/clusterloader2/Dockerfile \ + -t local/clusterloader2:${{ steps.meta.outputs.image_tag }} \ + perf-tests + docker image inspect local/clusterloader2:${{ steps.meta.outputs.image_tag }} > /dev/null + + - name: Log in to GHCR for Telescope image + if: ${{ steps.meta.outputs.push_target == 'telescope' || steps.meta.outputs.push_target == 'both' }} + uses: docker/login-action@v3 + with: + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + + - name: Push image to Telescope (date + latest) + if: ${{ steps.meta.outputs.push_target == 'telescope' }} + shell: bash + run: | + set -euo pipefail + docker tag local/clusterloader2:${{ steps.meta.outputs.image_tag }} ${{ steps.meta.outputs.telescope_image }}:${{ steps.meta.outputs.image_tag }} + docker tag local/clusterloader2:${{ steps.meta.outputs.image_tag }} ${{ steps.meta.outputs.telescope_image }}:latest + docker push ${{ steps.meta.outputs.telescope_image }}:${{ steps.meta.outputs.image_tag }} + docker push ${{ steps.meta.outputs.telescope_image }}:latest + From f49d05fe00e7e7065a6829b59ac679b0ae535786 Mon Sep 17 00:00:00 2001 From: vittoria salim Date: Mon, 25 May 2026 15:54:44 +1000 Subject: [PATCH 3/5] build cl2 image --- .github/workflows/cl2-image.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/cl2-image.yml b/.github/workflows/cl2-image.yml index bfb601dbd0..b736d63267 100644 --- a/.github/workflows/cl2-image.yml +++ b/.github/workflows/cl2-image.yml @@ -1,6 +1,10 @@ name: Build ClusterLoader2 Image on: + push: + branches: + - main + - vitto/cl2_image schedule: # Every 2 weeks at 03:00 UTC (Sunday). - cron: "0 3 */14 * 0" From b0bf6061b018de4397f61830403d98e60c834aae Mon Sep 17 00:00:00 2001 From: vittoria salim Date: Mon, 25 May 2026 23:18:54 +1000 Subject: [PATCH 4/5] fix image --- .github/workflows/cl2-image.yml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/cl2-image.yml b/.github/workflows/cl2-image.yml index b736d63267..26e1236112 100644 --- a/.github/workflows/cl2-image.yml +++ b/.github/workflows/cl2-image.yml @@ -22,7 +22,7 @@ on: options: - telescope run_validation: - description: "Run go-based validation (go run cmd/clusterloader2.go)" + description: "Run go-based validation (go run cmd/clusterloader.go)" required: false default: true type: boolean @@ -32,8 +32,8 @@ permissions: packages: write env: - # Telescope default package location - TELESCOPE_IMAGE: ghcr.io/azure/clusterloader2 + # GitHub Packages target for Azure/telescope. + TELESCOPE_IMAGE: ghcr.io/azure/clusterloader2-upstream jobs: build: @@ -75,18 +75,18 @@ jobs: with: go-version-file: perf-tests/clusterloader2/go.mod - - name: Validate with go run cmd/clusterloader2.go + - name: Validate with go run cmd/clusterloader.go if: ${{ github.event_name != 'workflow_dispatch' || inputs.run_validation }} working-directory: perf-tests/clusterloader2 shell: bash run: | set -euo pipefail - if [[ ! -f cmd/clusterloader2.go ]]; then - echo "cmd/clusterloader2.go not found in upstream ref ${{ steps.meta.outputs.upstream_ref }}" + if [[ ! -f cmd/clusterloader.go ]]; then + echo "cmd/clusterloader.go not found in upstream ref ${{ steps.meta.outputs.upstream_ref }}" ls -la cmd exit 1 fi - go run cmd/clusterloader2.go --help > /tmp/cl2-help.txt + go run cmd/clusterloader.go --help > /tmp/cl2-help.txt head -n 40 /tmp/cl2-help.txt - name: Build local clusterloader2 image @@ -100,7 +100,7 @@ jobs: docker image inspect local/clusterloader2:${{ steps.meta.outputs.image_tag }} > /dev/null - name: Log in to GHCR for Telescope image - if: ${{ steps.meta.outputs.push_target == 'telescope' || steps.meta.outputs.push_target == 'both' }} + if: ${{ steps.meta.outputs.push_target == 'telescope' }} uses: docker/login-action@v3 with: registry: ghcr.io From 20261ea8d2d2578d0003d3ff16d9a8c0f8a8cc84 Mon Sep 17 00:00:00 2001 From: vittoria salim Date: Mon, 25 May 2026 23:24:20 +1000 Subject: [PATCH 5/5] remove validation --- .github/workflows/cl2-image.yml | 28 +--------------------------- 1 file changed, 1 insertion(+), 27 deletions(-) diff --git a/.github/workflows/cl2-image.yml b/.github/workflows/cl2-image.yml index 26e1236112..9d6deafb75 100644 --- a/.github/workflows/cl2-image.yml +++ b/.github/workflows/cl2-image.yml @@ -21,11 +21,6 @@ on: type: choice options: - telescope - run_validation: - description: "Run go-based validation (go run cmd/clusterloader.go)" - required: false - default: true - type: boolean permissions: contents: read @@ -37,7 +32,7 @@ env: jobs: build: - name: Build, Validate, and Push + name: Build and Push runs-on: ubuntu-latest outputs: image_tag: ${{ steps.meta.outputs.image_tag }} @@ -68,27 +63,6 @@ jobs: ref: ${{ steps.meta.outputs.upstream_ref }} path: perf-tests fetch-depth: 1 - - - name: Set up Go - if: ${{ github.event_name != 'workflow_dispatch' || inputs.run_validation }} - uses: actions/setup-go@v5 - with: - go-version-file: perf-tests/clusterloader2/go.mod - - - name: Validate with go run cmd/clusterloader.go - if: ${{ github.event_name != 'workflow_dispatch' || inputs.run_validation }} - working-directory: perf-tests/clusterloader2 - shell: bash - run: | - set -euo pipefail - if [[ ! -f cmd/clusterloader.go ]]; then - echo "cmd/clusterloader.go not found in upstream ref ${{ steps.meta.outputs.upstream_ref }}" - ls -la cmd - exit 1 - fi - go run cmd/clusterloader.go --help > /tmp/cl2-help.txt - head -n 40 /tmp/cl2-help.txt - - name: Build local clusterloader2 image shell: bash run: |