mirror of
https://github.com/cozystack/cozystack.git
synced 2026-11-30 04:06:34 +09:00
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 <f@lex.la>
This commit is contained in:
1 file changed
+4
-1
@@ -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
|
||||
|
||||
Reference in new issue
Block a user