For module go.etcd.io/etcd/v3
, it adopts a multi-module repo so there is no need to pull the whole repo if we only need some packages.
What are the benefits that module k8s.io/kubernetes
being a single-module rather than a multi-module?
Please help me to figure it out, thanks!
CodePudding user response:
k8s.io/kubernetes
IS NOT suitable for use as an imported library. They use staging/… to denote libraries which are suitable.
$ find . -name go.mod | grep -v vendor
./go.mod
./kube-openapi-hack/go.mod
./hack/tools/go.mod
./gengo2/go.mod
./staging/src/k8s.io/legacy-cloud-providers/go.mod
./staging/src/k8s.io/sample-cli-plugin/go.mod
./staging/src/k8s.io/kubectl/go.mod
./staging/src/k8s.io/client-go/go.mod
./staging/src/k8s.io/cri-api/go.mod
./staging/src/k8s.io/apimachinery/go.mod
./staging/src/k8s.io/cluster-bootstrap/go.mod
./staging/src/k8s.io/cloud-provider/go.mod
./staging/src/k8s.io/metrics/go.mod
./staging/src/k8s.io/cli-runtime/go.mod
./staging/src/k8s.io/controller-manager/go.mod
./staging/src/k8s.io/component-helpers/go.mod
./staging/src/k8s.io/csi-translation-lib/go.mod
./staging/src/k8s.io/component-base/go.mod
./staging/src/k8s.io/kube-scheduler/go.mod
./staging/src/k8s.io/sample-apiserver/go.mod
./staging/src/k8s.io/code-generator/examples/go.mod
./staging/src/k8s.io/code-generator/go.mod
./staging/src/k8s.io/apiextensions-apiserver/go.mod
./staging/src/k8s.io/kube-proxy/go.mod
./staging/src/k8s.io/kube-controller-manager/go.mod
./staging/src/k8s.io/pod-security-admission/go.mod
./staging/src/k8s.io/kubelet/go.mod
./staging/src/k8s.io/sample-controller/go.mod
./staging/src/k8s.io/mount-utils/go.mod
./staging/src/k8s.io/api/go.mod
./staging/src/k8s.io/kube-aggregator/go.mod
./staging/src/k8s.io/apiserver/go.mod