From f61509cb4b6ab9b580b22d832718830e6d64b774 Mon Sep 17 00:00:00 2001 From: Angelos Kolaitis Date: Tue, 12 Mar 2024 20:52:14 +0200 Subject: [PATCH] CP is Ready if no nodes are Ready --- controllers/status.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/controllers/status.go b/controllers/status.go index 325e64a..d89ece1 100644 --- a/controllers/status.go +++ b/controllers/status.go @@ -94,13 +94,12 @@ func (r *MicroK8sControlPlaneReconciler) updateStatus(ctx context.Context, mcp * if len(nodes.Items) > 0 { mcp.Status.Initialized = true conditions.MarkTrue(mcp, clusterv1beta1.AvailableCondition) - } - if mcp.Status.ReadyReplicas > 0 { + // The control plane is Ready to receive requests mcp.Status.Ready = true } - logger.WithValues("count", mcp.Status.ReadyReplicas).Info("ready replicas") + logger.WithValues("ready", mcp.Status.Ready, "count", mcp.Status.ReadyReplicas).Info("ready replicas") return nil }