-
Notifications
You must be signed in to change notification settings - Fork 448
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
Support JSON output in stolonctl status #628
Conversation
Thanks! And apologies, missed that issue! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@hmac Just a small issue with cluster.Available value. It looks good to me after that change (please squash your future changes in a single commit). Thanks!
} else { | ||
stdout("Master Keeper: (none)") | ||
} | ||
master := cd.Cluster.Status.Master |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cluster.Available should be set to true here or it'll always be false
@sgotti thanks for the review and bug spot! I've updated this and it looks like CI has passed now. |
@hmac Thanks! Merging. |
This change allows you to pass a
--format
flag tostolonctl status
to specify the output format. The available options aretext
(the current output format) andjson
, which produces the same data but in a structured format. The idea is that you can build automation around this information without relying on the semi-structured human-readable format.