Skip to content

Commit

Permalink
Merge pull request #8133 from killianmuldoon/pr-exvars-fix-self-hoste…
Browse files Browse the repository at this point in the history
…d-e2e

🌱 Remove generation check for clusterclass to fix e2e test
  • Loading branch information
k8s-ci-robot authored Feb 20, 2023
2 parents 3809194 + 17d0cf3 commit db3c0e2
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions internal/webhooks/cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -534,11 +534,13 @@ func (webhook *Cluster) pollClusterClassForCluster(ctx context.Context, cluster
if clusterClassGetErr = webhook.Client.Get(ctx, client.ObjectKey{Namespace: cluster.Namespace, Name: cluster.Spec.Topology.Class}, clusterClass); clusterClassGetErr != nil {
return false, nil //nolint:nilerr
}
// Return an error if the ClusterClass has not successfully reconciled either because variables aren't correctly
// reconciled or because the observed generation doesn't match the metadata generation.

// Return an error if the ClusterClass has not successfully reconciled because variables aren't correctly
// reconciled.
// TODO: Decide whether to check generation here. This requires creating templates before creating the Cluster and
// may interfere with the way clusterctl move works.
if !conditions.Has(clusterClass, clusterv1.ClusterClassVariablesReconciledCondition) ||
conditions.IsFalse(clusterClass, clusterv1.ClusterClassVariablesReconciledCondition) ||
clusterClass.GetGeneration() != clusterClass.Status.ObservedGeneration {
conditions.IsFalse(clusterClass, clusterv1.ClusterClassVariablesReconciledCondition) {
clusterClassGetErr = errors.New("ClusterClass is not up to date. If this persists check ClusterClass status")
return false, nil
}
Expand Down

0 comments on commit db3c0e2

Please sign in to comment.