kubernetes/apiextensions-apiserver

Error getting/installing go module

Abhishek-kumar09 opened this issue · 5 comments

While getting the apiextensions-apiserver go module, getting attempt failures due to conflicts in dependencies, from api/batch/v2alpha1

$ go get k8s.io/apiextensions-apiserver

go: downloading k8s.io/component-base v0.22.2
go: downloading k8s.io/apiserver v0.22.2
go: downloading go.opentelemetry.io/otel v0.20.0
go: downloading gopkg.in/natefinch/lumberjack.v2 v2.0.0
go: downloading github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e
go: downloading go.opentelemetry.io/otel/trace v0.20.0
go: downloading go.opentelemetry.io/otel/exporters/otlp v0.20.0
go: downloading go.opentelemetry.io/otel/sdk v0.20.0
go: downloading github.com/coreos/go-systemd/v22 v22.3.2
go: downloading github.com/blang/semver v3.5.1+incompatible
go: downloading github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822
go: downloading go.etcd.io/etcd v0.5.0-alpha.5.0.20200910180754-dd1b699fc489
go: downloading go.opentelemetry.io/contrib v0.20.0
go: downloading sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.0.22
go: downloading go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.20.0
go: downloading go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.20.0
go: downloading github.com/prometheus/common v0.26.0
go: downloading go.opentelemetry.io/otel/sdk/export/metric v0.20.0
go: downloading go.opentelemetry.io/proto/otlp v0.7.0
go: downloading go.opentelemetry.io/otel/metric v0.20.0
go: downloading go.opentelemetry.io/otel/sdk/metric v0.20.0
go: downloading github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369
go: downloading github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da
go: downloading go.etcd.io/etcd/client/v3 v3.5.0
go: downloading go.etcd.io/etcd/client/pkg/v3 v3.5.0
go: downloading go.etcd.io/etcd/api/v3 v3.5.0
go: downloading go.uber.org/zap v1.17.0
go: downloading go.uber.org/multierr v1.6.0
k8s.io/apiextensions-apiserver imports
        k8s.io/apiserver/pkg/server imports
        k8s.io/client-go/informers imports
        k8s.io/api/batch/v2alpha1: cannot find module providing package k8s.io/api/batch/v2alpha1
k8s.io/apiextensions-apiserver imports
        k8s.io/apiserver/pkg/server imports
        k8s.io/client-go/informers imports
        k8s.io/api/discovery/v1alpha1: cannot find module providing package k8s.io/api/discovery/v1alpha1
go: downloading github.com/blang/semver v1.1.0

Host: Ubuntu 20.04
go version go1.16.4 linux/amd64

@liggitt Requesting your help on the issue, please let me know if I am doing something wrong here.

what is the current content of your go.mod file?

mod:

module github.com/openebs/openebsctl

go 1.16

require (
	github.com/docker/go-units v0.4.0
	github.com/openebs/api/v2 v2.3.0
	github.com/openebs/jiva-operator v1.12.2-0.20210607114402-811a3af7c34a
	github.com/openebs/lvm-localpv v0.6.0
	github.com/openebs/zfs-localpv v1.8.0
	github.com/pkg/errors v0.9.1
	github.com/spf13/cobra v1.1.1
	github.com/spf13/viper v1.7.0
	golang.org/x/crypto v0.0.0-20201221181555-eec23a3978ad // indirect
	golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1 // indirect
	k8s.io/api v0.20.2
	k8s.io/apimachinery v0.20.2
	k8s.io/cli-runtime v0.20.0
	k8s.io/client-go v11.0.1-0.20190409021438-1a26190bd76a+incompatible
	k8s.io/klog v1.0.0
)

replace k8s.io/client-go => k8s.io/client-go v0.20.2

This is the repo I wam working in: https://github.com/openebs/openebsctl/

you need k8s.io/client-go to match the k8s.io/api and k8s.io/apimachinery version

require (
        ...
	k8s.io/api v0.22.2
	k8s.io/apimachinery v0.22.2
	k8s.io/cli-runtime v0.22.2
	k8s.io/client-go v0.22.2
        ...
)

replace k8s.io/client-go => k8s.io/client-go v0.22.2

The Kubernetes project currently lacks enough contributors to adequately respond to all issues and PRs.

This bot triages issues and PRs according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Mark this issue or PR as fresh with /remove-lifecycle stale
  • Mark this issue or PR as rotten with /lifecycle rotten
  • Close this issue or PR with /close
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle stale