Workspaces: excise vendor from golang.sh
```
$ make
go version go1.20.4 linux/amd64
+++ [0506 13:21:33] Building go targets for linux/amd64
    ./cmd/kube-proxy (static)
    ./cmd/kube-apiserver (static)
    ./cmd/kube-controller-manager (static)
    ./cmd/kubelet (non-static)
    ./cmd/kubeadm (static)
    ./cmd/kube-scheduler (static)
    ./staging/src/k8s.io/component-base/logs/kube-log-runner (static)
    ./staging/src/k8s.io/kube-aggregator (static)
    ./staging/src/k8s.io/apiextensions-apiserver (static)
    ./cluster/gce/gci/mounter (non-static)
    ./cmd/kubectl (static)
    ./cmd/kubectl-convert (static)
    github.com/onsi/ginkgo/v2/ginkgo (non-static)
    ./test/e2e/e2e.test (test)
    ./test/conformance/image/go-runner (non-static)
    ./cmd/kubemark (static)
    github.com/onsi/ginkgo/v2/ginkgo (non-static)
    ./test/e2e_node/e2e_node.test (test)
```
before:
real	4m31.100s
user	21m1.466s
sys	2m23.546s
after:
real	3m46.591s
user	16m34.665s
sys	2m1.553s
			
			
This commit is contained in:
		| @@ -76,9 +76,9 @@ kube::golang::server_targets() { | ||||
|     cmd/kubelet | ||||
|     cmd/kubeadm | ||||
|     cmd/kube-scheduler | ||||
|     vendor/k8s.io/component-base/logs/kube-log-runner | ||||
|     vendor/k8s.io/kube-aggregator | ||||
|     vendor/k8s.io/apiextensions-apiserver | ||||
|     staging/src/k8s.io/component-base/logs/kube-log-runner | ||||
|     staging/src/k8s.io/kube-aggregator | ||||
|     staging/src/k8s.io/apiextensions-apiserver | ||||
|     cluster/gce/gci/mounter | ||||
|   ) | ||||
|   echo "${targets[@]}" | ||||
| @@ -126,7 +126,7 @@ kube::golang::node_targets() { | ||||
|     cmd/kube-proxy | ||||
|     cmd/kubeadm | ||||
|     cmd/kubelet | ||||
|     vendor/k8s.io/component-base/logs/kube-log-runner | ||||
|     staging/src/k8s.io/component-base/logs/kube-log-runner | ||||
|   ) | ||||
|   echo "${targets[@]}" | ||||
| } | ||||
| @@ -395,7 +395,8 @@ kube::golang::binaries_from_targets() { | ||||
|     fi | ||||
|  | ||||
|     if [[ "${target}" =~ ^vendor/ ]]; then | ||||
|       # Strip vendor/ prefix, since we're building in gomodule mode. | ||||
|       # Strip vendor/ prefix, since we're building in gomodule mode.  This is | ||||
|       # for backwards compatibility. | ||||
|       echo "${target#"vendor/"}" | ||||
|       continue | ||||
|     fi | ||||
| @@ -795,7 +796,7 @@ kube::golang::build_some_binaries() { | ||||
|  | ||||
|         go test -c -o "$(kube::golang::outfile_for_binary "${package}" "${platform}")" \ | ||||
|           -covermode count \ | ||||
|           -coverpkg k8s.io/...,k8s.io/kubernetes/vendor/k8s.io/... \ | ||||
|           -coverpkg k8s.io/... \ | ||||
|           "${build_args[@]}" \ | ||||
|           -tags coverage \ | ||||
|           "${package}" | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Tim Hockin
					Tim Hockin