Running go get with go modules enabled fails due to this error:
$ GOFLAGS="" GO111MODULE=on go get github.com/GoogleCloudPlatform/spark-on-k8s-operator
go: github.com/GoogleCloudPlatform/[email protected] requires
k8s.io/[email protected]: reading k8s.io/apiextensions-apiserver/go.mod at revision v0.0.0: unknown revision v0.0.0
````
trying just the API package also gives the same error:
$ GOFLAGS="" GO111MODULE=on go get github.com/GoogleCloudPlatform/spark-on-k8s-operator/pkg/apis/sparkoperator.k8s.io/v1beta2
go: finding github.com/GoogleCloudPlatform/spark-on-k8s-operator/pkg/apis/sparkoperator.k8s.io/v1beta2 latest
go: finding github.com/GoogleCloudPlatform/spark-on-k8s-operator/pkg latest
go: finding github.com/GoogleCloudPlatform/spark-on-k8s-operator latest
go: finding github.com/GoogleCloudPlatform/spark-on-k8s-operator/pkg/apis/sparkoperator.k8s.io latest
go: finding github.com/GoogleCloudPlatform/spark-on-k8s-operator/pkg/apis latest
go get: github.com/GoogleCloudPlatform/[email protected] requires
k8s.io/[email protected]: reading k8s.io/apiextensions-apiserver/go.mod at revision v0.0.0: unknown revision v0.0.0
```
Hello, did you manage to find a solution in the end?
I'm getting something similar,
go get: github.com/GoogleCloudPlatform/spark-on-k8s-operator@none updating to
github.com/GoogleCloudPlatform/[email protected] requires
k8s.io/[email protected] requires
k8s.io/[email protected]: reading k8s.io/api/go.mod at revision v0.0.0: unknown revision v0.0.0
Hi @yilun-zhu
You might need to specify a different version of k8s.io/client-go, depending on the version of the Kubernetes server you run on.
See https://github.com/kubernetes/client-go/blob/master/INSTALL.md
Hi @hongshaoyang
I was trying to create a validating webhook for sparkapplication and it fails in go mod tidy . I have updated the k8s.io/client-go to the version based on my Kubernetes server.
My go.mod looks like:
module example.com
go 1.15
require (
github.com/onsi/ginkgo v1.14.1
github.com/onsi/gomega v1.10.2
k8s.io/api v0.20.4
k8s.io/apimachinery v0.20.4
k8s.io/client-go v0.20.4
sigs.k8s.io/controller-runtime v0.7.2
github.com/GoogleCloudPlatform/spark-on-k8s-operator v0.0.0-20210822172015-74ea1c86c9a5
)
go get cmd looks like:
go: github.com/GoogleCloudPlatform/[email protected] requires
k8s.io/[email protected] requires
k8s.io/[email protected]: reading k8s.io/api/go.mod at revision v0.0.0: unknown revision v0.0.0
Am I missing something in my go.mod?
Most helpful comment
Hello, did you manage to find a solution in the end?
I'm getting something similar,