fix: set Healthy/Ready to Unknown if pods are running, but can't operator can't connect server#186
Merged
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
Adjusts ClickHouseCluster condition reporting so the operator doesn’t incorrectly mark clusters as unhealthy/not-ready when ClickHouse pods are running but the operator cannot probe them (e.g., version probe pending or required secret missing), by reporting Unknown instead.
Changes:
- Update replica condition evaluation to set
HealthyandReadytoUnknownwhencommanderis not initialized. - Update controller tests to assert
ClusterNotReadyevents only after prerequisites are met and readiness can be evaluated.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| internal/controller/clickhouse/sync.go | Sets Healthy/Ready to Unknown when probing is impossible due to missing commander. |
| internal/controller/clickhouse/controller_test.go | Reorders/updates event assertions to match the new condition transition behavior. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…ator can't connect server
46f4cda to
1cb2724
Compare
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.
Why
If the version probe job is not ready or the external secret is missing, but server pods are running.
The operator can't connect the nodes and wrongly reports it as not healthy.
What
Set relevant conditions to the unknown in this case