kubernetes/vendor/github.com
Patrick Ohly 65b841c077
Generate go.work files
This creates go.work and enables Go Workspaces.  This is a file that
includes info on k/k and all the staging modules.

This depends on go 1.22 and setting FORCE_HOST_GO=true (for kube
scripts, which try to be hermetic).

Make this part of the normal update/verify sequence.

The top-level go.work file contains no replace statements. Instead, the
replace statements in the individual go.mod files are used. For this to
work, replace statements in the individual go.mod files have to be
consistent.

hack/tools has different dependencies and can't be in the main
workspace, so this adds a go.work just for that.  Without this, go tries
to consider all deps in all modules and pick one that works for all.
This is problematic because there are so many of them that it is
difficult to manage.

Likewise for k8s.io/code-generator/examples and
k8s.io/kms/internal/plugins/_mock - add trivial go.work files.

For example k/k depends on an older version of a lib that gloangci-lint
needs (transitively) and it breaks.

This also updates vendor (needed to make go happy), and removes
vendor'ed symlinks.  This breaks a LOT of our build tools, which will be
fixed subsequently.

Result: `go` commands work across modules:

Before:
```
$ go list ./pkg/proxy/iptables/ ./staging/src/k8s.io/api/core/v1/
main module (k8s.io/kubernetes) does not contain package k8s.io/kubernetes/staging/src/k8s.io/api/core/v1

$ go build ./pkg/proxy/iptables/ ./staging/src/k8s.io/api
main module (k8s.io/kubernetes) does not contain package k8s.io/kubernetes/staging/src/k8s.io/api

$ go test ./pkg/proxy/iptables/ ./staging/src/k8s.io/api
main module (k8s.io/kubernetes) does not contain package k8s.io/kubernetes/staging/src/k8s.io/api
```

After:
```
$ go list ./pkg/proxy/iptables/ ./staging/src/k8s.io/api/core/v1/
k8s.io/kubernetes/pkg/proxy/iptables
k8s.io/api/core/v1

$ go build ./pkg/proxy/iptables/ ./staging/src/k8s.io/api

$ go test ./pkg/proxy/iptables/ ./staging/src/k8s.io/api
ok  	k8s.io/kubernetes/pkg/proxy/iptables	0.360s
ok  	k8s.io/api	2.302s
```

Result: `make` fails:

```
$ make
go version go1.22rc1 linux/amd64
+++ [0106 12:11:03] Building go targets for linux/amd64
    k8s.io/kubernetes/cmd/kube-proxy (static)
    k8s.io/kubernetes/cmd/kube-apiserver (static)
    k8s.io/kubernetes/cmd/kube-controller-manager (static)
    k8s.io/kubernetes/cmd/kubelet (non-static)
    k8s.io/kubernetes/cmd/kubeadm (static)
    k8s.io/kubernetes/cmd/kube-scheduler (static)
    k8s.io/component-base/logs/kube-log-runner (static)
    k8s.io/kube-aggregator (static)
    k8s.io/apiextensions-apiserver (static)
    k8s.io/kubernetes/cluster/gce/gci/mounter (static)
    k8s.io/kubernetes/cmd/kubectl (static)
    k8s.io/kubernetes/cmd/kubectl-convert (static)
    github.com/onsi/ginkgo/v2/ginkgo (non-static)
    k8s.io/kubernetes/test/e2e/e2e.test (test)
    k8s.io/kubernetes/test/conformance/image/go-runner (non-static)
    k8s.io/kubernetes/cmd/kubemark (static)
    github.com/onsi/ginkgo/v2/ginkgo (non-static)
    k8s.io/kubernetes/test/e2e_node/e2e_node.test (test)
test/e2e/e2e.go:35:2: cannot find package "k8s.io/api/apps/v1" in any of:
	/home/thockin/src/kubernetes/_output/local/go/src/k8s.io/kubernetes/vendor/k8s.io/api/apps/v1 (vendor tree)
	/home/thockin/src/kubernetes/_output/local/.gimme/versions/go1.22rc1.linux.amd64/src/k8s.io/api/apps/v1 (from $GOROOT)
	/home/thockin/src/kubernetes/_output/local/go/src/k8s.io/api/apps/v1 (from $GOPATH)
	... more ...
	... more ...
	... more ...
!!! [0106 12:13:41] Call tree:
!!! [0106 12:13:41]  1: /home/thockin/src/kubernetes/hack/lib/golang.sh:948 kube::golang::build_binaries_for_platform(...)
!!! [0106 12:13:41]  2: hack/make-rules/build.sh:27 kube::golang::build_binaries(...)
!!! [0106 12:13:41] Call tree:
!!! [0106 12:13:41]  1: hack/make-rules/build.sh:27 kube::golang::build_binaries(...)
!!! [0106 12:13:41] Call tree:
!!! [0106 12:13:41]  1: hack/make-rules/build.sh:27 kube::golang::build_binaries(...)
make: *** [Makefile:96: all] Error 1
```

Again, this requires go 1.22 (e.g. gotip), as go 1.21.x does not have
`go work vendor` support.

TO REPEAT:
    ( \
      ./hack/update-go-workspace.sh; \
      ./hack/update-vendor.sh; \
      ./hack/update-go-workspace.sh; \
    )
2024-02-29 00:22:06 -08:00
..
antlr/antlr4/runtime/Go/antlr/v4 Bump cel-go to v0.16.0 2023-05-31 18:36:43 -04:00
armon feat: add missing SOCKS5 features 2022-01-21 11:49:41 +01:00
asaskevich/govalidator hack/update-bazel.sh 2021-02-28 15:17:29 -08:00
Azure/go-ansiterm chore: Cleanup in-tree credential provider azure and cloud provider azure 2024-01-20 15:18:31 +08:00
beorn7/perks hack/update-bazel.sh 2021-02-28 15:17:29 -08:00
blang/semver/v4 Regenerate vendor 2022-05-04 10:27:41 -04:00
cenkalti/backoff/v4 dependencies: update github.com/cenkalti/backoff/v4 to v4.2.1 2023-04-17 18:20:27 -04:00
cespare/xxhash/v2 Update google.golang.org/genproto 2023-05-26 13:20:33 -04:00
chai2010/gettext-go Switch to v1.0.2 of github.com/chai2010/gettext-go 2022-06-10 19:58:10 -04:00
checkpoint-restore/go-criu/v5 Regenerate vendor 2022-05-04 10:27:41 -04:00
cilium/ebpf chore: update cgroups and ttrpc versions 2023-04-27 20:46:23 -07:00
container-storage-interface/spec update container storage interface spec to v1.8.0 2023-04-12 13:45:45 +05:30
containerd update vendor to use containerd cgroups 2023-07-21 13:28:17 +08:00
coredns update coredns to v1.11.0 2023-08-26 17:15:46 +08:00
coreos dependencies: update go-semver to v0.3.1 2023-04-13 23:29:48 -07:00
cpuguy83/go-md2man/v2 Update cobra to v1.4.0 2022-03-10 16:19:43 -05:00
cyphar/filepath-securejoin run hack scripts to update cyphar/filepath-securejoin to v0.2.4 correctly 2023-10-17 10:58:11 +02:00
davecgh/go-spew hack/update-bazel.sh 2021-02-28 15:17:29 -08:00
daviddengcn/go-colortext Switch to released tag v1.0.0 for github.com/daviddengcn/go-colortext 2022-06-10 17:12:24 -04:00
distribution/reference New repo who dis? distribution/reference 2023-08-31 21:53:40 -04:00
docker/go-units New repo who dis? distribution/reference 2023-08-31 21:53:40 -04:00
dustin/go-humanize dependencies: update github.com/dustin/go-humanize v1.0.1 2023-06-06 14:45:00 +05:30
emicklei/go-restful/v3 bump github.com/emicklei/go-restful/v3 to v3.11.0. 2023-09-17 16:03:01 +08:00
euank/go-kmsg-parser hack/update-bazel.sh 2021-02-28 15:17:29 -08:00
evanphx/json-patch Revert to json-patch 4.12.0 2023-08-31 19:01:37 -04:00
exponent-io/jsonpath hack/update-bazel.sh 2021-02-28 15:17:29 -08:00
fatih/camelcase hack/update-bazel.sh 2021-02-28 15:17:29 -08:00
felixge/httpsnoop updated etcd to v3.5.5 and newer otel libraries as well 2022-09-17 21:47:24 -04:00
fsnotify/fsnotify Bumped the fsnotify from version v1.6.0 to v1.7.0 2023-10-23 10:32:35 +08:00
fvbommel/sortorder dependencies: update gh/fvbommel/v1.1.0 2023-04-14 11:51:11 +05:30
fxamacker/cbor/v2 Bump github.com/fxamacker/cbor/v2 to v2.6.0. 2024-02-14 10:09:15 -05:00
go-errors/errors Update kubectl kustomize to kyaml/v0.14.1, cmd/config/v0.11.1, api/v0.13.2, kustomize/v5.0.1 2023-03-14 11:40:28 -05:00
go-logr bump klog to v2.120.0 2024-01-11 17:35:07 +08:00
go-openapi vendor 2023-06-02 14:34:25 +00:00
go-task/slim-sprig Build Ginkgo binary 2022-07-08 10:46:11 +08:00
godbus/dbus/v5 bump dependencies: github.com/godbus/dbus/v5 to v5.1.0 2023-05-08 17:19:02 +08:00
gogo/protobuf hack/update-bazel.sh 2021-02-28 15:17:29 -08:00
golang dependencies: ginkgo v2.9.1, gomega v1.27.4 2023-03-14 22:26:27 +01:00
golang-jwt/jwt/v4 dependencies: update gh/Azure/auto-test/{adal,validation} 2023-04-13 23:25:48 +05:30
google Generate go.work files 2024-02-29 00:22:06 -08:00
googleapis working-config-otel 2023-10-25 16:31:21 -04:00
GoogleCloudPlatform/k8s-cloud-provider update kube-controller-manager dependencies 2022-06-23 18:07:18 +00:00
gorilla/websocket bump: upgrade gorilla/websocket from v1.4.2 to v1.5.0 2023-09-07 22:27:58 +08:00
gregjones/httpcache Use checksums instead of fsyncs to manage discovery cache corruption 2022-07-27 00:13:30 -07:00
grpc-ecosystem working-config-otel 2023-10-25 16:31:21 -04:00
imdario/mergo Update kubectl kustomize to kyaml/v0.13.9, cmd/config/v0.10.9, api/v0.12.1, kustomize/v4.5.7 (#111606) 2022-08-02 20:13:51 -07:00
inconshreveable/mousetrap Upgrades spf13/cobra to 1.7.0 2023-05-02 22:39:52 +00:00
ishidawataru/sctp dependencies: update github.com/ishidawataru/sctp 2023-07-25 17:51:45 +08:00
JeffAshton/win_pdh hack/update-bazel.sh 2021-02-28 15:17:29 -08:00
jonboulle/clockwork Regenerate vendor 2022-05-04 10:27:41 -04:00
josharian/intern Regenerate vendor 2022-05-04 10:27:41 -04:00
json-iterator/go Regenerate vendor 2022-05-04 10:27:41 -04:00
karrick/godirwalk deps: Bump cAdvisor to v0.46.0 2022-11-08 18:49:14 -08:00
libopenstorage/openstorage hack/update-bazel.sh 2021-02-28 15:17:29 -08:00
liggitt/tabwriter hack/update-bazel.sh 2021-02-28 15:17:29 -08:00
lithammer/dedent Regenerate vendor 2022-05-04 10:27:41 -04:00
mailru/easyjson Bump kube-openapi 2023-01-11 11:48:07 +01:00
MakeNowJust/heredoc Switch to v1.0.0 of github.com/MakeNowJust/heredoc (avoid SHA) 2022-06-10 14:51:33 -04:00
matttproud/golang_protobuf_extensions hack/update-bazel.sh 2021-02-28 15:17:29 -08:00
Microsoft updating microsft/go-winio package to latest version 2023-04-24 15:32:45 -07:00
mistifyio/go-zfs hack/update-bazel.sh 2021-02-28 15:17:29 -08:00
mitchellh/go-wordwrap dependencies: update github.com/mitchellh/go-wordwrap v1.0.1 2023-05-16 10:18:52 +05:30
moby Update to new release of moby/ipvs 2023-01-14 16:13:24 -05:00
modern-go Regenerate vendor 2022-05-04 10:27:41 -04:00
mohae/deepcopy hack/update-bazel.sh 2021-02-28 15:17:29 -08:00
monochromegane/go-gitignore until stable: pin-dependency, update-vendor, update-bazel, lint-dep 2021-03-08 16:50:43 -08:00
mrunalp/fileutils bump runc to v1.1.10 2023-11-06 10:42:39 +08:00
munnerz/goautoneg hack/update-bazel.sh 2021-02-28 15:17:29 -08:00
mxk/go-flowrate hack/update-bazel.sh 2021-02-28 15:17:29 -08:00
NYTimes/gziphandler Regenerate vendor 2022-05-04 10:27:41 -04:00
onsi dependencies: ginkgo v2.15.0, gomega v1.31.0 2024-01-18 15:24:31 +01:00
opencontainers Update to runc 1.1.12 2024-01-31 12:20:32 -08:00
peterbourgon/diskv hack/update-bazel.sh 2021-02-28 15:17:29 -08:00
pkg/errors hack/update-bazel.sh 2021-02-28 15:17:29 -08:00
pmezard/go-difflib hack/update-bazel.sh 2021-02-28 15:17:29 -08:00
pquerna/cachecontrol Switch to released tag v0.1.0 of github.com/pquerna/cachecontrol 2022-06-10 15:52:44 -04:00
prometheus upgrade prometheus common to v0.44.0 2023-07-15 13:22:24 +08:00
robfig/cron/v3 Regenerate vendor 2022-05-04 10:27:41 -04:00
russross/blackfriday/v2 pin github.com/russross/blackfriday/v2 to v2.1.0 2022-09-26 13:52:58 +08:00
seccomp/libseccomp-golang dependencies: udpate seccomp/libseccomp-golang to v0.10.0 2023-04-13 23:48:44 -07:00
sirupsen/logrus Update to new release of moby/ipvs 2023-01-14 16:13:24 -05:00
soheilhy/cmux Regenerate vendor 2022-05-04 10:27:41 -04:00
spf13 Upgrades spf13/cobra to 1.7.0 2023-05-02 22:39:52 +00:00
stoewer/go-strcase Regenerate vendor 2022-05-04 10:27:41 -04:00
stretchr/testify dependencies: update otel-go dependencies 2023-10-10 19:16:07 +00:00
syndtr/gocapability vendor: cadvisor v0.39.0 2021-03-08 22:10:29 -08:00
tmc/grpc-websocket-proxy Update protobuf,grpc,etcd dependencies 2021-06-15 10:06:09 -04:00
vishvananda dependencies: update netns to v0.0.4 2023-04-14 11:13:51 +05:30
x448/float16 Update vendoring to take new CBOR library dependency. 2024-01-25 08:35:26 -05:00
xiang90/probing hack/update-bazel.sh 2021-02-28 15:17:29 -08:00
xlab/treeprint dependencies: xlab/treeprint v1.2.0 2023-04-14 11:17:07 +05:30