Skip to content

Commit db3c0e2

Browse files
authored
Merge pull request #8133 from killianmuldoon/pr-exvars-fix-self-hosted-e2e
🌱 Remove generation check for clusterclass to fix e2e test
2 parents 3809194 + 17d0cf3 commit db3c0e2

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

internal/webhooks/cluster.go

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -534,11 +534,13 @@ func (webhook *Cluster) pollClusterClassForCluster(ctx context.Context, cluster
534534
if clusterClassGetErr = webhook.Client.Get(ctx, client.ObjectKey{Namespace: cluster.Namespace, Name: cluster.Spec.Topology.Class}, clusterClass); clusterClassGetErr != nil {
535535
return false, nil //nolint:nilerr
536536
}
537-
// Return an error if the ClusterClass has not successfully reconciled either because variables aren't correctly
538-
// reconciled or because the observed generation doesn't match the metadata generation.
537+
538+
// Return an error if the ClusterClass has not successfully reconciled because variables aren't correctly
539+
// reconciled.
540+
// TODO: Decide whether to check generation here. This requires creating templates before creating the Cluster and
541+
// may interfere with the way clusterctl move works.
539542
if !conditions.Has(clusterClass, clusterv1.ClusterClassVariablesReconciledCondition) ||
540-
conditions.IsFalse(clusterClass, clusterv1.ClusterClassVariablesReconciledCondition) ||
541-
clusterClass.GetGeneration() != clusterClass.Status.ObservedGeneration {
543+
conditions.IsFalse(clusterClass, clusterv1.ClusterClassVariablesReconciledCondition) {
542544
clusterClassGetErr = errors.New("ClusterClass is not up to date. If this persists check ClusterClass status")
543545
return false, nil
544546
}

0 commit comments

Comments
 (0)