Commit Graph

10594 Commits

Author SHA1 Message Date
Benjamin Elder
563d4d651c bump go language version to 1.25 2025-09-17 14:56:07 -07:00
Davanum Srinivas
6dbc13fd13 Bump to go1.25.1 based images 2025-09-16 22:42:29 -04:00
Patrick Ohly
aefd2effc5 test: automatically lower Ginkgo parallelism when using race detection
When race detection is enabled, merely running 25 e2e.test instances was too much
and the OOM killer shut down the Prow test pod because of the memory overhead.

A CI job could control that via GINKGO_PARALLEL_NODES, but we should also have
saner defaults which take this into account.
2025-09-16 20:25:53 +02:00
Kubernetes Prow Robot
d1af46054f Merge pull request #133605 from JoelSpeed/enable-conditions-kal
Enforce API conventions around Conditions fields via Kube API Linter
2025-09-16 08:08:13 -07:00
Kubernetes Prow Robot
b40d570248 Merge pull request #133988 from bart0sh/PR199-migrate-kubelet-certificate-to-contextual-logging
migrate kubelet/certificate to contextual logging
2025-09-16 02:24:12 -07:00
Joel Speed
d2ba13dac9 Add exceptions for existing issues for conditions linter 2025-09-12 18:07:54 +01:00
Joel Speed
894d724f98 Enable conditions linter for Kube API Linter 2025-09-12 18:06:55 +01:00
Joel Speed
e3b08f9871 Update KAL to latest and add shadow config for new options 2025-09-12 18:06:17 +01:00
Joe Betz
cfbe326e3a Enable openapi model name accessor generator
Signed-off-by: Joe Betz <jpbetz@google.com>
2025-09-10 15:52:58 -04:00
Kubernetes Prow Robot
bbd859808d Merge pull request #133921 from dims/update-prometheus-client-golang-and-common-packages
update prometheus' client_golang and common packages
2025-09-10 08:40:06 -07:00
Ed Bartosh
bf0429ed07 migrate kubelet/certificate to contextual logging 2025-09-10 12:33:33 +03:00
Kubernetes Prow Robot
f26c1326e2 Merge pull request #133957 from bart0sh/PR199-migrate-server-to-contextual-logging
Migrate kubelet/server to contextual logging
2025-09-09 19:29:57 -07:00
Davanum Srinivas
bdfca587f4 update prometheus' client_golang and common packages 2025-09-09 15:43:08 -04:00
Patrick Ohly
9b696ff58c build: also support KUBE_RACE for test binaries
This is relevant for building e2e.test in
pull-kubernetes-e2e-kind-alpha-beta-features-race: if it contains data races,
tests might be flaky.
2025-09-09 17:10:10 +02:00
Ed Bartosh
b276c96ef8 Migrate kubelet/server to contextual logging 2025-09-09 12:49:42 +03:00
Monis Khan
801ee44163 Validate kubelet serving cert in local-up-cluster
Signed-off-by: Monis Khan <mok@microsoft.com>
2025-09-08 16:12:21 -04:00
Kubernetes Prow Robot
3b687533aa Merge pull request #133217 from bart0sh/PR187-migrate-utils-logs-to-contextual-logging
Kubelet: Migrate util/ and logs/ to contextual logging
2025-09-05 14:37:34 -07:00
Kubernetes Prow Robot
078a8f1894 Merge pull request #130581 from zhifei92/migrate-kubelet-config-to-contextual-logging
chore(kubelet):  migrate config to contextual logging
2025-09-05 05:25:26 -07:00
Omer Aplatony
d75d4860e7 kubelet: migrate module logs to contextual logging
Signed-off-by: Omer Aplatony <omerap12@gmail.com>
Co-authored-by: Ed Bartosh <eduard.bartosh@intel.com>
2025-09-05 13:22:00 +03:00
Omer Aplatony
9c1cf79d74 kubelet: migrate utils to contextual logging
Signed-off-by: Omer Aplatony <omerap12@gmail.com>
Co-authored-by: Ed Bartosh <eduard.bartosh@intel.com>
2025-09-05 13:19:56 +03: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
Kubernetes Prow Robot
d9df4ecff7 Merge pull request #133834 from pohly/build-data-race-detection
build: support -race in binaries
2025-09-03 00:11:13 -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
e992d3948e Merge pull request #133588 from pohly/test-integration-timeout
hack: more output about running tests
2025-09-01 22:43:26 -07:00
Kubernetes Prow Robot
47bbe32cb6 Merge pull request #132478 from pohly/test-verify-images
verify-e2e-images.sh enhancements
2025-09-01 22:43:19 -07:00
Sascha Grunert
ea02ce5b60 Update protobindings scripts to drop gogo paths
Cleanup the available scripts to remove unused code paths after all
gogo references have been migrated to native protobuf.

Signed-off-by: Sascha Grunert <sgrunert@redhat.com>
2025-09-01 09:35:20 +02:00
Kubernetes Prow Robot
d5065bdf19 Merge pull request #133430 from liggitt/json-patch-v4-errors
bump gopkg.in/evanphx/json-patch.v4
2025-08-30 07:17:08 -07:00
Kubernetes Prow Robot
b8257c1667 Merge pull request #133699 from pohly/log-check-update
hack/logcheck.conf: add several converted packages
2025-08-29 08:17:16 -07:00
Kubernetes Prow Robot
cb67d10970 Merge pull request #133026 from saschagrunert/dra-proto
Convert `k8s.io/kubelet/pkg/apis/dra` from gogo to protoc
2025-08-29 08:17:09 -07:00
Kubernetes Prow Robot
d70f058f9f Merge pull request #132407 from skitt/mockery-v3
Bump to mockery v3
2025-08-29 07:03:09 -07:00
Stephen Kitt
81cec6df1d Bump to mockery v3
mockery has introduced breaking changes and switched to a v3 branch,
this migrates to that, mostly using the built-in migration tool. Mocks
are now generated in single files per package, except in packages
containing mocks for multiple interface packages (in
pkg/kubelet/container/testing).

Signed-off-by: Stephen Kitt <skitt@redhat.com>
2025-08-29 13:43:54 +02:00
Sascha Grunert
fd2d2fd66f Convert k8s.io/kubelet/pkg/apis/dra from gogo to protoc
Use standard protoc for the dra instead of gogo.

Part of kubernetes#96564

Signed-off-by: Sascha Grunert <sgrunert@redhat.com>
2025-08-29 09:40:51 +02:00
Jordan Liggitt
9f8d9432e2 bump gopkg.in/evanphx/json-patch.v4 2025-08-29 00:31:11 -04:00
Benjamin Elder
e5f4caf62a drop spammy xtrace from hack/test scripts
this shouldn't be set when sourcing install-etcd.sh, which has a lot of non-trivial shell to log

we can leave it when it just logs the test commands
2025-08-28 12:21:01 -07:00
Stephen Kitt
684473af62 Bump cadvisor to 0.53
This brings a few fixes, drops github.com/pkg/errors (as a direct
dependency), and bumps many transitive dependencies. The
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp bump to
v0.61.0 breaks "k8s.io/kubernetes/test/integration/apiserver: tracing"
consistently, so it's held back for now.

github.com/containerd/containerd/api pulls in gopkg.in/yaml.v3 so that
needs to be added to the exceptions in unwanted-dependencies.json.

Signed-off-by: Stephen Kitt <skitt@redhat.com>
2025-08-28 09:20:21 +02: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
Kubernetes Prow Robot
22a567ac31 Merge pull request #133571 from BenTheElder/deprecated-missing-oh-no
fix many incorrect deprecation warnings in godoc, enable deprecatedComment linter
2025-08-27 18:30:53 -07:00
Kubernetes Prow Robot
ba8b1a3edb Merge pull request #133475 from aramase/aramase/c/better_logging_credential_provider
Migrate pkg/credentialprovider to structured logging
2025-08-27 18:29:54 -07:00
Kubernetes Prow Robot
1dc1fc6637 Merge pull request #133322 from liggitt/diffproto
Add helper command for comparing protobuf files
2025-08-27 17:17:27 -07:00
Kubernetes Prow Robot
bc42fb473e Merge pull request #133315 from kei01234kei/use_go_tool_instead_of_tools_go_without_sharing_dependency
Use the tool directive instead of tools.go without sharing dependency in hack/tools
2025-08-27 16:06:55 -07:00
Kubernetes Prow Robot
346a49599e Merge pull request #133287 from ahmedtd/disable-ci-lint-check
golangci: Disable staticcheck QF1008 in hints
2025-08-27 16:06:33 -07:00
Benjamin Elder
8512862161 cleanup tempdirs on exit in kube::verify::generated 2025-08-26 18:10:33 -07:00
Patrick Ohly
4fa6c70604 hack/logcheck.conf: add several converted packages
Several packages in `pkg` already have no log calls which need to be
updated. Adding them to the logcheck.conf prevents regressions.
2025-08-26 09:31:57 +02:00
Benjamin Elder
b9d5edd444 remove stray strailing tabs from gocritic settings 2025-08-18 11:22:40 -07:00
Benjamin Elder
535b4e07e9 enable gocritic deprecatedComment check to help lint for malformed deprecation comments 2025-08-18 11:22:08 -07:00
Patrick Ohly
0b647319c4 hack: more output about running tests
set -x/+x wraps setting relevant configuration variables to debug how and where
they get sets. The final gotestsum invocation gets logged in addition to being
run.
2025-08-18 14:33:57 +02:00
Lukasz Szaszkiewicz
cb1d04655f test-integration: set KUBE_PANIC_WATCH_DECODE_ERROR to false 2025-08-13 13:32:44 +02:00
Anish Ramasekar
39e7b2ce5e Migrate pkg/credentialprovider to structured logging
Signed-off-by: Anish Ramasekar <anish.ramasekar@gmail.com>
2025-08-11 16:41:55 -07:00
Keisuke Ishigami
a2061e97f4 install appropriate version 2025-08-03 01:47:34 +09:00