Skip to content

Commit

Permalink
work around CC self-hosted issue
Browse files Browse the repository at this point in the history
  • Loading branch information
sbueringer committed Feb 18, 2023
1 parent 995a400 commit 8ce0ae6
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions internal/webhooks/cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -537,8 +537,18 @@ func (webhook *Cluster) pollClusterClassForCluster(ctx context.Context, cluster
// 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.
if !conditions.Has(clusterClass, clusterv1.ClusterClassVariablesReconciledCondition) ||
conditions.IsFalse(clusterClass, clusterv1.ClusterClassVariablesReconciledCondition) ||
clusterClass.GetGeneration() != clusterClass.Status.ObservedGeneration {
conditions.IsFalse(clusterClass, clusterv1.ClusterClassVariablesReconciledCondition) {
//clusterClass.GetGeneration() != clusterClass.Status.ObservedGeneration {
// FIXME: We have two issues in clusterctl move: (cmd/clusterctl/client/cluster/mover.go)
// 1. We create the ClusterClass and not the referenced templates (in the first moveSequence.group)
// => Variable Discovery works, reconcileExternalReferences fails (huge log, nothing in conditions)
// => because of that VariablesReconciled is true, but observedGeneration is not set
// => In the second moveSequence.group we are trying to deploy the Cluster, which fails because
// variable defaulting fails, because observedGeneration has not been set
// 2. We are trying to pause / unpause the ClusterClass in mover.go. But it doesn't work,
// so it doesn't lead to issues right now. The problem is that we are comparing the same annotations
// map in mover.go:653 (also affects unpause).
// If the ClusterClass would actually be paused, the variables would not be reconciled at all.
clusterClassGetErr = errors.New("ClusterClass is not up to date. If this persists check ClusterClass status")
return false, nil
}
Expand Down

0 comments on commit 8ce0ae6

Please sign in to comment.