tczekajlo / kube-consul-register

a tool to register Kubernetes PODs as Consul Services
Apache License 2.0
105 stars 50 forks source link

Issue during dependency installation phase #6

Closed psyhomb closed 7 years ago

psyhomb commented 7 years ago

I'm encountering an issue every time I try to resolve dependencies, it looks like some paths are changed. For example meta is not on this path anymore https://github.com/kubernetes/client-go/tree/master/pkg/apis

package k8s.io/client-go/pkg/apis/meta/v1: cannot find package "k8s.io/client-go/pkg/apis/meta/v1" in any of:
    /usr/local/go/src/k8s.io/client-go/pkg/apis/meta/v1 (from $GOROOT)
    /root/dev/src/k8s.io/client-go/pkg/apis/meta/v1 (from $GOPATH)
package k8s.io/client-go/pkg/fields: cannot find package "k8s.io/client-go/pkg/fields" in any of:
    /usr/local/go/src/k8s.io/client-go/pkg/fields (from $GOROOT)
    /root/dev/src/k8s.io/client-go/pkg/fields (from $GOPATH)
package k8s.io/client-go/pkg/types: cannot find package "k8s.io/client-go/pkg/types" in any of:
    /usr/local/go/src/k8s.io/client-go/pkg/types (from $GOROOT)
    /root/dev/src/k8s.io/client-go/pkg/types (from $GOPATH)

Do you encounter the same problem during dependency installation phase?

tczekajlo commented 7 years ago

Hi, I've no any an issue with dependency. Together with PR https://github.com/tczekajlo/kube-consul-register/pull/5 I added vendor directory with all dependencies or you can create own vendor directory by make vendor command (you need glide tool in order to install dependencies). Please use dependencies from vendor directory.

psyhomb commented 7 years ago

I tried glide pkg mgr but I encountered similar issue

# github.com/tczekajlo/kube-consul-register/config
/root/dev/src/github.com/tczekajlo/kube-consul-register/config/config.go:60: cannot use "k8s.io/client-go/pkg/apis/meta/v1".GetOptions literal (type "k8s.io/client-go/pkg/apis/meta/v1".GetOptions) as type "k8s.io/apimachinery/pkg/apis/meta/v1".GetOptions in argument to clientset.Core().ConfigMaps(namespace).Get

But after you added vendor dir I managed to compile it without any issues