From 00809a6e6f5613f96c8a2b9116454196cbcf2303 Mon Sep 17 00:00:00 2001
From: willie-yao <williamyao@microsoft.com>
Date: Wed, 29 Jan 2025 00:17:39 +0000
Subject: [PATCH] Update provider metadata and upgrade test versions post v1.18
 release

---
 test/e2e/config/azure-dev.yaml                | 22 +++++++++----------
 ...emplate-prow-machine-and-machine-pool.yaml |  0
 .../cluster-template-prow.yaml                |  0
 ...emplate-prow-machine-and-machine-pool.yaml |  0
 .../cluster-template-prow.yaml                |  0
 .../shared/v1beta1_provider/metadata.yaml     |  3 +++
 6 files changed, 14 insertions(+), 11 deletions(-)
 rename test/e2e/data/infrastructure-azure/{v1.16.3 => v1.17.3}/cluster-template-prow-machine-and-machine-pool.yaml (100%)
 rename test/e2e/data/infrastructure-azure/{v1.16.3 => v1.17.3}/cluster-template-prow.yaml (100%)
 rename test/e2e/data/infrastructure-azure/{v1.17.1 => v1.18.0}/cluster-template-prow-machine-and-machine-pool.yaml (100%)
 rename test/e2e/data/infrastructure-azure/{v1.17.1 => v1.18.0}/cluster-template-prow.yaml (100%)

diff --git a/test/e2e/config/azure-dev.yaml b/test/e2e/config/azure-dev.yaml
index 515dda22592..b76ddef3815 100644
--- a/test/e2e/config/azure-dev.yaml
+++ b/test/e2e/config/azure-dev.yaml
@@ -83,33 +83,33 @@ providers:
   - name: azure
     type: InfrastructureProvider
     versions:
-    - name: v1.16.3 # latest patch of earliest minor in supported v1beta1 releases; this is used for v1beta1 old --> v1beta1 latest clusterctl upgrades test only.
-      value: https://github.com/kubernetes-sigs/cluster-api-provider-azure/releases/download/v1.16.3/infrastructure-components.yaml
+    - name: v1.17.3 # latest patch of earliest minor in supported v1beta1 releases; this is used for v1beta1 old --> v1beta1 latest clusterctl upgrades test only.
+      value: https://github.com/kubernetes-sigs/cluster-api-provider-azure/releases/download/v1.17.3/infrastructure-components.yaml
       type: url
       contract: v1beta1
       files:
       - sourcePath: "../data/shared/v1beta1_provider/metadata.yaml"
-      - sourcePath: "../data/infrastructure-azure/v1.16.3/cluster-template-prow.yaml"
+      - sourcePath: "../data/infrastructure-azure/v1.17.3/cluster-template-prow.yaml"
         targetName: "cluster-template.yaml"
-      - sourcePath: "../data/infrastructure-azure/v1.16.3/cluster-template-prow-machine-and-machine-pool.yaml"
+      - sourcePath: "../data/infrastructure-azure/v1.17.3/cluster-template-prow-machine-and-machine-pool.yaml"
         targetName: "cluster-template-machine-and-machine-pool.yaml"
       replacements:
       - old: "imagePullPolicy: Always"
         new: "imagePullPolicy: IfNotPresent"
-    - name: v1.17.1 # latest patch of latest minor in supported v1beta1 releases; this is used for v1beta1 latest --> v1beta1 current clusterctl upgrades test only.
-      value: https://github.com/kubernetes-sigs/cluster-api-provider-azure/releases/download/v1.17.1/infrastructure-components.yaml
+    - name: v1.18.0 # latest patch of latest minor in supported v1beta1 releases; this is used for v1beta1 latest --> v1beta1 current clusterctl upgrades test only.
+      value: https://github.com/kubernetes-sigs/cluster-api-provider-azure/releases/download/v1.18.0/infrastructure-components.yaml
       type: url
       contract: v1beta1
       files:
       - sourcePath: "../data/shared/v1beta1_provider/metadata.yaml"
-      - sourcePath: "../data/infrastructure-azure/v1.17.1/cluster-template-prow.yaml"
+      - sourcePath: "../data/infrastructure-azure/v1.18.0/cluster-template-prow.yaml"
         targetName: "cluster-template.yaml"
-      - sourcePath: "../data/infrastructure-azure/v1.17.1/cluster-template-prow-machine-and-machine-pool.yaml"
+      - sourcePath: "../data/infrastructure-azure/v1.18.0/cluster-template-prow-machine-and-machine-pool.yaml"
         targetName: "cluster-template-machine-and-machine-pool.yaml"
       replacements:
       - old: "imagePullPolicy: Always"
         new: "imagePullPolicy: IfNotPresent"
-    - name: v1.18.99 # "vNext"; use manifests from local source files
+    - name: v1.19.99 # "vNext"; use manifests from local source files
       value: "${PWD}/config/default"
       contract: v1beta1
       files:
@@ -236,8 +236,8 @@ variables:
   AZURE_CNI_V1_MANIFEST_PATH: "${PWD}/templates/addons/azure-cni-v1.yaml"
   OLD_CAPI_UPGRADE_VERSION: "v1.8.9"
   LATEST_CAPI_UPGRADE_VERSION: "v1.9.4"
-  OLD_PROVIDER_UPGRADE_VERSION: "v1.16.3"
-  LATEST_PROVIDER_UPGRADE_VERSION: "v1.17.1"
+  OLD_PROVIDER_UPGRADE_VERSION: "v1.17.3"
+  LATEST_PROVIDER_UPGRADE_VERSION: "v1.18.0"
   OLD_CAAPH_UPGRADE_VERSION: "v0.1.0-alpha.10"
   LATEST_CAAPH_UPGRADE_VERSION: "v0.2.5"
   CI_RG: capz-ci
diff --git a/test/e2e/data/infrastructure-azure/v1.16.3/cluster-template-prow-machine-and-machine-pool.yaml b/test/e2e/data/infrastructure-azure/v1.17.3/cluster-template-prow-machine-and-machine-pool.yaml
similarity index 100%
rename from test/e2e/data/infrastructure-azure/v1.16.3/cluster-template-prow-machine-and-machine-pool.yaml
rename to test/e2e/data/infrastructure-azure/v1.17.3/cluster-template-prow-machine-and-machine-pool.yaml
diff --git a/test/e2e/data/infrastructure-azure/v1.16.3/cluster-template-prow.yaml b/test/e2e/data/infrastructure-azure/v1.17.3/cluster-template-prow.yaml
similarity index 100%
rename from test/e2e/data/infrastructure-azure/v1.16.3/cluster-template-prow.yaml
rename to test/e2e/data/infrastructure-azure/v1.17.3/cluster-template-prow.yaml
diff --git a/test/e2e/data/infrastructure-azure/v1.17.1/cluster-template-prow-machine-and-machine-pool.yaml b/test/e2e/data/infrastructure-azure/v1.18.0/cluster-template-prow-machine-and-machine-pool.yaml
similarity index 100%
rename from test/e2e/data/infrastructure-azure/v1.17.1/cluster-template-prow-machine-and-machine-pool.yaml
rename to test/e2e/data/infrastructure-azure/v1.18.0/cluster-template-prow-machine-and-machine-pool.yaml
diff --git a/test/e2e/data/infrastructure-azure/v1.17.1/cluster-template-prow.yaml b/test/e2e/data/infrastructure-azure/v1.18.0/cluster-template-prow.yaml
similarity index 100%
rename from test/e2e/data/infrastructure-azure/v1.17.1/cluster-template-prow.yaml
rename to test/e2e/data/infrastructure-azure/v1.18.0/cluster-template-prow.yaml
diff --git a/test/e2e/data/shared/v1beta1_provider/metadata.yaml b/test/e2e/data/shared/v1beta1_provider/metadata.yaml
index 9adce4ac62d..22487154ad8 100644
--- a/test/e2e/data/shared/v1beta1_provider/metadata.yaml
+++ b/test/e2e/data/shared/v1beta1_provider/metadata.yaml
@@ -31,3 +31,6 @@ releaseSeries:
   - major: 1
     minor: 18
     contract: v1beta1
+  - major: 1
+    minor: 19
+    contract: v1beta1