184 Commits

Author SHA1 Message Date
kubernetes-prow[bot]
af82d41a6c Merge pull request #137536 from aojea/nft_netlink
kube-proxy: Enable netlink support for nftables mode by default
2026-07-22 20:15:47 +00:00
Antonio Ojea
fba8b7408d use latest knftables library
Change-Id: I1a750980e883dbda7188dd231b13bcba6efd1f80
2026-07-22 17:31:13 +00:00
Patrick Ohly
15a0bbcc47 dependencies: cel-go v0.29.2
There may be some useful enhancements in
https://github.com/cel-expr/cel-go/releases/tag/v0.28.0 and
https://github.com/cel-expr/cel-go/releases/tag/v0.29.0, but primarily the goal
is to get https://github.com/cel-expr/cel-go/pull/1357 (included in v0.29.0)
because that is a relevant performance improvement for how DRA uses CEL.

Updating to >= v0.28.1 is safe, in contrast to v0.28.0, because v0.28.1 includes
https://github.com/cel-expr/cel-go/pull/1303 and therefore doesn't trigger
https://github.com/kubernetes/kubernetes/issues/138334.

As explained by Tristan
Swadell (https://github.com/kubernetes/kubernetes/pull/140205#issuecomment-4877100299),
startsWith now scales to the size of the substring rather than the target
string, which changes some of the cost estimates. In another case, the
substring has to be made larger to trip an expected cost budget error.
2026-07-22 10:53:08 +02:00
Damien Grisonnet
4f01955a87 kubelet/cadvisor: disable container discovery when using CRI stats
When the container runtime provides stats via CRI, cAdvisor only needs
to track the root container for node-level resource and filesystem
metrics. Set DisableContainerDiscovery on the cAdvisor manager to skip
plugin initialization, cgroup watchers, and subcontainer scanning in
that mode.

Signed-off-by: Damien Grisonnet <dgrisonn@redhat.com>
2026-07-15 14:51:05 +02:00
Davanum Srinivas
c2e122037d bump github.com/google/cadvisor/lib from v0.60.3 to v0.60.4
The new cadvisor version requires newer golang.org/x modules. Module
version selection raised crypto, mod, net, sync, sys, term, text, and
tools. golang.org/x/net moves from a pseudo-version to the v0.57.0
release, which includes the http2 fixes the pseudo-version pointed at.

cadvisor/lib no longer depends on github.com/gogo/protobuf. This change
removes cadvisor/lib from the gogo/protobuf dependants list in
hack/unwanted-dependencies.json.
2026-07-10 08:24:03 +05:30
Davanum Srinivas
0e1f1daae1 kubelet: read OOM events in-tree and drop the cadvisor oomparser dependency
The kubelet used cadvisor's lib/utils/oomparser to watch the kernel log for
OOM kills and to produce the container_oom_events_total metric. That made the
kubelet depend on the cadvisor lib module for OOM handling.

This moves OOM handling in-tree:

- The OOM kill parser is forked from cadvisor into
  third_party/forked/cadvisor/oomparser. It reads /dev/kmsg and extracts OOM
  events, adapted to take a context.Context and log through klog.
- The kmsg reader is forked from github.com/euank/go-kmsg-parser into
  third_party/forked/go-kmsg-parser/kmsgparser.
- The kubelet OOM watcher reads OOM events through the forked parser and
  records the container_oom_events_total metric in-tree.
- cadvisor/lib is bumped to v0.60.3, which no longer ships the OOM parser.
  This removes the transitive github.com/euank/go-kmsg-parser
  v2.0.0+incompatible dependency and the vendored cadvisor lib/utils/oomparser
  package.

Behavior is unchanged. OOM events are still emitted and the metric still
reports the same counts.
2026-06-26 20:35:19 -04:00
Davanum Srinivas
0c61430054 kubelet: adopt lib/model pointer sub-stats and restore the stats nil-checks
github.com/google/cadvisor/lib v0.60.2 models the per-subsystem container
stats (Cpu, Memory, Network, DiskIo, Processes) as pointers, so a nil
again distinguishes "not collected" from a collected zero. Restore the
kubelet's original nil-checks in helper.go and cadvisor_stats_provider.go
(now equivalent to the pre-lib code), adapt the test fixtures and winstats
to build pointer sub-stats, and bump the vendored lib to v0.60.2.

Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2026-06-24 13:46:45 -04:00
Davanum Srinivas
f451aa0762 kubelet: depend on github.com/google/cadvisor/lib
Migrate the kubelet (and the kube-proxy conntrack helper) off the full github.com/google/cadvisor module onto the lean github.com/google/cadvisor/lib: repoint info/v1+info/v2 type usage to lib/model and the manager/fs/cache/etc. consumers to lib/*; regenerate the cadvisor.Interface mocks; keep the kubelet-pinned cAdvisor global flags via lib/cadvisorflags.

go.mod: require + replace github.com/google/cadvisor/lib (=> the dims/cadvisor/lib fork for now, until lib is tagged) and drop the full github.com/google/cadvisor module entirely; keep github.com/containerd/containerd/api at v1.11.0 (matching upstream master); add github.com/google/cadvisor to unwanted-dependencies.json unwantedModules so the full module cannot be re-vendored.

test/e2e_node: the one remaining consumer of the full module -- the node-e2e ResourceCollector, which used the v2 HTTP client (client/v2) + v2 API types (info/v2) -- now scrapes the standalone cAdvisor pod's /api/v2.1/stats directly over HTTP+JSON, so test/e2e_node depends on no cAdvisor package. No change to the kubelet's stats surfaces.
2026-06-20 17:27:16 -04:00
Stephen Kitt
8f971144d0 Bump cadvisor to 0.57.0
This adds container creation timestamps.

Signed-off-by: Stephen Kitt <skitt@redhat.com>
2026-05-19 11:42:44 +02:00
Benjamin Elder
686a126f69 hack/update-vendor.sh 2026-04-24 19:38:58 -07:00
Davanum Srinivas
09fbff5735 Update github.com/google/cel-go v0.26.0 -> v0.27.0
Bump cel-go to v0.27.0 to pick up the fix for context cancellation
error reporting that's breaking CI (see #138334).

Changes worth noting:
- cel-go switched from gopkg.in/yaml.v3 to go.yaml.in/yaml/v3,
  so removed it from the gopkg.in/yaml.v3 unwanted references
- Dropped transitive dep github.com/stoewer/go-strcase
- Updated transitive dep github.com/antlr4-go/antlr/v4
- Pinned cel-go at v0.27.0 in hack/unwanted-dependencies.json

Kubernetes-commit: <drop>
2026-04-13 08:53:35 -04:00
Humble Devassy Chirammal
600d188f2b dependencies: bump gomega to v1.39.1 and ginkgo to v2.28.1 2026-02-27 18:44:36 +05:30
Davanum Srinivas
050c786014 Update vendored dependencies: cadvisor, containerd, runtime-spec, selinux
Update the following vendored dependencies:

- github.com/google/cadvisor: v0.55.1 -> v0.56.0
- github.com/containerd/containerd/api: v1.9.0 -> v1.10.0
- github.com/opencontainers/runtime-spec: v1.2.1 -> v1.3.0
- github.com/opencontainers/selinux: v1.13.0 -> v1.13.1

cadvisor v0.56.0 changes:
- Add s390x (IBM Z/mainframe) CPU topology support with NumBooks and
  NumDrawers fields in MachineInfo
- Add new Prometheus metrics: machine_cpu_books and machine_cpu_drawers
- Add standard deviation (Std) field to Percentiles for resource statistics
- Add sysfs constants CPUBookID and CPUDrawerID for s390x topology detection

containerd/api v1.10.0 changes:
- Add ActiveMount message type for tracking mounts with timestamps
- Add ActivationInfo message for mount management and lifecycle tracking

runtime-spec v1.3.0 changes (from ChangeLog):
- Add FreeBSD platform support with new Spec.FreeBSD field
- Add netDevices object for moving network devices to container namespaces
- Add memoryPolicy object for NUMA memory policy configuration
- Add hwConfig object for VM-based containers (vcpus, memory, device-tree)
- Add iomems for hardware I/O memory page access in VMs
- Add intelRdt.schemata and intelRdt.enableMonitoring fields
- Change LinuxPids.Limit to pointer type for optional handling
- Clarify intelRdt configuration and pids cgroup settings

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2026-01-15 10:26:13 -05:00
Davanum Srinivas
95cf1f264d Update to github.com/google/cadvisor v0.55.1
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2025-12-21 08:13:06 -05: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
koba1t
ee8ef383be Update kubectl kustomize to kyaml/v0.20.1, cmd/config/v0.20.1, api/v0.20.1, kustomize/v5.7.1 2025-07-23 22:37:19 +09:00
Cici Huang
cedcbfb94c Update cel-go to v0.26.0 2025-07-17 20:09:03 +00:00
Jefftree
d04ee27c98 Update vendor 2025-07-01 15:23:58 +00:00
Josh Gwosdz
7a24c4ce5d chore: update github.com/google/cel-go dependency to v0.25.0
Signed-off-by: Josh Gwosdz <jgwosdz@redhat.com>
2025-04-25 10:07:12 +02:00
Tim Hockin
0ce4268b1f Vendor randfill 2025-03-08 15:21:58 -08:00
Davanum Srinivas
97a54dc4b0 update to v1.22.0-rc.0
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2025-03-07 13:45:34 -05:00
Davanum Srinivas
5ecddb6571 update to latest cadvisor @ v0.52.0
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2025-03-05 06:36:39 -05:00
Cici Huang
c1e0443232 Bump cel-go to v0.23.2. 2025-02-03 18:06:51 +00:00
Alvaro Aleman
a97ed3c98b Update github.com/google/btree 2025-01-03 07:31:23 -05:00
Jefftree
3269f4bb94 bump kube-openapi 2024-12-13 20:50:49 +00:00
Joe Betz
b0180a9a37 hack/pin-dependency.sh github.com/google/cel-go v0.22.0 2024-11-06 15:53:17 -05:00
carlory
80b1a29786 dependencies: ginkgo v2.21.0, gomega v1.35.1 2024-11-01 11:35:24 +08:00
Davanum Srinivas
152d342a8d Update to latest cadvisor
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2024-10-30 15:25:21 -04:00
Cici Huang
80c0c2c32e Update cel-go to v0.21.0 2024-10-02 17:15:58 +00:00
Kirtana Ashok
3fba9930b7 Update cadvisor and hcsshim versions
Signed-off-by: Kirtana Ashok <kiashok@microsoft.com>
2024-09-22 11:50:45 -07:00
Davanum Srinivas
ff7942be83 update OpenTelemetry dependencies and grpc
This update dropped the otelgrpc → cloud.google.com/go/compute dependency,
among others. This dropped out because genproto cleaned up it's dependencies
on google cloud libraries, and otel updated - details in #113366.

Signed-off-by: Davanum Srinivas <davanum@gmail.com>
Co-Authored-By: David Ashpole <dashpole@google.com>
2024-07-05 21:21:30 -04:00
David Ashpole
e94047c900 Revert "update OpenTelemetry dependencies"
This reverts commit 82e9ce79c7.
2024-06-26 14:13:33 +00:00
David Ashpole
82e9ce79c7 update OpenTelemetry dependencies 2024-06-23 15:35:26 +00:00
Patrick Ohly
37e2dd6857 dependencies: ginkgo v2.19.0, gomega v1.33.1
Ginkgo v2.18.0 allows tweaking the output so that
it's easier to follow while a job runs in
Prow (https://github.com/onsi/ginkgo/issues/1347). Using this in
hack/ginkgo-e2e.sh will follow in a separate commit.

Gomega gets bumped to the latest release to keep it up-to-date.

Ginkgo v1.19.0 adds support for --label-filter with labels that represent
sets (like our Feature:<Foo>).
2024-05-27 15:25:50 +02:00
Davanum Srinivas
bf268f02a3 Remove gcp in-tree cloud provider and credential provider
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2024-05-01 09:03:53 -04:00
Marek Siarkowicz
3e5b03eb43 Upgrade etcd libraries to v3.5.13
Add otelgrpc.WithMessageEvents(otelgrpc.ReceivedEvents, otelgrpc.SentEvents) to tracing options due to https://github.com/open-telemetry/opentelemetry-go-contrib/pull/3964
2024-04-24 09:56:39 +02:00
Jiahui Feng
350fcf957e generated: ./hack/update-vendor.sh 2024-04-22 10:54:32 -07:00
Kubernetes Prow Robot
df366107d1 Merge pull request #123529 from thockin/go-workspaces
Go workspaces for k/k and k/staging/*
2024-03-01 08:43:03 -08:00
David Porter
c05e541793 Bump cAdvisor to v0.49.0
Signed-off-by: David Porter <david@porter.me>
2024-02-29 14:21:49 -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
Joe Betz
d49949b642 Bump cel-go to v0.17.8 to pick up CEL estimated cost fix 2024-02-28 10:52:36 -05:00
Davanum Srinivas
8b9fc325e2 Update to new cadvisor v0.48.1
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2023-10-31 14:30:54 -04:00
Cici Huang
70c1f2143f Bump cel-go to v0.17.7 2023-10-30 19:08:22 +00:00
carlory
760abc2a82 bump gomega to 1.29.0 2023-10-27 12:51:56 +08:00
Davanum Srinivas
702d911e22 working-config-otel
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2023-10-25 16:31:21 -04:00
Joe Betz
1a850a0063 Bump cel-go to v0.17.6 2023-08-23 17:31:20 -04:00
Joe Betz
69a5a52896 Bump cel-go to v0.16.1 2023-08-07 15:51:36 -04:00
Itamar Holder
f22aa42aa8 bump go.mod cadvisor to v0.47.3
Signed-off-by: Itamar Holder <iholder@redhat.com>
2023-07-11 17:22:33 +03:00
Harshal Patil
409bc8ccc0 deps: Bump to cAdvisor v0.47.2
Signed-off-by: Harshal Patil <harpatil@redhat.com>
2023-06-20 15:08:29 -04:00
Jefftree
1993a4cb37 vendor 2023-06-02 14:34:25 +00:00