Commit Graph

272 Commits

Author SHA1 Message Date
Tim Hockin
812d5fff40 Remove old gengo detritus 2024-02-29 22:07:39 -08:00
Tim Hockin
6f2f3735e0 Re-vendor latest kube-openapi and gengo/v2
./hack/pin-dependency.sh k8s.io/kube-openapi latest
./hack/pin-dependency.sh k8s.io/gengo/v2 latest
./hack/update-vendor.sh
2024-02-29 22:06:19 -08:00
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
Patrick Ohly
e2222f1e30 dependencies: klog v2.120.1 2024-01-18 16:58:40 +01:00
Paco Xu
3c86d21316 bump klog to v2.120.0 2024-01-11 17:35:07 +08:00
Tim Hockin
1f55357d99 Re-vendor k8s.io/kube-openapi
./hack/pin-dependency.sh k8s.io/kube-openapi 778a5567bc1edaed92a4de9c07f90199c67953fa

./hack/update-vendor.sh
2023-11-27 12:06:19 -08:00
Patrick Ohly
878d037d3b dependencies: klog v2.110.1
Dropping a newline at the end of the message when using klog calls is an
intentional improvement (https://github.com/kubernetes/klog/pull/378)
2023-11-01 09:32:20 +01:00
Alexander Zielenski
4d21a23be3 pin openapi 2023-10-18 16:07:06 -07:00
Jefftree
e3098225ea bump kube-openapi 2023-10-16 15:05:13 -04:00
Jefftree
555c1b8091 bump kube-openapi 2023-10-11 11:12:47 -04:00
Dr. Stefan Schimanski
6c59e8be5e hack/update-vendor.sh
Signed-off-by: Dr. Stefan Schimanski <stefan.schimanski@gmail.com>
2023-09-15 15:42:13 +02:00
Kubernetes Prow Robot
a68093a3ff Merge pull request #120506 from alexzielenski/import-restrictions
Update e2e import restrictions
2023-09-13 21:56:22 -07:00
Stephen Kitt
aa89e6dc97 Use ptr.To to retrieve intstr addresses
This uses the generic ptr.To in k8s.io/utils to replace functions and
code constructs which only serve to return pointers to intstr
values. Other uses of the deprecated pointer package are updated in
modified files.

Signed-off-by: Stephen Kitt <skitt@redhat.com>
2023-09-08 11:10:50 +02:00
Alexander Zielenski
8451c80b60 pin gengo 2023-09-07 09:49:30 -07:00
Dr. Stefan Schimanski
961c1503b5 Bump kube-openapi 2023-07-17 21:19:47 -04:00
Maciej Skrocki
22c66784e0 staging: add endpointslice repo 2023-07-11 15:42:20 +00:00
Jefftree
1993a4cb37 vendor 2023-06-02 14:34:25 +00:00
Jefftree
4373ae05f3 Update vendor 2023-05-24 18:55:36 +00:00
Jordan Liggitt
d6d1dbdd82 Update kube-openapi, drop mapstructure 2023-05-15 16:42:00 -04:00
Patrick Ohly
83fb5a50bc dependencies: bump k8s.io/utils
This includes a fix for a race condition.
2023-05-15 08:58:05 +02:00
Ian K. Coolidge
cede96336a Depend on k8s.io/utils cpuset
Steps performed:

$ find . -name '*.go' -exec sed -i
's|k8s.io/kubernetes/pkg/kubelet/cm/cpuset|k8s.io/utils/cpuset|g' {} \
$ ./hack/update-vendor.sh
$ ./hack/update-gofmt.sh
$ git rm -r pkg/kubelet/cm/cpuset/
2023-05-03 16:26:09 +00:00
Ian K. Coolidge
9f46cbc6fa Update k8s.io/utils version to v0.0.0-20230313181309-38a27ef9d749
Steps:
1) Manualy update go.mod with new version string
2) ./hack/update-vendor.sh
3) Fixup go.sum with new package hash
4) ./hack/update-vendor.sh
2023-05-03 16:26:04 +00:00
Patrick Ohly
5fff8cae74 dependencies: klog v2.100.1 2023-05-02 13:22:30 +02:00
Jefftree
de34540248 Update kube-openapi to fix race 2023-05-01 17:19:03 +00:00
Swati Sehgal
4c8ee8e00e noderesourcetopology-api: Vendor update
Generated by running:

```
./hack/updater-vendor.sh
```

Signed-off-by: Swati Sehgal <swsehgal@redhat.com>
2023-03-14 13:03:01 +05:30
Antoine Pelisse
9bbdb9f130 Update kube-openapi to 15aac26d736a 2023-03-09 11:29:40 -08:00
Antoine Pelisse
736123f447 Update kube-openapi to afdc3dddf62d31f5e3868d699379c571a6007920 2023-03-03 08:43:44 -08:00
Patrick Ohly
961819a4d0 dependencies: update klog v2.90.1
This improves performance of the text formatting and ktesting.

Because ktesting no longer buffers messages by default, one unit
test needs to ask for that explicitly.
2023-03-01 19:03:50 +01:00
Anish Ramasekar
09e02052fd Update k8s.io/utils to a36077c30491
Signed-off-by: Anish Ramasekar <anish.ramasekar@gmail.com>
2023-02-09 20:09:41 +00:00
Artem Minyaylov
f573e14942 Update k8s.io/utils to latest version
Update all usages of FakeExec to pointer to avoid copying the mutex
2023-02-04 11:05:22 -08:00
Alexander Zielenski
7641ff7541 update kube-openapi 2023-01-23 15:32:33 -08:00
Olivier Lemasle
8b8e20fcdb Bump kube-openapi 2023-01-11 11:48:07 +01:00
Jordan Liggitt
d78de56d76 bump kube-openapi 2023-01-06 12:24:18 -05:00
Swati Sehgal
5c0a599534 nrt-api: Add a symlink to the staging repo in vendor/k8s.io 2022-12-12 16:48:32 +00:00
Patrick Ohly
76cb805af2 staging: create dynamic resource allocation repo
This will be used for different individual packages. A separate repo
is better than reusing something like component-helpers because dependencies
will be different.
2022-11-10 20:23:50 +01:00
David Ashpole
3f1511c8e9 update k8s.io/utils to fix util tracing panic 2022-11-07 19:30:21 +00:00
Alexander Zielenski
f622dd918a update kube-openapi
hack/pin-dependency.sh k8s.io/kube-openapi 172d655c2280350c77cf05962948fc67ff043492
hack/update-vendor.sh
2022-10-13 19:51:29 -07:00
Anish Ramasekar
c3794e2377 Add staging directory for kms
- Moves kms proto apis to the staging repo
- Updates generate and verify kms proto scripts to check staging repo

Signed-off-by: Anish Ramasekar <anish.ramasekar@gmail.com>
2022-09-26 19:23:35 +00:00
Davanum Srinivas
4e7e7cdd3c Update to latest k8s.io/utils to pick up changes
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2022-09-22 09:38:28 -04:00
Patrick Ohly
60d92dd96a build: update to klog v2.80.1
The fix for https://github.com/kubernetes/klog/issues/348 is required before
https://github.com/kubernetes/kubernetes/pull/111998 can be merged because the
way how a unit test in that PR uses klog triggers the data race.
2022-09-09 13:11:55 +02:00
weilaaa
2b55c94e37 add symmetric difference in sets 2022-09-07 20:25:44 +08:00
Patrick Ohly
1bc3bde128 dependencies: update to klog v2.80.0
Contains one bug fix in the code path for formatting of objects that support
LogMarshal.
2022-09-02 08:05:47 +02:00
Paco Xu
0a879aa1db upgrade system-validators to v1.8.0 for a bugfix of cgroupv2 io check 2022-08-25 15:40:24 +08:00
Alexander Zielenski
133c265530 update kube-openapi 2022-08-03 09:46:39 -07:00
ialidzhikov
6aa5efb1bd Update k8s.io/utils to ee6ede2d64ed 2022-07-31 16:33:14 +03:00
ialidzhikov
168fef6845 Update k8s.io/utils to 9bab9ef40391 2022-07-27 08:46:35 +03:00
Patrick Ohly
3581e30883 build: update to klog v2.70.1
This makes ktesting more resilient against logging from leaked goroutines,
which is a problem that came up in kubelet node shutdown
tests (https://github.com/kubernetes/kubernetes/issues/110854).
2022-07-07 12:54:08 +02:00
Patrick Ohly
65385fec20 kubelet: convert node shutdown manager to contextual logging
This will make output checking easier (done in a separate commit). kubelet
itself still uses the global logger.
2022-06-24 11:20:34 +02:00
Patrick Ohly
f05e327ca6 build: update to klog v2.70.0
The main practical advantage is that klog.Fatal no longer dumps the backtrace
of all goroutines.
2022-06-22 16:29:51 +02:00
Kubernetes Prow Robot
7e66aa3cfb Merge pull request #110351 from dims/switch-to-v3-of-github.com/emicklei/go-restful
Switch to v3 of github.com/emicklei/go-restful by updating kube-openapi
2022-06-10 09:41:58 -07:00