Closed maleck13 closed 5 years ago
I think we will have to publish a service-catalog-client-go project with just the client so that you don't have to pull the entire project in. It's worth thinking about what strategy we should have for releasing such a library so that it will work in the same GOPATH as a contemporary client-go.
Yes a client-go would be good, I think it is an interesting question for all extension API servers. I haven't had to extract a client before, but given that there is a generated clientset, it would be nice if there were tooling (I am not aware of any) that would allow extracting the generated client into a lib as this could be used by all API servers.
I think we will have to publish a service-catalog-client-go project with just the client so that you don't have to pull the entire project in
While this has been done for the Kubernetes core server (with client-go
project), the other API servers still provide their clients as part of their server repo, for example CRD server: apiextensions-apiserver, and the usage example: https://github.com/kubernetes/apiextensions-apiserver/blob/master/examples/client-go/main.go#L26
So I don't think there is an established best practice strategy for providing Go-clients.
@pmorie , any progress on this ? I am confused how to use service-catalog
as a library.
We are currently generating the client based on the api definitions. Using the kubernetes client-gen tool
@maleck13 , any blog post or document link will help a lot. I want list down and consume services from my project. here is reference issue https://github.com/redhat-developer/odo/issues/266
@surajnarwade This may be useful https://github.com/aerogear/mobile-cli/blob/master/scripts/generate.sh
Shows how we are using the generate tool. The side effect here is it is up to us to keep the definitions upto date. Although there may be a way around that. Example usage of the client https://github.com/aerogear/mobile-cli/blob/master/pkg/cmd/services.go#L62
Would a proposal for this be a way forward? Happy to take this on
Using dep, I was able to write a third party app that used service catalog's client, and not end up pulling in all of the rest of their code too.
Gopkg.toml
[[constraint]]
name = "github.com/kubernetes-incubator/service-catalog"
version = "v0.1.18"
[prune]
non-go = true
go-tests = true
unused-packages = true
It works just like the regular k8s client. I'd like to see this better documented but I don't believe we need a proposal or anything. @maleck13 Would you be interested in writing a new page for our docs that explains how to import, initialize and use the client? I have examples if you think that would help.
@carolynvs awesome this is great. I would be happy to contribute a docs update for this!
@maleck13 Sweet! Let me know if you have any questions, otherwise feel free to open a WIP PR and we can collaborate there. Or ping me on the k8s slack if that helps.
Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale
.
Stale issues rot after an additional 30d of inactivity and eventually close.
If this issue is safe to close now please do so with /close
.
Send feedback to sig-testing, kubernetes/test-infra and/or fejta. /lifecycle stale
Stale issues rot after 30d of inactivity.
Mark the issue as fresh with /remove-lifecycle rotten
.
Rotten issues close after an additional 30d of inactivity.
If this issue is safe to close now please do so with /close
.
Send feedback to sig-testing, kubernetes/test-infra and/or fejta. /lifecycle rotten
Rotten issues close after 30d of inactivity.
Reopen the issue with /reopen
.
Mark the issue as fresh with /remove-lifecycle rotten
.
Send feedback to sig-testing, kubernetes/test-infra and/or fejta. /close
@fejta-bot: Closing this issue.
When writing applications that interact with the kubernetes API we have the client-go. I am wondering what is the plan with api extensions such as the service catalog? If I wanted to interact with the service catalog API what would be the best way to do this currently?Can I consume the client package in this repo independently?