From fe810b7da801e06f03fe1dd4d123e78d183f0941 Mon Sep 17 00:00:00 2001 From: Aleksei Sviridkin Date: Mon, 12 Oct 2026 23:17:15 +0300 Subject: [PATCH] test(e2e): read MachineDeployment readiness through the v1beta1 API The Kubernetes suite waited on status.v1beta2.readyReplicas through a bare "machinedeployment" resource name. That name resolves to the version the cluster prefers: v1beta1 under Cluster API v1.10, v1beta2 from v1.11. In v1beta2 the counter is status.readyReplicas and status.v1beta2 does not exist, so after a Cluster API upgrade the wait would run out its ten minutes and fail. The wait now names the v1beta1 resource, which carries status.v1beta2.readyReplicas on both sides of the upgrade and is served until Cluster API v1.16. Assisted-by: LLM Signed-off-by: Aleksei Sviridkin --- hack/e2e-chainsaw/_lib/run-kubernetes.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/hack/e2e-chainsaw/_lib/run-kubernetes.sh b/hack/e2e-chainsaw/_lib/run-kubernetes.sh index 14e247e13..476419fce 100644 --- a/hack/e2e-chainsaw/_lib/run-kubernetes.sh +++ b/hack/e2e-chainsaw/_lib/run-kubernetes.sh @@ -6407,7 +6407,10 @@ EOF fi # Wait for all machine deployment replicas to be ready (timeout after 10 minutes) - kubectl wait machinedeployment kubernetes-${test_name}-md0 -n tenant-test --timeout=10m --for=jsonpath='{.status.v1beta2.readyReplicas}'=2 + # Named at v1beta1: status.v1beta2.readyReplicas exists only there, and a bare + # resource name follows whichever version the cluster prefers, which is + # v1beta2 from Cluster API v1.11. v1beta1 is served until v1.16. + kubectl wait machinedeployments.v1beta1.cluster.x-k8s.io kubernetes-${test_name}-md0 -n tenant-test --timeout=10m --for=jsonpath='{.status.v1beta2.readyReplicas}'=2 for component in cilium coredns csi vsnap-crd; do kubectl wait hr "kubernetes-${test_name}-${component}" -n tenant-test --timeout=5m --for=condition=ready