11216 Commits
Author SHA1 Message Date
kubernetes-prow[bot] 5d4de34f9e Merge pull request #143406 from mengqiy/objcompress1
Add a storage compression value transformer and its configuration
2026-11-06 02:52:24 +00:00
David Yu 6b009f670d Trim compression duration buckets and split unframed read outcomes
compression_duration_seconds now tops out near 82ms instead of 2.6s.
Unframed reads outside the size limits get the same outcome as writes.
2026-11-05 21:10:48 +00:00
Tim Allclair be90f569f3 Remove InPlacePodVerticalScaling feature gate
The InPlacePodVerticalScaling feature gate has been GA and locked to
true since v1.35, and is now removed. Code paths that handled the
disabled state are removed, along with gate overrides in tests.

The node version skew check in pod resize validation is also removed:
the oldest kubelet supported by a v1.38 apiserver is v1.35, where the
feature is always enabled.
2026-11-05 19:26:45 +00:00
David Yu fd0d4b000e Address review feedback on storage compression
WithCompression takes a per-resource Rule under one fixed 1472Ki limit,
and the reader rejects trailing bytes and padded lengths. The v1alpha1
types get declarative validation and API defaulting, with the top-level
list renamed compressionResources and encryption's validation untouched.
2026-11-04 10:01:04 +00:00
Sascha Grunert 44dfc921ce Add the OCI seccomp profile type behind SecurityProfileOCI
Add seccompProfile.type OCI with the oci field (a digest-pinned ref and an
optional RuntimeDefault or Localhost baseProfile) and the alpha
SecurityProfileOCI feature gate, as described in KEP-6061. The oci field
is validated declaratively, with custom validators for the reference and
the base profile path; the gate check and the rule that privileged
containers cannot use an OCI profile stay handwritten. While the gate is
disabled the type is rejected unless the old object already uses it.
PodSecurity baseline and restricted keep rejecting OCI. The
SecurityProfileOCI node declared feature keeps pods with OCI profiles on
nodes whose kubelet has the gate enabled and a runtime that supports OCI
seccomp profiles. The field is named ref instead of the KEP's reference,
following the kube-api-linter naming convention for new fields.

Signed-off-by: Sascha Grunert <sgrunert@redhat.com>
2026-11-04 07:21:35 +01:00
kubernetes-prow[bot] e600911dc5 Merge pull request #143581 from yongruilin/dv-linter
kube-api-linter: forbid +k8s:customValidation in API types
2026-11-03 19:36:53 +00:00
kubernetes-prow[bot] fd24d63c4f Merge pull request #143721 from dims/bump-prometheus-common-v0.73.1
Bump prometheus/common to v0.73.1
2026-11-03 14:41:06 +00:00
kubernetes-prow[bot] 98687f28e4 Merge pull request #142664 from romanbaron/opportunistic-batching-metrics
Fix opportunistic batching metric accounting
2026-11-02 21:18:01 +00:00
Davanum Srinivas 787dd27af4 Bump prometheus/common to v0.73.1
Pulls in github.com/pandatix/go-abnf (OpenMetrics decoder in expfmt),
pinned to v0.5.5 for the long-line decoding fix (prometheus/common#1028).
v0.73.0 is skipped: its go-abnf v0.5.1 requires the blocklisted
hashicorp/go-uuid.

Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2026-11-02 16:06:23 -05:00
kubernetes-prow[bot] 91120257fc Merge pull request #143618 from skitt/update-tools-go1.27
hack/update-tools.sh: handle Go 1.27 go tool output format
2026-11-02 15:47:47 +00:00
Roman Baron b26420d58b scheduler: fix opportunistic batching metric accounting
Signed-off-by: Roman Baron <romanb@nvidia.com>
2026-11-01 10:57:41 +02:00
kubernetes-prow[bot] f6aff877d8 Merge pull request #141732 from bgee/prequeueinghint-followup
scheduler: promote PreQueueingHint to beta and fix narrowing bugs
2026-10-30 17:47:45 +00:00
Stephen Kitt bedc70cd7f Handle Go 1.27 go tool output format
go tool's output format changed with Go 1.27; it now shows

command (module)

This updates hack/update-tools.sh to handle the new format.

Signed-off-by: Stephen Kitt <skitt@redhat.com>
2026-10-30 16:05:56 +01:00
Bi Ge e149add730 scheduler: fix PreQueueingHint narrowing bugs
Fix correctness bugs in the PreQueueingHint narrowing added in
879f922f6b.

Add an evaluateAllPods field to preQueueingHintPodKeys to distinguish
1) some plugins want all pods evaluated while others narrow, from
2) all pods must be evaluated for all plugins.

Before, a PreQueueingHintFn that returned AllPods or an error made
runPreQueueingHintPlugins return nil, which always meant (2). A plugin
without a PreQueueingHintFn was skipped, so another plugin's narrowing
could drop pods that only the skipped plugin would requeue.

Cases handled:

1. A plugin with no PreQueueingHintFn is treated as AllPods: set
evaluateAllPods, so its pods are evaluated for it while other plugins
narrow.

2. A PreQueueingHintFn error falls back to AllPods for that plugin only;
other plugins' narrowing is preserved.

3. A plugin returning AllPods sets evaluateAllPods without discarding
other plugins' narrowing.

4. A plugin can have several registrations matching an event, in one or
more profiles, and perPlugin is keyed by plugin name. If any of them
needs all pods, that plugin is not narrowed for the event.

Also skip PreQueueingHint entirely when CompositePodGroup is enabled,
instead of running the hints and discarding the result. Report
PreQueueingHintFn errors, and pod lookup failures other than NotFound,
with HandleErrorWithLogger. Add the prequeueing_hint_fn_error value to
the result label of scheduler_pre_queueing_hint_evaluations_total (now
constants), and update its help text and the generated metrics
documentation. Plugins without a PreQueueingHintFn are not recorded.

Update the PreQueueingHintFn and PreQueueingHintResult API docs: the
hint runs per matching registration, and narrowing is per plugin.

Add unit tests for each case, the result label values, multi-profile
narrowing, and group preCheck.

KEP: kubernetes/enhancements#6132
2026-10-30 14:06:42 +00:00
kubernetes-prow[bot] f2a57ac2b9 Merge pull request #142610 from weizhoublue/fix/pr-142401-3023170-26373
local-up-cluster: Add curl TLS prerequisite validation for ML-DSA
2026-10-30 05:59:37 +00:00
Yongrui Lin 70c77cef7f kube-api-linter: forbid +k8s:customValidation in API types
Validation in API types should use declarative tags. Existing uses are
listed as exceptions.
2026-10-29 22:22:16 +00:00
kubernetes-prow[bot] 9afc3e1aa4 Merge pull request #143086 from pohly/logcheck-update
logcheck v0.11.0 update + fixes
2026-10-29 12:00:54 +00:00
kubernetes-prow[bot] c6493f0226 Merge pull request #137313 from tico88612/cleanup/test-instrumentation-dep-prometheus
Cleanup: test instrumentation dependency prometheus
2026-10-29 12:00:44 +00:00
Patrick Ohly 7bec3d14e0 update logcheck to v0.11.0, fix new findings
The updated logcheck now warns about passing a pointer as value where String
could crash if nil. The new findings are false positives, but there have been
real issues before and adding klog.SafePtr is cheap mitigation for false
positives.

The HandleError* wrappers around contextual logging are now annotated such that
the new logcheck knows that they do contextual logging. This revealed some real
issues (expecting printf-style formatting or missing keys, passing a *function*
instead of the function result).
2026-10-29 11:09:47 +01:00
kubernetes-prow[bot] 8840cef218 Merge pull request #143283 from michaelasp/controller-client-builder
controller-manager: deprecate Config and ConfigOrDie from ControllerClientBuilder
2026-10-29 07:18:44 +00:00
kubernetes-prow[bot] 4afe6a2ed9 Merge pull request #143022 from skitt/stop-installing-tools
Track more tools as Go tools
2026-10-29 01:09:04 +00:00
Michael Aspinwall 9f7be5e876 controller-manager: deprecate ControllerClientBuilder.Config and ConfigOrDie
A raw rest.Config lets a controller build a client that bypasses the
client configuration and transport wrappers the controller manager
applies to the clients it builds, such as the leader election write gate
of KEP-6361. Deprecate Config and ConfigOrDie on ControllerClientBuilder
and on the cloud-provider copy of the interface; out-of-tree cloud
providers and controller managers that call them keep working, and the
configs they get still carry the controller manager's wrappers.

Add TypedClientBuilder, implemented by both in-tree builders, with the
clients controllers were building from raw configs: metadata, dynamic
and scale clients, WithRateLimits for controllers that need more QPS and
burst than the defaults, and WithDropManagedFields for the informer
clients. The controller managers hand the builder to their controllers,
and a forbidigo rule keeps in-tree code off the deprecated methods. Unit
tests cover the derived builders on both implementations.

DiscoveryClient's discovery-tuned limits become a floor rather than an
override, so a builder configured with higher limits keeps them; the
storage version migrator relies on that for its discovery client.

The HPA metrics and apiextensions clients still need a config and are
built in one lint-exempted place in the controller context, since
k8s.io/controller-manager does not depend on those client packages.

DynamicControllerClientBuilder cached the composed WrapTransport, so the
base config's wrapper was applied twice to every client after the first
one built under a service account name. Cache only the token wrapper.
2026-10-28 14:29:22 -07:00
Cici Huang 4ce108bf64 Bump cel-go to v0.33.0 and update dependencies 2026-10-28 18:43:37 +00:00
Stephen Kitt 706a0414b9 Bump to govulncheck 1.9.0
Signed-off-by: Stephen Kitt <skitt@redhat.com>
2026-10-28 18:29:23 +01:00
Stephen Kitt 8ffdbc7bfc Track govulncheck as a tool
This ensures that new upstream versions are made visible using
standard Go tools; it also avoids repeated "go install"s of the same
version of the tool.

Signed-off-by: Stephen Kitt <skitt@redhat.com>
2026-10-28 18:29:23 +01:00
Stephen Kitt d2967bc861 Track zeitgeist as a tool
This ensures that new upstream versions are made visible using
standard Go tools; it also avoids repeated "go install"s of the same
version of the tool.

Since the version of zeitgeist is tracked in hack/tools/go.mod, this
also removes the version tracking in zeitgeist's own
build/dependencies.yaml, and updates the introductory comment there.

Signed-off-by: Stephen Kitt <skitt@redhat.com>
2026-10-28 18:28:42 +01:00
Stephen Kitt a42c2e29b9 Track whydeadcode as a tool
This ensures that upstream changes aren't applied without review; it
also avoids repeated "go install"s of the same version of the tool.

Signed-off-by: Stephen Kitt <skitt@redhat.com>
2026-10-28 15:04:54 +01:00
ChengHao Yang ccdd13aaec Remove dep. Prometheus from test/integration/metrics/metrics_test.go
Add LabelValues in component-base/metric

Signed-off-by: ChengHao Yang <17496418+tico88612@users.noreply.github.com>
2026-10-28 11:42:16 +08:00
Yongrui Lin 627c2ac477 apiextensions: move the CRD API types to k8s.io/apiextensions-api
Add the k8s.io/apiextensions-api staging module and move the v1 and
v1beta1 types there. The old packages keep the conversions and alias the
moved identifiers in a generated deprecated.go.
2026-10-27 23:12:24 +00:00
kubernetes-prow[bot] bccf5c3611 Merge pull request #141959 from luxas/impl-conditional-authz-4
Conditional Authz [4/n]: Add conditional authz support to `kube-apiserver`
2026-10-27 19:41:19 +00:00
kubernetes-prow[bot] 9ac30b9c29 Merge pull request #143466 from skitt/publishing-bot-glog
Bump golang/glog to v1.2.5 in hack/tools
2026-10-27 16:33:38 +00:00
Stephen Kitt 8ef65551ac Bump golang/glog to v1.2.5 in hack/tools
govulncheck complains about publishing-verifier's use of glog:

The package pattern matched the following 2 root packages:
  k8s.io/kubernetes/hack/tools/publishing-verifier
  k8s.io/kubernetes/hack/tools/traceparse
Govulncheck scanned the following 6 modules and the go1.27.3 standard library:
  k8s.io/kubernetes/hack/tools
  github.com/golang/glog@v1.2.2
  golang.org/x/exp@v0.0.0-20260212183809-81e46e3db34a
  golang.org/x/mod@v0.41.0
  gopkg.in/yaml.v2@v2.4.0
  k8s.io/publishing-bot@v0.5.0

=== Symbol Results ===

Vulnerability #1: GO-2025-3372
    Vulnerability when creating log files in github.com/golang/glog
  More info: https://pkg.go.dev/vuln/GO-2025-3372
  Module: github.com/golang/glog
    Found in: github.com/golang/glog@v1.2.2
    Fixed in: github.com/golang/glog@v1.2.4
    Example traces found:
      #1: publishing-verifier/publishing-verifier.go:167:32: publishing.verifyPublishingBotRules calls config.LoadRules, which calls glog.Infof

=== Package Results ===

No other vulnerabilities found.

=== Module Results ===

No other vulnerabilities found.

Signed-off-by: Stephen Kitt <skitt@redhat.com>
2026-10-27 16:02:21 +01:00
Stephen Kitt 657a553aae Bump grpc to 1.85.0
This gets rid of a number of unwanted dependencies and updates x/net
too.

Signed-off-by: Stephen Kitt <skitt@redhat.com>
2026-10-27 10:59:54 +01:00
David Yu 536732e76d Add a storage compression value transformer and its configuration
storage/value/compression (KEP-6264) compresses objects ahead of any
encryption at rest, in frames with a 9-byte header and a CRC32C. Only a
checksum mismatch is value.IsDataCorruption, so a malformed frame can't
make an intact object eligible for unsafe deletion. Reads always decode
frames. Writes follow a StorageCompressionConfiguration whose resource
checks are shared with EncryptionConfiguration. Values over 1.5 MiB minus
64 KiB are never compressed, so anything compressed can be rewritten
uncompressed. The flag and storage wiring come later.
2026-10-27 03:17:27 +00:00
Lucas Käldström 7b20be8ae6 Add a WithConditionsAwareAuthorization HTTP filter together with AuthorizationConditionsEnforcer admission plugin 2026-10-26 22:08:06 +02:00
kubernetes-prow[bot] e96327d86b Merge pull request #143284 from tallclair/kubelet-error-metrics
kubelet: add sync_result_errors_total and pod_worker_errors_total metrics
2026-10-26 19:17:02 +00:00
Tim Allclair a8ff2e396c kubelet: add sync_result_errors_total and pod_worker_errors_total metrics
Add two alpha Kubelet error counter metrics per KEP-5972:
- kubelet_sync_result_errors_total (label: action) recorded in
  kubeGenericRuntimeManager.SyncPod for each failed SyncResult action or
  top-level PodSyncResult.SyncError (action="SyncPod").
- kubelet_pod_worker_errors_total (label: operation_type) incremented in
  podWorkerLoop when a sync iteration fails with a non-Canceled error.
2026-10-23 22:29:06 +00:00
Ivan Valdes 09048f5ccf Bump etcd 3.7.3 SDK 2026-10-23 10:55:18 -07:00
Dominik Marciński 674b5161f0 scheduler: Parametrize disruption metric by victim type and unify standalone and workload pod victims ordering (#142955)
* scheduler: rank pods from disruption mode Single groups as individual preemption victims

* scheduler: label preemption_workload_disruptions by victim type

Record workload preemption disruptions per preemption unit type (pod,
podgroup, compositepodgroup) instead of a single count of group-related
units.

- PreemptionVictim gains Type(); PreemptionCandidate replaces
  NumPodGroupDisruptions() with NumDisruptionsByVictimType().
- The unit type is the topmost DisruptionMode=All group, or pod for
  pods evicted on their own (standalone or in DisruptionMode=Single
  groups). isGroupVictim is removed.
- The metric stays workload-preemptor only: legacy pod preemption keeps
  its own metrics until naked pods move to the workload scheduling cycle.
2026-10-23 10:39:53 +00:00
kubernetes-prow[bot] 704de2671f Merge pull request #143319 from liggitt/cleanup-approvers
Cleanup inactive approvers
2026-10-22 19:56:00 +00:00
Dominik MarcińskiandAntoni Zawodny fe7019ffee scheduler: parameterize pod group scheduling attempts and latency metrics with entity type for compositepodgroup (#141823)
* scheduler: parameterize pod group scheduling attempt and latency metrics with type and profile

Parameterize pod group scheduling attempts, scheduling latency, and algorithm latency metrics with entity type ("podgroup" vs "compositepodgroup") and profile. Specifically:
- Export PodGroupScheduleAttempts and PodGroupSchedulingLatency with [result, profile, type] labels.
- Convert PodGroupSchedulingAlgorithmLatency to HistogramVec with [profile, type] labels.
- Update profile metrics helpers with entityType and add PodGroupAlgorithmLatency helper.
- Update scheduleOnePodGroup call sites to pass rootPodGroupInfo.Type() and profile name.
- Add unit tests in profile_metrics_test.go and schedule_one_podgroup_test.go.

* Address review comments

- Wait for the asynchronous binding cycle to finish before asserting
  attempt metrics.
- Add the child pod group result in the composite pod group case so the
  per-leaf loop actually runs.
- Drop the algorithm latency assertion: submitPodGroupAlgorithmResult
  does not record it, and TestPodGroupAlgorithmLatency covers it.
- Assert that only the root entity type is reported.

* scheduler: rename pod group scheduling metrics entity label from type to entity

* Update pkg/scheduler/metrics/profile_metrics_test.go

Co-authored-by: Antoni Zawodny <zawodny@google.com>

---------

Co-authored-by: Antoni Zawodny <zawodny@google.com>
2026-10-22 17:53:48 +00:00
Jordan Liggitt fbc5386508 Cleanup inactive approvers 2026-10-22 13:34:00 -04:00
kubernetes-prow[bot] 1abe3b6e32 Merge pull request #141778 from neoLsH/fix-126379-apiserver-contextual-logging
kube-apiserver: use contextual logging
2026-10-21 12:23:00 +00:00
neoLsH c02a142a8f kube-apiserver: use contextual logging 2026-10-21 17:12:58 +08:00
kubernetes-prow[bot] b87196a8eb Merge pull request #143223 from jianzhangbjz/metrics/device-health-state
kubelet: report device counts by resource and health state
2026-10-21 08:53:07 +00:00
Jian Zhang 9c8a9bafc0 kubelet: report device counts by resource and health state
The device manager already tracks how many devices it considers healthy
and unhealthy for each resource, and never reports it. The only
device-plugin metrics kubelet exposes are
device_plugin_registration_total and
device_plugin_alloc_duration_seconds, so from outside a node the single
observable symptom of devices going bad is allocatable shrinking --
which conflates three different causes: the plugin reported devices
unhealthy, the plugin deregistered, or the hardware is gone. An operator
cannot tell them apart from metrics alone.

Two cases motivate this concretely. A healthy device turning unhealthy
leaves node capacity unchanged, because capacity counts both sets and
only allocatable counts healthy devices, so the event is at best
inferable by diffing two other series. And a resource whose devices have
all gone unhealthy looks exactly like a resource whose plugin went away,
since both end up at zero allocatable.

Add kubelet_device_plugin_devices{resource_name,health_state}, an ALPHA
gauge sourced from the sets GetCapacity already walks. GetCapacity is
the one of the four mutation sites that already holds m.mutex and
already iterates healthyDevices and unhealthyDevices to compute capacity
and allocatable, and its deletedResources loop is where resources are
garbage collected, so the series are dropped there too. Without that
removal the last observed counts would be reported forever for a
resource that no longer exists. The refresh cadence becomes the node
status sync rather than every ListAndWatch message, which suits a gauge.

The metric deliberately carries no per-device label. Whole-device
plugins advertise one ID per card, where such a label would be fine, but
shared-resource plugins advertise synthetic quota units instead, so a
per-device label there yields many series that carry no information
because the IDs do not correspond to distinct hardware. Per-device
detail remains available through the podresources API.

Signed-off-by: Jian Zhang <jian.zhang@bitdeer.com>
2026-10-21 08:27:52 +08:00
kubernetes-prow[bot] b91fd789fe Merge pull request #142561 from danwinship/future-conformance
Initial Future Conformance implementation
2026-10-20 12:41:11 +00:00
Dan Winship ae66f21c05 Generate/verify future-conformance.yaml in addition to conformance.yaml
(Also, remove an old, no-longer-used conformance.yaml-validating script.)
2026-10-20 07:30:10 -04:00
Dominik Marciński ae4a6e5e0e scheduler: parameterize topology-aware placement metrics with entity type (#141929)
* scheduler: parameterize topology-aware placement metrics with entity type

* Address review comments

* scheduler: clarify placement metrics help text for composite pod groups

* scheduler: rename placement metrics entity label from type to entity
2026-10-20 08:25:09 +00:00
dom4ha 5d289561d9 scheduler: rename queue metrics entity label from type to entity
Align scheduler_queued_entities and scheduler_queue_incoming_entities_total
with the placement metrics, which use "entity" for the same values.
"type" is also ambiguous next to scheduler_cache_size{type}, where it
means the cached object kind.
2026-10-19 20:49:18 +00:00