Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

propagate current redis cluster state to redisfailver crd #667

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

romanfurst
Copy link

@romanfurst romanfurst commented Oct 6, 2023

Current implementation

If Redisfailover cluster is not in healthy/ready state the state is not propagated. Therefore there is no way how to propagate the redis status to the user.

Showcase from ArgoCD where rfr POD is not running but redisfailover crd is in healthy state. Broken redisfailover cluster is not propagated:

Screenshot 2023-10-06 at 13 48 38



Propose implementation

Add 'status' section in RedisFailover CRD. If Redisfailover cluster in not in OK state, the redisfailover crd status is updated. Therefore it is possible to make healthcheck above whole Redisfailover cluster.
E.g. in ArgoCD the custome health check might look like this:

    databases.spotahome.com/RedisFailover:
      health.lua: |
        hs = {}
        if obj.status ~= nil and obj.status.state == "NotHealthy" then
          hs.status = "Degraded"
          hs.message = obj.status.message
          return hs
        end
        hs.status = "Healthy"
        hs.message = ""Redisfailover cluster is healthy""
        return hs

as shown in following printscreen, if redisfailover is broken whole crd resource and application is mark as unhealthy

Screenshot 2023-10-06 at 11 59 26

image

@romanfurst romanfurst requested a review from a team as a code owner October 6, 2023 12:18
@romanfurst romanfurst force-pushed the crd-status branch 3 times, most recently from dc1f728 to 396a348 Compare October 6, 2023 17:29
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.

None yet

1 participant