Skip to content
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

Errors while compiling #4

Open
fiunchinho opened this issue Aug 30, 2017 · 9 comments
Open

Errors while compiling #4

fiunchinho opened this issue Aug 30, 2017 · 9 comments

Comments

@fiunchinho
Copy link

Hey Kelsey! Thanks for the example.

I'm pretty new to Golang, and I can't even compile this. I first fetch the dependencies, and then try to compile. Here are my steps

$ dep init
  Using master as constraint for direct dep k8s.io/api
  Locking in master (c0bcfdc) for direct dep k8s.io/api
  Using ^1.0.0 as constraint for direct dep github.com/ghodss/yaml
  Locking in v1.0.0 (0ca9ea5) for direct dep github.com/ghodss/yaml
  Locking in v2 (3f83fa5) for transitive dep gopkg.in/mgo.v2
  Locking in v2.6.2 (48294d9) for transitive dep github.com/docker/distribution
  Locking in master (0a025b7) for transitive dep github.com/hashicorp/golang-lru
  Locking in v2 (eb3733d) for transitive dep gopkg.in/yaml.v2
  Using master as constraint for direct dep k8s.io/apimachinery
  Locking in master (dc1f89a) for direct dep k8s.io/apimachinery
  Locking in master (779f453) for transitive dep github.com/go-openapi/jsonpointer
  Locking in v0.4 (100ba4e) for transitive dep github.com/gogo/protobuf
  Locking in master (66aacef) for transitive dep golang.org/x/net
  Locking in master (18c65dd) for transitive dep golang.org/x/text
  Locking in master (610b6ca) for transitive dep github.com/go-openapi/strfmt
  Locking in master (8c0409f) for transitive dep github.com/ugorji/go
  Locking in master (23def4e) for transitive dep github.com/golang/glog
  Locking in master (24818f7) for transitive dep github.com/google/gofuzz
  Locking in master (03cfca6) for transitive dep github.com/go-openapi/errors
  Locking in v0.9.0 (3887ee9) for transitive dep gopkg.in/inf.v0
  Locking in master (36d33bf) for transitive dep github.com/go-openapi/jsonreference
  Locking in v1.1.0 (346938d) for transitive dep github.com/davecgh/go-spew
  Locking in master (a80dea3) for transitive dep github.com/go-openapi/loads
  Locking in v1.0.0 (e57e3ee) for transitive dep github.com/spf13/pflag
  Locking in master (de5bf2a) for transitive dep github.com/PuerkitoBio/urlesc
  Locking in v2.2.1 (68c9750) for transitive dep github.com/emicklei/go-restful
  Locking in master (8ed83f2) for transitive dep github.com/go-openapi/analysis
  Locking in master (d0303fe) for transitive dep github.com/mitchellh/mapstructure
  Locking in v6 (4918b99) for transitive dep github.com/asaskevich/govalidator
  Locking in master (3faa005) for transitive dep github.com/go-openapi/spec
  Locking in master (f3f9494) for transitive dep github.com/go-openapi/swag
  Locking in master (3b3bbef) for transitive dep github.com/mailru/easyjson
  Using ^4.0.0 as constraint for direct dep k8s.io/client-go
  Locking in v4.0.0 (d92e849) for direct dep k8s.io/client-go
  Locking in 1.0.1 (dcef7f5) for transitive dep github.com/emicklei/go-restful-swagger12
  Locking in master (5b9ff86) for transitive dep github.com/juju/ratelimit
  Locking in v1.1.0 (0bcb03f) for transitive dep github.com/PuerkitoBio/purell

$ GOOS=linux go build -a --ldflags '-extldflags "-static"' -tags netgo -installsuffix netgo -o envoy-initializer .
# github.com/kelseyhightower/kubernetes-initializer-tutorial/envoy-initializer/vendor/k8s.io/client-go/tools/clientcmd/api
vendor/k8s.io/client-go/tools/clientcmd/api/register.go:35:11: cannot use Config literal (type *Config) as type runtime.Object in argument to scheme.AddKnownTypes:
	*Config does not implement runtime.Object (missing DeepCopyObject method)
# github.com/kelseyhightower/kubernetes-initializer-tutorial/envoy-initializer/vendor/k8s.io/client-go/pkg/apis/admissionregistration
vendor/k8s.io/client-go/pkg/apis/admissionregistration/register.go:47:29: cannot use InitializerConfiguration literal (type *InitializerConfiguration) as type runtime.Object in argument to scheme.AddKnownTypes:
	*InitializerConfiguration does not implement runtime.Object (missing DeepCopyObject method)
vendor/k8s.io/client-go/pkg/apis/admissionregistration/register.go:48:33: cannot use InitializerConfigurationList literal (type *InitializerConfigurationList) as type runtime.Object in argument to scheme.AddKnownTypes:
	*InitializerConfigurationList does not implement runtime.Object (missing DeepCopyObject method)
vendor/k8s.io/client-go/pkg/apis/admissionregistration/register.go:49:39: cannot use ExternalAdmissionHookConfiguration literal (type *ExternalAdmissionHookConfiguration) as type runtime.Object in argument to scheme.AddKnownTypes:
	*ExternalAdmissionHookConfiguration does not implement runtime.Object (missing DeepCopyObject method)
vendor/k8s.io/client-go/pkg/apis/admissionregistration/register.go:50:43: cannot use ExternalAdmissionHookConfigurationList literal (type *ExternalAdmissionHookConfigurationList) as type runtime.Object in argument to scheme.AddKnownTypes:
	*ExternalAdmissionHookConfigurationList does not implement runtime.Object (missing DeepCopyObject method)
# github.com/kelseyhightower/kubernetes-initializer-tutorial/envoy-initializer/vendor/k8s.io/client-go/pkg/apis/authentication
vendor/k8s.io/client-go/pkg/apis/authentication/register.go:47:16: cannot use TokenReview literal (type *TokenReview) as type runtime.Object in argument to scheme.AddKnownTypes:
	*TokenReview does not implement runtime.Object (missing DeepCopyObject method)
# github.com/kelseyhightower/kubernetes-initializer-tutorial/envoy-initializer/vendor/k8s.io/client-go/pkg/apis/authorization
vendor/k8s.io/client-go/pkg/apis/authorization/register.go:47:28: cannot use SelfSubjectAccessReview literal (type *SelfSubjectAccessReview) as type runtime.Object in argument to scheme.AddKnownTypes:
	*SelfSubjectAccessReview does not implement runtime.Object (missing DeepCopyObject method)
vendor/k8s.io/client-go/pkg/apis/authorization/register.go:48:24: cannot use SubjectAccessReview literal (type *SubjectAccessReview) as type runtime.Object in argument to scheme.AddKnownTypes:
	*SubjectAccessReview does not implement runtime.Object (missing DeepCopyObject method)
vendor/k8s.io/client-go/pkg/apis/authorization/register.go:49:29: cannot use LocalSubjectAccessReview literal (type *LocalSubjectAccessReview) as type runtime.Object in argument to scheme.AddKnownTypes:
	*LocalSubjectAccessReview does not implement runtime.Object (missing DeepCopyObject method)
# github.com/kelseyhightower/kubernetes-initializer-tutorial/envoy-initializer/vendor/k8s.io/client-go/pkg/apis/policy
vendor/k8s.io/client-go/pkg/apis/policy/register.go:49:24: cannot use PodDisruptionBudget literal (type *PodDisruptionBudget) as type runtime.Object in argument to scheme.AddKnownTypes:
	*PodDisruptionBudget does not implement runtime.Object (missing DeepCopyObject method)
vendor/k8s.io/client-go/pkg/apis/policy/register.go:50:28: cannot use PodDisruptionBudgetList literal (type *PodDisruptionBudgetList) as type runtime.Object in argument to scheme.AddKnownTypes:
	*PodDisruptionBudgetList does not implement runtime.Object (missing DeepCopyObject method)
vendor/k8s.io/client-go/pkg/apis/policy/register.go:51:13: cannot use Eviction literal (type *Eviction) as type runtime.Object in argument to scheme.AddKnownTypes:
	*Eviction does not implement runtime.Object (missing DeepCopyObject method)
vendor/k8s.io/client-go/pkg/apis/policy/zz_generated.deepcopy.go:148:17: cannot use val.DeepCopy() (type *v1.Time) as type v1.Time in assignment
# github.com/kelseyhightower/kubernetes-initializer-tutorial/envoy-initializer/vendor/k8s.io/client-go/pkg/apis/certificates
vendor/k8s.io/client-go/pkg/apis/certificates/register.go:48:30: cannot use CertificateSigningRequest literal (type *CertificateSigningRequest) as type runtime.Object in argument to scheme.AddKnownTypes:
	*CertificateSigningRequest does not implement runtime.Object (missing DeepCopyObject method)
vendor/k8s.io/client-go/pkg/apis/certificates/register.go:49:34: cannot use CertificateSigningRequestList literal (type *CertificateSigningRequestList) as type runtime.Object in argument to scheme.AddKnownTypes:
	*CertificateSigningRequestList does not implement runtime.Object (missing DeepCopyObject method)
vendor/k8s.io/client-go/pkg/apis/certificates/zz_generated.deepcopy.go:73:22: cannot use in.LastUpdateTime.DeepCopy() (type *v1.Time) as type v1.Time in assignment
# github.com/kelseyhightower/kubernetes-initializer-tutorial/envoy-initializer/vendor/k8s.io/client-go/pkg/apis/storage
vendor/k8s.io/client-go/pkg/apis/storage/register.go:47:17: cannot use StorageClass literal (type *StorageClass) as type runtime.Object in argument to scheme.AddKnownTypes:
	*StorageClass does not implement runtime.Object (missing DeepCopyObject method)
vendor/k8s.io/client-go/pkg/apis/storage/register.go:48:21: cannot use StorageClassList literal (type *StorageClassList) as type runtime.Object in argument to scheme.AddKnownTypes:
	*StorageClassList does not implement runtime.Object (missing DeepCopyObject method)
# github.com/kelseyhightower/kubernetes-initializer-tutorial/envoy-initializer/vendor/k8s.io/client-go/pkg/apis/rbac
vendor/k8s.io/client-go/pkg/apis/rbac/register.go:47:9: cannot use Role literal (type *Role) as type runtime.Object in argument to scheme.AddKnownTypes:
	*Role does not implement runtime.Object (missing DeepCopyObject method)
vendor/k8s.io/client-go/pkg/apis/rbac/register.go:48:16: cannot use RoleBinding literal (type *RoleBinding) as type runtime.Object in argument to scheme.AddKnownTypes:
	*RoleBinding does not implement runtime.Object (missing DeepCopyObject method)
vendor/k8s.io/client-go/pkg/apis/rbac/register.go:49:20: cannot use RoleBindingList literal (type *RoleBindingList) as type runtime.Object in argument to scheme.AddKnownTypes:
	*RoleBindingList does not implement runtime.Object (missing DeepCopyObject method)
vendor/k8s.io/client-go/pkg/apis/rbac/register.go:50:13: cannot use RoleList literal (type *RoleList) as type runtime.Object in argument to scheme.AddKnownTypes:
	*RoleList does not implement runtime.Object (missing DeepCopyObject method)
vendor/k8s.io/client-go/pkg/apis/rbac/register.go:52:16: cannot use ClusterRole literal (type *ClusterRole) as type runtime.Object in argument to scheme.AddKnownTypes:
	*ClusterRole does not implement runtime.Object (missing DeepCopyObject method)
vendor/k8s.io/client-go/pkg/apis/rbac/register.go:53:23: cannot use ClusterRoleBinding literal (type *ClusterRoleBinding) as type runtime.Object in argument to scheme.AddKnownTypes:
	*ClusterRoleBinding does not implement runtime.Object (missing DeepCopyObject method)
vendor/k8s.io/client-go/pkg/apis/rbac/register.go:54:27: cannot use ClusterRoleBindingList literal (type *ClusterRoleBindingList) as type runtime.Object in argument to scheme.AddKnownTypes:
	*ClusterRoleBindingList does not implement runtime.Object (missing DeepCopyObject method)
vendor/k8s.io/client-go/pkg/apis/rbac/register.go:55:20: cannot use ClusterRoleList literal (type *ClusterRoleList) as type runtime.Object in argument to scheme.AddKnownTypes:
	*ClusterRoleList does not implement runtime.Object (missing DeepCopyObject method)
# github.com/kelseyhightower/kubernetes-initializer-tutorial/envoy-initializer/vendor/k8s.io/client-go/pkg/api
vendor/k8s.io/client-go/pkg/api/register.go:76:8: cannot use Pod literal (type *Pod) as type runtime.Object in argument to scheme.AddKnownTypes:
	*Pod does not implement runtime.Object (missing DeepCopyObject method)
vendor/k8s.io/client-go/pkg/api/register.go:77:12: cannot use PodList literal (type *PodList) as type runtime.Object in argument to scheme.AddKnownTypes:
	*PodList does not implement runtime.Object (missing DeepCopyObject method)
vendor/k8s.io/client-go/pkg/api/register.go:78:20: cannot use PodStatusResult literal (type *PodStatusResult) as type runtime.Object in argument to scheme.AddKnownTypes:
	*PodStatusResult does not implement runtime.Object (missing DeepCopyObject method)
vendor/k8s.io/client-go/pkg/api/register.go:79:16: cannot use PodTemplate literal (type *PodTemplate) as type runtime.Object in argument to scheme.AddKnownTypes:
	*PodTemplate does not implement runtime.Object (missing DeepCopyObject method)
vendor/k8s.io/client-go/pkg/api/register.go:80:20: cannot use PodTemplateList literal (type *PodTemplateList) as type runtime.Object in argument to scheme.AddKnownTypes:
	*PodTemplateList does not implement runtime.Object (missing DeepCopyObject method)
vendor/k8s.io/client-go/pkg/api/register.go:81:30: cannot use ReplicationControllerList literal (type *ReplicationControllerList) as type runtime.Object in argument to scheme.AddKnownTypes:
	*ReplicationControllerList does not implement runtime.Object (missing DeepCopyObject method)
vendor/k8s.io/client-go/pkg/api/register.go:82:26: cannot use ReplicationController literal (type *ReplicationController) as type runtime.Object in argument to scheme.AddKnownTypes:
	*ReplicationController does not implement runtime.Object (missing DeepCopyObject method)
vendor/k8s.io/client-go/pkg/api/register.go:83:16: cannot use ServiceList literal (type *ServiceList) as type runtime.Object in argument to scheme.AddKnownTypes:
	*ServiceList does not implement runtime.Object (missing DeepCopyObject method)
vendor/k8s.io/client-go/pkg/api/register.go:84:12: cannot use Service literal (type *Service) as type runtime.Object in argument to scheme.AddKnownTypes:
	*Service does not implement runtime.Object (missing DeepCopyObject method)
vendor/k8s.io/client-go/pkg/api/register.go:85:24: cannot use ServiceProxyOptions literal (type *ServiceProxyOptions) as type runtime.Object in argument to scheme.AddKnownTypes:
	*ServiceProxyOptions does not implement runtime.Object (missing DeepCopyObject method)
vendor/k8s.io/client-go/pkg/api/register.go:85:24: too many errors

What am I missing? Thank you!

@fiunchinho
Copy link
Author

Just for reference, this is the generated Gopkg.toml

# Gopkg.toml example
#
# Refer to https://github.com/golang/dep/blob/master/docs/Gopkg.toml.md
# for detailed Gopkg.toml documentation.
#
# required = ["github.com/user/thing/cmd/thing"]
# ignored = ["github.com/user/project/pkgX", "bitbucket.org/user/project/pkgA/pkgY"]
#
# [[constraint]]
#   name = "github.com/user/project"
#   version = "1.0.0"
#
# [[constraint]]
#   name = "github.com/user/project2"
#   branch = "dev"
#   source = "github.com/myfork/project2"
#
# [[override]]
#  name = "github.com/x/y"
#  version = "2.4.0"


[[constraint]]
  name = "github.com/ghodss/yaml"
  version = "1.0.0"

[[constraint]]
  branch = "master"
  name = "k8s.io/api"

[[constraint]]
  branch = "master"
  name = "k8s.io/apimachinery"

[[constraint]]
  name = "k8s.io/client-go"
  version = "4.0.0"

Maybe I'm getting the wrong client-go version?

@kelseyhightower
Copy link
Owner

Yeah. Getting all the deps right for the Kubernetes Go client can be challenging. I'll try to short things and out push them up so you don't have to.

@fiunchinho
Copy link
Author

Thanks

@smecsia
Copy link

smecsia commented Sep 6, 2017

@fiunchinho the following helped me:

dep ensure -add k8s.io/apimachinery@1fd2e63a9a370677308a42f24fd40c86438afddf

@sebglon
Copy link

sebglon commented Sep 6, 2017

I have the same error and @smecsia cmd solve this.

iaguis added a commit to kinvolk-archives/rktlet that referenced this issue Sep 13, 2017
It now uses:

* Kubernetes v1.7.5
* rkt v1.25.0
* go-systemd v15

I had to explicitly list some dependencies to pin them to a version

* client-go v4.0.0
* cni v0.3.0 (what rkt uses)

I also changed some depencency revisions to match what Kubernetes has.

Finally, since I was getting compilation errors similar to the ones
mentioned in
kelseyhightower/kubernetes-initializer-tutorial#4,
I set the version of k8s.io/apimachinery to like mentioned there.
@jorgesece
Copy link

jorgesece commented Sep 15, 2017

Hi there,
I think I having the same problem by using kubernetes v1.7.5.

# project/vendor/k8s.io/client-go/tools/clientcmd/api
src/project/vendor/k8s.io/client-go/tools/clientcmd/api/register.go:35:11: cannot use Config literal (type *Config) as type runtime.Object in argument to scheme.AddKnownTypes:
	*Config does not implement runtime.Object (missing DeepCopyObject method)
# project/vendor/k8s.io/client-go/pkg/api
src/project/vendor/k8s.io/client-go/pkg/api/register.go:76:8: cannot use Pod literal (type *Pod) as type runtime.Object in argument to scheme.AddKnownTypes:
	*Pod does not implement runtime.Object (missing DeepCopyObject method)
src/project/vendor/k8s.io/client-go/pkg/api/register.go:77:12: cannot use PodList literal (type *PodList) as type runtime.Object in argument to scheme.AddKnownTypes:
	*PodList does not implement runtime.Object (missing DeepCopyObject method)
src/project/vendor/k8s.io/client-go/pkg/api/register.go:78:20: cannot use PodStatusResult literal (type *PodStatusResult) as type runtime.Object in argument to scheme.AddKnownTypes:
	*PodStatusResult does not implement runtime.Object (missing DeepCopyObject method)
src/project/vendor/k8s.io/client-go/pkg/api/register.go:79:16: cannot use PodTemplate literal (type *PodTemplate) as type runtime.Object in argument to scheme.AddKnownTypes:
	*PodTemplate does not implement runtime.Object (missing DeepCopyObject method)
src/project/vendor/k8s.io/client-go/pkg/api/register.go:80:20: cannot use PodTemplateList literal (type *PodTemplateList) as type runtime.Object in argument to scheme.AddKnownTypes:
	*PodTemplateList does not implement runtime.Object (missing DeepCopyObject method)
src/project/vendor/k8s.io/client-go/pkg/api/register.go:81:30: cannot use ReplicationControllerList literal (type *ReplicationControllerList) as type runtime.Object in argument to scheme.AddKnownTypes:
	*ReplicationControllerList does not implement runtime.Object (missing DeepCopyObject method)
src/project/vendor/k8s.io/client-go/pkg/api/register.go:82:26: cannot use ReplicationController literal (type *ReplicationController) as type runtime.Object in argument to scheme.AddKnownTypes:
	*ReplicationController does not implement runtime.Object (missing DeepCopyObject method)
src/project/vendor/k8s.io/client-go/pkg/api/register.go:83:16: cannot use ServiceList literal (type *ServiceList) as type runtime.Object in argument to scheme.AddKnownTypes:
	*ServiceList does not implement runtime.Object (missing DeepCopyObject method)
src/project/vendor/k8s.io/client-go/pkg/api/register.go:84:12: cannot use Service literal (type *Service) as type runtime.Object in argument to scheme.AddKnownTypes:
	*Service does not implement runtime.Object (missing DeepCopyObject method)
src/project/vendor/k8s.io/client-go/pkg/api/register.go:85:24: cannot use ServiceProxyOptions literal (type *ServiceProxyOptions) as type runtime.Object in argument to scheme.AddKnownTypes:
	*ServiceProxyOptions does not implement runtime.Object (missing DeepCopyObject method)
src/project/vendor/k8s.io/client-go/pkg/api/register.go:85:24: too many errors
# project/vendor/k8s.io/kubernetes/pkg/api
src/project/vendor/k8s.io/kubernetes/pkg/api/register.go:76:8: cannot use Pod literal (type *Pod) as type runtime.Object in argument to scheme.AddKnownTypes:
	*Pod does not implement runtime.Object (missing DeepCopyObject method)
src/project/vendor/k8s.io/kubernetes/pkg/api/register.go:77:12: cannot use PodList literal (type *PodList) as type runtime.Object in argument to scheme.AddKnownTypes:
	*PodList does not implement runtime.Object (missing DeepCopyObject method)
src/project/vendor/k8s.io/kubernetes/pkg/api/register.go:78:20: cannot use PodStatusResult literal (type *PodStatusResult) as type runtime.Object in argument to scheme.AddKnownTypes:
	*PodStatusResult does not implement runtime.Object (missing DeepCopyObject method)
src/project/vendor/k8s.io/kubernetes/pkg/api/register.go:79:16: cannot use PodTemplate literal (type *PodTemplate) as type runtime.Object in argument to scheme.AddKnownTypes:
	*PodTemplate does not implement runtime.Object (missing DeepCopyObject method)
src/project/vendor/k8s.io/kubernetes/pkg/api/register.go:80:20: cannot use PodTemplateList literal (type *PodTemplateList) as type runtime.Object in argument to scheme.AddKnownTypes:
	*PodTemplateList does not implement runtime.Object (missing DeepCopyObject method)
src/project/vendor/k8s.io/kubernetes/pkg/api/register.go:81:30: cannot use ReplicationControllerList literal (type *ReplicationControllerList) as type runtime.Object in argument to scheme.AddKnownTypes:
	*ReplicationControllerList does not implement runtime.Object (missing DeepCopyObject method)
src/project/vendor/k8s.io/kubernetes/pkg/api/register.go:82:26: cannot use ReplicationController literal (type *ReplicationController) as type runtime.Object in argument to scheme.AddKnownTypes:
	*ReplicationController does not implement runtime.Object (missing DeepCopyObject method)
src/project/vendor/k8s.io/kubernetes/pkg/api/register.go:83:16: cannot use ServiceList literal (type *ServiceList) as type runtime.Object in argument to scheme.AddKnownTypes:
	*ServiceList does not implement runtime.Object (missing DeepCopyObject method)
src/project/vendor/k8s.io/kubernetes/pkg/api/register.go:84:12: cannot use Service literal (type *Service) as type runtime.Object in argument to scheme.AddKnownTypes:
	*Service does not implement runtime.Object (missing DeepCopyObject method)
src/project/vendor/k8s.io/kubernetes/pkg/api/register.go:85:24: cannot use ServiceProxyOptions literal (type *ServiceProxyOptions) as type runtime.Object in argument to scheme.AddKnownTypes:
	*ServiceProxyOptions does not implement runtime.Object (missing DeepCopyObject method)
src/project/vendor/k8s.io/kubernetes/pkg/api/register.go:85:24: too many errors

When I try to set dep ensure -add k8s.io/apimachinery@1fd2e63a9a370677308a42f24fd40c86438afddf
I get an error:

ensure Solve(): No versions of k8s.io/apimachinery met constraints:	1fd2e63a9a370677308a42f24fd40c86438afddf: Could not introduce k8s.io/apimachinery@1fd2e63a9a370677308a42f24fd40c86438afddf, as its subpackage k8s.io/apimachinery does not contain usable Go code (*build.NoGoError).. (Package is required by (root).)

Does anyone help me?
Many Thanks

@paralin
Copy link

paralin commented Sep 17, 2017

I have the same thing, among other errors. And it's driving me INSANE.

ensure Solve(): No versions of k8s.io/apimachinery met constraints:
        1fd2e63a9a370677308a42f24fd40c86438afddf: unable to update checked out ve
rsion: : command failed: [git checkout 1fd2e63a9a370677308a42f24fd40c86438afddf]:
 exit status 128                                                                

WHAT? I can check it out just fine.

@Crazykev
Copy link

I meet this just like @jorgesece , share my experience here in case anyone need.
I add override section in Gopkg.toml for apimachinery first, like:

[[override]]
  name = "k8s.io/apimachinery"
  revision = "1fd2e63a9a370677308a42f24fd40c86438afddf"

Then, run dep ensure and check if compile successfully, if not, continue to add override for other dependency that will satisfy. At last, remove all these override and run dep ensure again.

This is just a workaround, but do resolve my problem. Hope to be helpful.

iaguis added a commit to kinvolk-archives/rktlet that referenced this issue Sep 19, 2017
It now uses:

* Kubernetes v1.7.5
* rkt v1.25.0
* go-systemd v15

I had to explicitly list some dependencies to pin them to a version

* client-go v4.0.0
* cni v0.3.0 (what rkt uses)

I also changed some depencency revisions to match what Kubernetes has.

Finally, since I was getting compilation errors similar to the ones
mentioned in
kelseyhightower/kubernetes-initializer-tutorial#4,
I set the version of k8s.io/apimachinery to like mentioned there.
iaguis added a commit to kinvolk-archives/rktlet that referenced this issue Sep 21, 2017
It now uses:

* Kubernetes v1.7.5
* rkt v1.25.0
* go-systemd v15

I had to explicitly list some dependencies to pin them to a version

* client-go v4.0.0
* cni v0.3.0 (what rkt uses)

I also changed some depencency revisions to match what Kubernetes has.

Finally, since I was getting compilation errors similar to the ones
mentioned in
kelseyhightower/kubernetes-initializer-tutorial#4,
I set the version of k8s.io/apimachinery to like mentioned there.
@rajiteh
Copy link

rajiteh commented Nov 1, 2017

The following combination of constraints were required for me to successfully build the project.



[[constraint]]
  name = "github.com/ghodss/yaml"
  version = "1.0.0"
 
[[override]]
  name = "k8s.io/client-go"
  version = "5.0.0"
  
[[override]]
  revision = "019ae5ada31de202164b118aee88ee2d14075c31"
  name = "k8s.io/apimachinery"
  
[[override]]
  name = "github.com/ugorji/go"
  revision = "8c0409fcbb70099c748d71f714529204975f6c3f"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants