@@ -121,24 +121,37 @@ else
121121 " ${KOPS_B} " edit cluster " ${CLUSTER_NAME} " " --set=cluster.spec.kubernetesVersion=${K8S_VERSION_B} "
122122fi
123123
124- " ${KOPS_B} " update cluster
125- " ${KOPS_B} " update cluster --admin --yes
126- # Verify no additional changes
127- " ${KOPS_B} " update cluster
124+ if [[ " ${KOPS_VERSION_B} " =~ 1.(20| 21| 22| 23| 24| 25| 26| 27| 28| 29| 30). ]]; then
125+ # kOps introduced the reconcile command in 1.31
126+ # TODO: remove this block once we stop testing upgrades to kops <1.31
127+ " ${KOPS_B} " update cluster
128+ " ${KOPS_B} " update cluster --admin --yes
129+ # Verify no additional changes
130+ " ${KOPS_B} " update cluster
128131
129- # Verify kubeconfig-a still works
130- kubectl get nodes -owide --kubeconfig " ${KUBECONFIG_A} "
132+ # Verify kubeconfig-a still works
133+ kubectl get nodes -owide --kubeconfig " ${KUBECONFIG_A} "
134+
135+ # Sleep to ensure channels has done its thing
136+ sleep 120s
131137
132- # Sleep to ensure channels has done its thing
133- sleep 120s
138+ # Make sure configuration B has been applied (e.g. new load balancer is ready)
139+ " ${KOPS_B} " validate cluster --wait=10m
134140
135- # Make sure configuration B has been applied (e.g. new load balancer is ready)
136- " ${KOPS_B} " validate cluster --wait=10m
141+ ${CHANNELS} apply channel " $KOPS_STATE_STORE " /" ${CLUSTER_NAME} " /addons/bootstrap-channel.yaml --yes -v4
137142
138- ${CHANNELS} apply channel " $KOPS_STATE_STORE " /" ${CLUSTER_NAME} " /addons/bootstrap-channel.yaml --yes -v4
143+ " ${KOPS_B} " rolling-update cluster
144+ " ${KOPS_B} " rolling-update cluster --yes --validation-timeout 30m
145+ else
146+ # Preview changes
147+ " ${KOPS_B} " reconcile cluster
139148
140- " ${KOPS_B} " rolling-update cluster
141- " ${KOPS_B} " rolling-update cluster --yes --validation-timeout 30m
149+ # Apply changes
150+ " ${KOPS_B} " reconcile cluster --yes
151+
152+ # Verify no additional changes
153+ " ${KOPS_B} " update cluster
154+ fi
142155
143156" ${KOPS_B} " validate cluster
144157
0 commit comments