From c5908c684b6c5490dc68fd60b66e17ceeb8dc81e Mon Sep 17 00:00:00 2001 From: killianmuldoon Date: Tue, 12 Sep 2023 10:47:08 +0100 Subject: [PATCH] Improve message for TopologyReconciledCondition Signed-off-by: killianmuldoon --- internal/controllers/topology/cluster/conditions.go | 3 ++- internal/controllers/topology/cluster/conditions_test.go | 9 +++++---- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/internal/controllers/topology/cluster/conditions.go b/internal/controllers/topology/cluster/conditions.go index ed0140ed66d6..0045d8dbed96 100644 --- a/internal/controllers/topology/cluster/conditions.go +++ b/internal/controllers/topology/cluster/conditions.go @@ -83,7 +83,8 @@ func (r *Reconciler) reconcileTopologyReconciledCondition(s *scope.Scope, cluste clusterv1.TopologyReconciledCondition, clusterv1.TopologyReconciledClusterClassNotReconciledReason, clusterv1.ConditionSeverityInfo, - "ClusterClass not reconciled. If this condition persists please check ClusterClass status.", + "ClusterClass not reconciled. If this condition persists please check ClusterClass status. A ClusterClass is reconciled if"+ + ".status.observedGeneration == .metadata.generation is true. If this is not the case either ClusterClass reconciliation failed or the ClusterClass is paused", ), ) return nil diff --git a/internal/controllers/topology/cluster/conditions_test.go b/internal/controllers/topology/cluster/conditions_test.go index d2b21aa3af55..9113f549749e 100644 --- a/internal/controllers/topology/cluster/conditions_test.go +++ b/internal/controllers/topology/cluster/conditions_test.go @@ -76,10 +76,11 @@ func TestReconcileTopologyReconciledCondition(t *testing.T) { }, }, }, - wantConditionStatus: corev1.ConditionFalse, - wantConditionReason: clusterv1.TopologyReconciledClusterClassNotReconciledReason, - wantConditionMessage: "ClusterClass not reconciled. If this condition persists please check ClusterClass status.", - wantErr: false, + wantConditionStatus: corev1.ConditionFalse, + wantConditionReason: clusterv1.TopologyReconciledClusterClassNotReconciledReason, + wantConditionMessage: "ClusterClass not reconciled. If this condition persists please check ClusterClass status. A ClusterClass is reconciled if" + + ".status.observedGeneration == .metadata.generation is true. If this is not the case either ClusterClass reconciliation failed or the ClusterClass is paused", + wantErr: false, }, { name: "should set the condition to false if the there is a blocking hook",