Skip to content

show error when cluster is not found in namespace#239

Closed
boddumanohar wants to merge 1 commit into
mainfrom
show-error-when-cluster-not-found-in-ns
Closed

show error when cluster is not found in namespace#239
boddumanohar wants to merge 1 commit into
mainfrom
show-error-when-cluster-not-found-in-ns

Conversation

@boddumanohar

@boddumanohar boddumanohar commented Jun 11, 2026

Copy link
Copy Markdown
Member

Background

Originally this PR set out to fix a confusing reconcile loop when a Pool is applied in a
namespace that doesn't contain its StorageCluster:

2026-06-11T10:58:02Z    INFO    Cluster UUID not ready yet, requeuing    {"controller": "pool", ...
"Pool": {"name":"pool1","namespace":"simplyblock"}, ...}

A Pool can only be reconciled in the same namespace as its StorageCluster; this case wasn't
surfaced as a clear error on the CR, so it just looked like the cluster was slow to come up.

Current state

While rebasing, that underlying bug was found to already be fixed on main (via #349/related
work): ResolveClusterUUID now returns a dedicated ErrClusterNotFound sentinel, and the pool
controller's Reconcile distinguishes it from a not-yet-ready UUID — setting
Pool.Status.Status = "InvalidClusterReference", emitting a Warning event, and requeuing at a
slower interval, instead of looping silently.

This PR is now scoped down to what's left on top of that: adding a generic Conditions []metav1.Condition field (with a ConditionTypePoolReady constant) to Pool.Status, matching
the condition pattern already used elsewhere (e.g. SnapshotReplication), so future pool
reconcile states can be surfaced via kubectl describe in a standard way. CRD manifests are
regenerated and synced to helm-charts accordingly.

No controller logic changes in this PR — the existing InvalidClusterReference handling on
main is left as-is.

@boddumanohar
boddumanohar force-pushed the show-error-when-cluster-not-found-in-ns branch from 9a3361f to 173b8bb Compare July 24, 2026 13:55
@boddumanohar

Copy link
Copy Markdown
Member Author

we already have InvalidClusterReference as a Status. done as apart of #233

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant