-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
kops validate cluster can output YAML or JSON #4107
Conversation
Adding the capbility for kops validate cluster command to output YAML or JSON. The validate.ValidationCluster struct is used as body of the JSON or YAML document.
d5aaeb1
to
ab4058d
Compare
@@ -88,7 +97,9 @@ func RunValidateCluster(f *util.Factory, cmd *cobra.Command, args []string, out | |||
return fmt.Errorf("cannot get InstanceGroups for %q: %v", cluster.ObjectMeta.Name, err) | |||
} | |||
|
|||
fmt.Fprintf(out, "Validating cluster %v\n\n", cluster.ObjectMeta.Name) | |||
if options.output == OutputTable { |
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.
Since this is specific to the OutputTable, does it make sense to move it to its case section of the switch below?
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.
Yes!
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.
Well I would have to add it in two places ;(
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.
yep I see what you mean.
lgtm |
btw ... it is |
/assign @KashifSaadat @andrewsykim @geojaz Whoever gets to it first wins a cookie :) |
Tested out, nice work! Where's my cookie? :P |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: KashifSaadat The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these OWNERS Files:
You can indicate your approval by writing |
Adding the capability for kops validate cluster command to output YAML or JSON.
The validate.ValidationCluster struct is used as body of the JSON or
YAML document.
Outputting the list of the node API objects is a bunch of data, but we already have it, and I think
it is useful. It is the same data as
kubectl get no -oyaml
. That is the only question I have on this PR if we output that data.Closes #3539
TODO
/assign @robinpercy @robertojrojas
If I can get a PR review that would be awesome.