feat(multigrescluster): track sticky InitializedAt on first Healthy phase - #662
Open
niconosenzo wants to merge 1 commit into
Open
niconosenzo wants to merge 1 commit into
niconosenzo wants to merge 1 commit into
Conversation
niconosenzo
force-pushed
the
add-cluster-initialized-at
branch
from
September 18, 2026 06:16
3f9405b to
667c531
Compare
…hase Adds status.InitializedAt, set once when a cluster first reaches PhaseHealthy and never cleared on later Degraded transitions. Exposes it as an `initialized` label on multigres_operator_cluster_info so alerting can distinguish first-time bootstrap from a real incident on an established cluster. Signed-off-by: Nicolas Nosenzo <niconosenzo@gmail.com>
niconosenzo
force-pushed
the
add-cluster-initialized-at
branch
from
September 18, 2026 06:20
667c531 to
15c9a43
Compare
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
🔬 Go Test Coverage ReportSummary
Status✅ PASS DetailShow New Coverage |
Verolop
reviewed
Sep 18, 2026
| cluster.Status.Message = "Cluster is progressing" | ||
| } | ||
|
|
||
| if cluster.Status.Phase == multigresv1alpha1.PhaseHealthy && |
Contributor
There was a problem hiding this comment.
Can you please check that the expected children exist and are healthy before setting this? The phase calculation treats empty child lists as Healthy, so if the cache hasn’t caught up yet, a cluster initialized before anything is ready can be marked as Healthy
Contributor
Author
There was a problem hiding this comment.
Good catch, Should we change that and treat them as "progressing" ? The way I see it, if "Healthy" child doesn't mean really healthy, we will have to add safeguards on other places where we depend on that phase, correct?
Contributor
There was a problem hiding this comment.
yeah, agreed! Let’s keep it Progressing until all expected children are present and healthy. Let's also check for missing children too.
Verolop
approved these changes
Sep 18, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Adds status.InitializedAt, set once when a cluster first reaches PhaseHealthy and never cleared on later Degraded transitions. Exposes it as an
initializedlabel on multigres_operator_cluster_info so alerting can distinguish first-time bootstrap from a real incident on an established cluster.Summary of changes
MultigresClusterStatus.InitializedAt *metav1.Timefield, set once, sticky (first time phase reaches Healthy, never cleared).status.go: sets it right after phase computation, before the server-side patch.multigres_operator_cluster_infogauge: new initialized label ("true"|"false"), SetClusterInfo signature updated, controller call site updated.pkg/monitoring/doc.goexample + tests updated for the new signature.TestUpdateStatus_InitializedAtStickyproving it survives a later Degraded transition.