Openshift GoLang Client cant be used from outside. Even If I want to use openshift vendor folder still fails due compile errors.
1.3+
package main
import (
"github.com/openshift/origin/pkg/client"
"k8s.io/kubernetes/pkg/client/restclient"
)
func main() {
config := &restclient.Config{
Host: "localhost:8443",
Username: "admin",
Password: "admin",
Insecure: true,
}
client.New(&config)
}
cannot use &config (type **"k8s.io/kubernetes/pkg/client/restclient".Config) as type *"github.com/openshift/origin/vendor/k8s.io/kubernetes/pkg/client/restclient".Config in argument to client.New
Success
http://stackoverflow.com/questions/39519965/use-vendor-from-other-project
https://lists.openshift.redhat.com/openshift-archives/dev/2016-June/msg00079.html
Ping:
@smarterclayton @jim-minter,
Clayton, any news on "unversioned" client?
The near term plan is going to be expose openshift/client-go like Kubernetes exposes k8s.io/client-go. We are still waiting for that to be complete upstream before we switch though.
How far is "near term"? and do you have any work started in any sub-repo already?
We already have a RFE and a backlog story to track this, @smarterclayton can we close this one?
The goal would be to do it within the month.
On Mon, Sep 19, 2016 at 2:08 PM, Fabiano Franz [email protected]
wrote:
We already have a RFE and a backlog story https://trello.com/c/PTDrY0GF
to track this, @smarterclayton https://github.com/smarterclayton can we
close this one?—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/openshift/origin/issues/10967#issuecomment-248073077,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ABG_pzkRqlcRXPhOUodD3JtOz56XI-Bpks5qrs-agaJpZM4J_UX7
.
Ok, thanks. Marking in my calendar to check this one in one month :)
@smarterclayton gentle reminder? Will we have something untill end of the month? We are working on AVI network integration for DNS + Virtual services. And now either we go for Java or Go :) and I want Go :)
We don't have any problem with using the existing go client outside of OpenShift - we use this in a number of utilities. For example, see https://github.com/fabric8io/exposecontroller/blob/master/exposecontroller.go#L49-L57 for the Kubernetes client & REST config creation & https://github.com/fabric8io/exposecontroller/blob/master/exposestrategy/strategy.go#L51-L55 for the creation of the OpenShift client from the specified REST config.
This works both in & out of cluster, using the standard rules for config file discovery (both user & service account).
Thanks! You just planned by weekend!
This has been moved to Trello for release tracking purposes: https://trello.com/c/PTDrY0GF/794-13-client-provide-go-client-similar-to-kubernetes