kubernetes-retired / cluster-registry

[EOL] Cluster Registry API
https://kubernetes.github.io/cluster-registry/
Apache License 2.0
238 stars 94 forks source link

Can't import this repo due to incompatible k8s.io/apimachinery #173

Closed baodongli closed 6 years ago

baodongli commented 6 years ago

/sig multicluster

While trying to import cluster-registry api to istio pilot that requires version 1.9 of k8s.io/apimachinery, build of the cluster-registry failed since it depends on an earlier version of k8s.io/apimachinery.

perotinus commented 6 years ago

@baodongli How are you importing the cluster registry? Can you describe the issue in more detail?

baodongli commented 6 years ago

I imported "k8s.io/cluster-registry/pkg/apis/clusterregistry/v1alpha1" https://github.com/istio/istio/blob/master/Gopkg.toml#L61 defines an overwrite for k8s.io/apimachinery https://github.com/kubernetes/cluster-registry/blob/master/Gopkg.toml#L45 defines a constraint for the same package

The two versions of k8s.io/apiachinery are not compatible.

perotinus commented 6 years ago

@baodongli Thanks for the context, that is something we will have to fix. I'm not immediately sure what the correct fix is: it seems like the cluster registry will need to depend on a floating version of the k8s repos that it depends on, but even that won't work for Pilot if Pilot is depending on a release branch for k8s repos. I'm not sure that the cluster registry should follow the exact same release branching strategy as the Kubernetes infrastructure repos, since the cluster registry is a standalone project rather than infrastructure, but one that happens to provide a client that other repos may want to vendor in.

perotinus commented 6 years ago

@baodongli @marun I removed all of the constraints from Gopkg.toml, so you should not be blocked by the dep tool from vendoring in this repo. There is a plan to split this repo into three different repos, one for the API server and crinit code, one for the API itself, and one for the generated client; and to rename the API to (potentially) APIServiceRegistry, so you may want to hold off until those changes are in. I'm hoping to do that migration work in the next few weeks, but that depends on how contentious the related conversations are.

baodongli commented 6 years ago

Thanks. I was able to import now. So I'm closing this issue.