Description
I'm trying to create arangodb clusters on kubernetes programmatically from yaml definitions (using k8s.io/client-go). In order to create custom arango resources from yaml, I need to register the arango CRD scheme with the client-go scheme. I tried to do so like this:
package example
import (
apiextscheme "k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset/scheme"
arango "github.com/arangodb/kube-arangodb/pkg/generated/clientset/versioned/scheme"
"k8s.io/client-go/kubernetes/scheme"
)
func registerCustomSchemes() error {
// register the CRD scheme to be able to create CRDs from yaml
apiextscheme.AddToScheme(scheme.Scheme)
// register the arango scheme to be able to create arango clusters from yaml
arango.AddToScheme(scheme.Scheme)
}
func main() {
registerCustomSchemes()
// assume yamls is a slice of k8s object yaml definitions,
// which includes object(s) with kind: ArangoDeployment
for _, yaml := range yamls {
obj, _, err := scheme.Codecs.UniversalDeserializer().Decode([]byte(yaml), nil, nil)
// ... do something with obj
}
}
With that context, you can see that I need to get the package github.com/arangodb/kube-arangodb/pkg/generated/clientset/versioned/scheme
. I tried to do so using dep ensure
, however the download fails. After digging into it, I found that this repo is importing packages from github.com/arangodb/arangosync
- here's an example
github.com/arangodb/arangosync
does not exist, and thus dep ensure
and go get
hang/fail looking for this dependency of github.com/arangodb/kube-arangodb
This is happening with release 0.2.2.
Here's the go get
output -
go get "github.com/arangodb/kube-arangodb/pkg/generated/clientset/versioned/scheme"
# cd .; git clone https://github.com/arangodb/arangosync <GOPATH>/src/github.com/arangodb/arangosync
Cloning into '<GOPATH>/src/github.com/arangodb/arangosync'...
remote: Repository not found.
fatal: repository 'https://github.com/arangodb/arangosync/' not found
package github.com/arangodb/arangosync/pkg/retry: exit status 128
Any ideas?