kubernetes-retired / service-catalog

Consume services in Kubernetes using the Open Service Broker API
https://svc-cat.io
Apache License 2.0
1.05k stars 385 forks source link

Add option to display plan schemas in svcat #1720

Closed martinmaly closed 6 years ago

martinmaly commented 6 years ago

Currently it doesn't seem possible in svcat describe plan to show full detail of the plan, specifically schemas for provisioning and/or binding.

Would it be possible to add support for such detailed output?

carolynvs commented 6 years ago

@martinmaly Is that information currently returned by the service catalog api? I'm not quite familiar with what you mean by schemas.

martinmaly commented 6 years ago

I believe so; when I run kubectl get clusterserviceplans <GUID> -o yaml and the service plan contains schema (as per https://github.com/openservicebrokerapi/servicebroker/blob/v2.13/spec.md#schema-object) the kubectl will print whatever schema the broker provided.

I guess kubectl will just print the whole resource as yaml so having a full resource yaml output in svcat would suffice.

carolynvs commented 6 years ago

Nice! I didn't know about the optional schema (because OSBA doesn't return them yet).

There is definitely value in having the schema printed out by default. Would you be interested in working on that? I'd be happy to help.

Maybe something like this?

$ svcat describe plan standard100
  Name:          standard100
  Description:   Standard Tier, 100 DTUs
  UUID:          edc2badc-d93b-4d9c-9d8e-da2f1c8c3e1c
  Status:        Active
  Free:          false
  Class:         azure-mysqldb

Instances:
No instances defined

Instance Parameter Schema: (if defined)
...

Binding Parameter Schema: (if defined)
...

That said, a yaml dump flag would also be useful too. I'm just all for making the UX for svcat shine, so I'd like to see us improve the default command output as well.

kibbles-n-bytes commented 6 years ago

@carolynvs I'm happy to take a crack at this!

carolynvs commented 6 years ago

@kibbles-n-bytes Hurray!