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

Add support for Operator Autopilot API #206

Closed
rhughes1 opened this issue Apr 19, 2020 · 5 comments
Closed

Add support for Operator Autopilot API #206

rhughes1 opened this issue Apr 19, 2020 · 5 comments

Comments

@rhughes1
Copy link
Contributor

I've been trying to look through the documentation to find a way to pull the health of the cluster using the Autopilot API. In particular I'm looking to see if the nodes are voters or not.

Below would be an example of getting the current Autopilot configuration:

Below would be an example of what I was thinking it would look like for getting the health, configuration and updating the configuration:

Diplomat::Autopilot.get_health()
Diplomat::Autopilot.get_configuration()
Diplomat::Autopilot.update(value)

I'm curious if there's some workaround that I'm not aware of to get the voter status in the cluster?

@pierresouchay
Copy link
Member

The API /v1/agent/members aka Diplomat::Members.get() also give you this information, with the tag nonvoter": "1",.

But if you want to do a PR to add support for Autopilot API feel free :)

@pierresouchay
Copy link
Member

@rhughes1 Did you find your way to implement what you wanted?

@rhughes1
Copy link
Contributor Author

@pierresouchay believe I did...

Although I think I could open a PR for an autopilot endpoint. My only concern is being able to make valid unit tests :s

@pierresouchay
Copy link
Member

@rhughes1 If you don't know how to add unit test, try submitting it, we will help you write the unit tests

@pierresouchay
Copy link
Member

@rhughes1 Merge upstream and released as version 2.4.0 (will be available in rubygems in a few minutes).

If you want to add support for more endpoints of Autopilot API, feel free.

Thanks a lot for your contribution!

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

No branches or pull requests

2 participants