Skip to content

Commit d467f95

Browse files
authored
Merge pull request #12546 from fabriziopandini/add-resourceversion-check-to-clusterctl-upgrade
🌱 Add resource version check to clusterctl upgrade tests
2 parents ead3737 + efac4a7 commit d467f95

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

test/e2e/clusterctl_upgrade.go

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ import (
4747

4848
clusterv1beta1 "sigs.k8s.io/cluster-api/api/core/v1beta1"
4949
clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2"
50+
clusterctlcluster "sigs.k8s.io/cluster-api/cmd/clusterctl/client/cluster"
5051
"sigs.k8s.io/cluster-api/cmd/clusterctl/client/config"
5152
"sigs.k8s.io/cluster-api/controllers/external"
5253
"sigs.k8s.io/cluster-api/test/e2e/internal/log"
@@ -726,6 +727,13 @@ func ClusterctlUpgradeSpec(ctx context.Context, inputGetter func() ClusterctlUpg
726727
verifyV1Beta2ConditionsTrueV1Beta1(ctx, managementClusterProxy.GetClient(), workloadCluster.Name, workloadCluster.Namespace,
727728
[]string{clusterv1.AvailableCondition, clusterv1.ReadyCondition})
728729

730+
// If this is the last step of the upgrade sequence check hat the resourceVersions are stable, i.e. it verifies there are no
731+
// continuous reconciles when everything should be stable.
732+
if i == len(input.Upgrades)-1 {
733+
By("Checking that resourceVersions are stable")
734+
framework.ValidateResourceVersionStable(ctx, managementClusterProxy, workloadCluster.Namespace, clusterctlcluster.FilterClusterObjectsWithNameFilter(workloadCluster.Name))
735+
}
736+
729737
// Note: It is a known issue on Kubernetes < v1.29 that SSA sometimes fail:
730738
// https://github.com/kubernetes/kubernetes/issues/117356
731739
tries := 1

0 commit comments

Comments
 (0)