Commit Graph

2352 Commits

Author SHA1 Message Date
Akihiro Suda
f6e2ea7b96 build/common.sh: fix support for Rootless Docker
In the case of Rootless mode, `docker run` should not be
invoked with `--user`.

Fix issue 134669

Regression in PR 134510

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2025-10-20 20:21:05 +09:00
Kubernetes Prow Robot
cf991024a2 Merge pull request #134656 from BenTheElder/cleanup-rsync
additional build simplification, drop rsync requirement
2025-10-16 14:32:47 -07:00
Benjamin Elder
26cba8ee03 ensure permissions are consistent on dockerized binaries 2025-10-16 11:18:26 -07:00
Benjamin Elder
5b9b8ec732 make localtime mount readonly 2025-10-16 10:26:13 -07:00
Benjamin Elder
feeeb4aa19 switch from rsync to cp, drop rsync requirement 2025-10-16 10:26:13 -07:00
Benjamin Elder
e71aa02f96 we no longer need to delete old docker images as we don't build a build-image anymore, we use pre-built kube-cross 2025-10-16 10:26:13 -07:00
Benjamin Elder
ff0a5fff38 cleanup lingering references to kube-build
.... excluding build container name and kube-cross version

TODO: build/build-image/cross/VERSION should probably just be a variable in the shell script
2025-10-16 10:26:13 -07:00
Benjamin Elder
b3ad67739a delete build-image
we no longer need this now that we run kube-cross directly
2025-10-16 10:26:13 -07:00
Benjamin Elder
7825b2fc76 drop go-socks5 from build/tools.go
I don't think this was ever needed in the root module
2025-10-15 21:23:18 -07:00
Kubernetes Prow Robot
fa19b99377 Merge pull request #134619 from chrischdi/pr-fixup-build-in-kube-cross-kube-git-version-file
build: build by running kube-cross directly should leverage a potential KUBE_GIT_VERSION_FILE
2025-10-15 17:19:34 -07:00
Christian Schlotter
bec429cd96 Review fixes 2025-10-15 18:57:34 +02:00
Christian Schlotter
8a43852c35 build: build by running kube-cross directly should leverage a potential KUBE_GIT_VERSION_FILE 2025-10-15 13:48:00 +02:00
Carlos Panato
96a9fe5f7b update debian-base and setcap
Signed-off-by: Carlos Panato <ctadeu@gmail.com>
2025-10-15 09:42:15 +02:00
Carlos Panato
15154374bc Bump images, dependencies and versions to go 1.25.3 and distroless iptables
Signed-off-by: Carlos Panato <ctadeu@gmail.com>
2025-10-15 09:41:57 +02:00
Kubernetes Prow Robot
9d5cda7a21 Merge pull request #134598 from BenTheElder/go1.25.3
bump to go 1.25.3
2025-10-14 14:23:41 -07:00
Kubernetes Prow Robot
9630ab9581 Merge pull request #134510 from BenTheElder/no-rsync
build by running kube-cross directly
2025-10-14 11:37:40 -07:00
Benjamin Elder
6f820481d3 bump to go 1.25.3 2025-10-14 10:44:59 -07:00
Benjamin Elder
86d0697319 remove blank line between comments and entry 2025-10-13 10:33:27 -07:00
Benjamin Elder
19311b932f reorder kube-cross to be under go version and dedupe it from the go version 2025-10-13 10:31:50 -07:00
Benjamin Elder
e669ccda0f update build/README.md to reflect removal of rsync/data containers 2025-10-13 09:47:24 -07:00
Benjamin Elder
7d2309f059 cleanup unused rsync utilities 2025-10-13 09:47:24 -07:00
Benjamin Elder
faa62c8ce6 cleanup KUBE_RSYNC_CONTAINER*, KUBE_DATA_CONTAINER*, DOCKER_MOUNT_ARGS 2025-10-13 09:47:24 -07:00
Benjamin Elder
36526c3815 delete more now-unused shell functions 2025-10-13 09:47:24 -07:00
Benjamin Elder
5a05c062c3 delete now unused kube::build::copy_output and kube::build::build_image 2025-10-13 09:47:24 -07:00
Benjamin Elder
dee429c165 remove unused scripts 2025-10-13 09:47:24 -07:00
Benjamin Elder
eaeed1a534 remove calls to kube::build::build_image and kube::build::copy_output 2025-10-13 09:47:24 -07:00
Benjamin Elder
581012fe06 build by running kube-cross directly
eliminate rsync dance, data container, and building a build image every time
2025-10-13 09:47:21 -07:00
Davanum Srinivas
e8d512d822 extract build vars setup into reusable function
pulled out all the build variable setup stuff from verify_prereqs into its own function since we need those vars in other places too (like make-clean)
2025-10-12 14:22:40 -04:00
Kubernetes Prow Robot
63389c2374 Merge pull request #134532 from BenTheElder/clean-no-tools
don't require build tools to clean
2025-10-10 15:53:00 -07:00
Benjamin Elder
d5ae324fb6 don't require build tools to clean
removing the output already only uses docker opportunistically cleanup after docker builds, the rest of cleanup should not require any of these

previously on a clean mac install you can install docker + `bash` and building like `make WHAT=cmd/kubectl` will work but `make clean` will fail due to lack of gnu-tar
2025-10-10 14:12:28 -07:00
Benjamin Elder
efda517d93 speed up make clean by narrowing recursive chmod 2025-10-09 16:55:36 -07:00
Kubernetes Prow Robot
4db43d1321 Merge pull request #134251 from joshjms/update-etcd-3.6.5
etcd: Update etcd to v3.6.5
2025-10-03 07:00:58 -07:00
joshjms
070d4c1846 bump etcd to v3.6.5
Signed-off-by: joshjms <joshjms1607@gmail.com>
2025-10-03 18:19:15 +08:00
Kubernetes Prow Robot
8f372d2ac0 Merge pull request #133972 from pohly/build-data-race-detection-image
build: automatically choose a suitable base image
2025-09-30 12:32:16 -07:00
Ciprian Hacman
2b3f1877be Update NPD to v1.34.0 2025-09-27 19:57:47 +03:00
Carlos Panato
48d5664430 update kube-cross image
Signed-off-by: Carlos Panato <ctadeu@gmail.com>
2025-09-23 15:25:21 +02:00
Davanum Srinivas
6dbc13fd13 Bump to go1.25.1 based images 2025-09-16 22:42:29 -04:00
Davanum Srinivas
3fc0498d6e Bump distroless-iptables to v0.7.8 2025-09-16 17:16:06 -04:00
Patrick Ohly
bbf896c35b build: automatically choose a suitable base image
When building some command dynamically through KUBE_CGO_OVERRIDES, the base
image for that command must provide a libc which matches what the command was
compiled against. If the runtime libc is too old, then it might not have the
right ABI (missing symbols or wrong version of those symbols).

A user or job shouldn't need to know which of the different Kubernetes images
is the right one, therefore the build scripts now use the same image that was
previously only used for kube-proxy also for other commands if they get build
dynamically. This does not increase the maintenance effort because a single
image bump remains sufficient and for e.g. a kind cluster it doesn't matter
that the kube-proxy base image is slightly larger than necessary for the other
commands - it only needs to be present once in the node image.
2025-09-12 12:12:26 +02:00
Yevhen Dubovskoi
3da372354d add fake-registry-server command to agnhost
* command run the limited subset of OCI API and serve static
images from the registry (which are pre-loaded when building an image)
* add pause version to zeitgeist rule for agnhost
* bump version of agnhost to 2.57
2025-09-10 23:31:22 +00:00
Kubernetes Prow Robot
5dff07fdf9 Merge pull request #133837 from saschagrunert/cni-plugins
Update CNI plugins to v1.8.0
2025-09-03 07:53:15 -07:00
Patrick Ohly
23362e001c build: support -race in binaries
Since a few releases, Go supports `go build -race` and then produces
binaries which do data race detection when invoked. Some changes are needed to
enable using this in a kind cluster:

- `-race` must be passed when building dynamically linked binaries.
  Only those support -race because CGO is required.
  To avoid adding yet another env variables, the existing KUBE_RACE
  gets used to convey the intent.
- KUBE_RACE must be passed into the dockerized build.
- Logging the base image of a release image makes it easier
  to figure out whether the binary has a chance to run.

The base image is important because dynamically linked binaries need a base
image with libc. By default, control plane components are linked statically,
so users need to explicitly override the defaults:

    KUBE_RACE=-race KUBE_CGO_OVERRIDES="kube-apiserver kube-controller-manager kube-scheduler" KUBE_GORUNNER_IMAGE=gcr.io/k8s-staging-test-infra/kubekins-e2e:v20250815-171060767f-master kind build node-image ...

KUBE_GORUNNER_IMAGE changes the base image for kube-apiserver,
kube-controller-manager and kube-scheduler. The kubekins image was picked for
this example because a Prow job definition already uses it. Reusing
it in a job avoids the need to maintain another image definition.

Running conformance tests against such a cluster with alpha+beta features
enabled revealed one new data race:

    $ kubectl logs -n kube-system kube-controller-manager-kind-control-plane
    ...
    WARNING: DATA RACE
    Write at 0x00c00019a730 by goroutine 216:
    k8s.io/client-go/tools/leaderelection.(*LeaderElector).setObservedRecord()
         k8s.io/client-go/tools/leaderelection/leaderelection.go:529 +0x179
    k8s.io/client-go/tools/leaderelection.(*LeaderElector).tryCoordinatedRenew()
         k8s.io/client-go/tools/leaderelection/leaderelection.go:367 +0x5ca
    ...
2025-09-02 16:32:09 +02:00
Sascha Grunert
f0be916f7a Update CNI plugins to v1.8.0
Signed-off-by: Sascha Grunert <sgrunert@redhat.com>
2025-09-02 08:39:57 +02:00
Kubernetes Prow Robot
546519987d Merge pull request #132288 from thevilledev/chore/coredns-v1.12.2
chore: update CoreDNS to v1.12.3
2025-08-28 06:55:10 -07:00
Kubernetes Prow Robot
2cbd5a6a92 Merge pull request #133718 from BenTheElder/codegen-rsync
build: discourage expanding dependency on rsync, eliminate some unnecessary filters
2025-08-27 20:24:42 -07:00
Benjamin Elder
5a718ca28c remove stale Godeps filter from rsync 2025-08-26 18:24:24 -07:00
Benjamin Elder
d4e1d13480 add note about not adding to rsync invocations 2025-08-26 18:10:33 -07:00
Benjamin Elder
33a58e4bef stop excluding GOPATH from rsync
we aim to eliminate the rsync in favor of a bind mount eventually, adding new filters makes this harder
2025-08-26 18:10:32 -07:00
Sascha Grunert
e792dcb810 Update cri-tools to v1.34.0
Signed-off-by: Sascha Grunert <sgrunert@redhat.com>
2025-08-21 10:11:08 +02:00
Carlos Panato
020b7052ca Bump dependencies, images and versions used to Go 1.24.6 and distroless iptables
Signed-off-by: Carlos Panato <ctadeu@gmail.com>
2025-08-14 09:46:06 +02:00