Commit graph

10914 commits

Author SHA1 Message Date
Wojciech Tyczyński
7e70adf64a Unify regular and watchlist latency metrics buckets 2026-07-03 13:02:50 +02:00
kubernetes-prow[bot]
0a80eebe7a
Merge pull request #137075 from vinayakray19/feature/enable-optionalreq-for-apidiscovery
Enable the optionalorrequired linter for the apidiscovery API group
2026-07-02 14:42:17 +00:00
kubernetes-prow[bot]
b82bfba4ef
Merge pull request #138351 from pohly/apidiff-changelog
optional tracking and documentation of breaking Go API changes in client-go
2026-07-02 10:54:15 +00:00
Patrick Ohly
8af3e85e9e hack: optional Go API documentation
Let's introduce this new functionality incrementally: at first the check will
run, but won't fail "make verify". Once we have gained more confidence and
experience with it, this commit can be reverted to make documentation
mandatory again.
2026-07-02 09:47:38 +02:00
Patrick Ohly
74dd02ba3b apimachinery: exclude from Go API tracking for now
Let's focus only on client-go initially. When we have more experience with the
new tooling, apimachinery can be added back.
2026-07-02 09:47:35 +02:00
Peter Rifel
1fb549b4fe
Support detached HEAD in cherry_pick_pull.sh
When the repo is in a detached HEAD state (`git checkout origin/master`)
the cherrypick script fails with:

  fatal: ref HEAD is not a symbolic ref

because HEAD isn't pointing at a specific branch. The script only needs
the current branch in order to return the user to the branch afterwards.
We can fallback to tracking the detached HEAD commit so the script
returns the user back to the same commit.
2026-06-27 17:18:41 -05:00
Davanum Srinivas
92ce184653
kube-proxy: detect host CPU count via cpuset.NumCPU instead of cadvisor
detectNumCPU sized nf_conntrack_max using github.com/google/cadvisor/lib
machine topology. nf_conntrack_max is host-wide, so it must be sized from the
node's CPU count, not runtime.NumCPU(): the latter honors the process cpuset
and undercounts when kube-proxy runs under a static CPU policy, which is the
behavior cadvisor worked around (kubernetes/kubernetes#99225).

Use cpuset.NumCPU() from k8s.io/utils, which reads the node's online CPU count
from /sys/devices/system/cpu/online, with a runtime.NumCPU() fallback. This
drops the cadvisor dependency from pkg/proxy/conntrack and bumps k8s.io/utils
to pick up cpuset.NumCPU.
2026-06-26 08:01:46 -04:00
Patrick Ohly
cb3e19a440 apidiff: add apidiff-changelog tool
This replaces complex shell code for "parsing" the CHANGELOG.md with a
dedicated Go tool, which is more robust and simpler. The tool adds support
for ellipsis(= ...) on a separate line within the verbatim text block
of the CHANGELOG.md as a wildcard that matches one or more lines in the full
output of incompatible changes.
2026-06-26 10:24:30 +02:00
kubernetes-prow[bot]
fbef17bc5f
Merge pull request #139870 from dims/cadvisor-lib
kubelet: depend on github.com/google/cadvisor/lib
2026-06-25 16:46:29 +00:00
kubernetes-prow[bot]
554d3b1452
Merge pull request #137964 from niewysoki/add-monitor-nodes-workers-to-ccm
Introduce paralellization for MonitorNodes loop.
2026-06-24 21:34:27 +00:00
vinayakray19
49a0720854
Add apidiscovery to optionalfields linter exception path 2026-06-24 14:39:25 +05:30
vinayakray19
5e43d9bc39
Enable optionalorrequired linter for apidiscovery API group and update related files
Signed-off-by: vinayakray19 <vinayak.ray@ibm.com>
2026-06-24 14:39:24 +05:30
kubernetes-prow[bot]
5db1789eb5
Merge pull request #137087 from vinayakray19/feature/enable-uniquemarkers-linter
Enable the uniquemarkers linter
2026-06-23 21:10:18 +00:00
Franciszek Hnatów
7b5ef3be21 Add metrics describing the MonitorNodes loop
- Introduce `cloud_provider_calls_total` counter metric to track calls to the cloud provider, broken down by operation ("instance_exists", "instance_shutdown", "instance_metadata") and result ("success", "error", "instance_not_found", "not_implemented").
- Introduce `monitor_nodes_duration_seconds` histogram metric to track the duration of the entire MonitorNodes loop.
- Add unit tests verifying the counter metrics.
2026-06-22 18:57:17 +00:00
Maciej Skoczeń
ebd756259b Fix podgroup_scheduling_attempt_duration_seconds metric description 2026-06-22 12:44:06 +00: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
Jitesh Kumar
7bc0a4a16d test/images/agnhost: bump to 2.65.0
The new version includes a generic /envvar endpoint in netexec that
reads any named environment variable, enabling e2e tests to retrieve
spec.nodeName via the Downward API instead of relying on os.Hostname().

Ref: https://github.com/kubernetes/k8s.io/pull/9608
Signed-off-by: Jitesh Kumar <jiteshkumardj@gmail.com>
2026-06-16 00:05:07 +05:30
Kubernetes Prow Robot
82c23b419e
Merge pull request #139678 from amigo-nishant/cleanup/remove-heapster-grab-profiles
cleanup: remove retired heapster support from grab-profiles.sh
2026-06-15 23:33:20 +05:30
Kubernetes Prow Robot
0dcbebb27a
Merge pull request #139303 from tetianakh/gofmt
hack: use toolchain-specific gofmt for formatting checks
2026-06-13 01:44:56 +05:30
amigo-nishant
cc6f5b6d2c cleanup: remove retired heapster support from grab-profiles.sh 2026-06-12 20:44:27 +05:30
Walter Fender
f9a4b842c4 Removing konnectivity-client from exception list.
Removing konnectivity-client from the list of packages allowed to use
the unwanted "github.com/golang/protobuf" package. ANP has switched to
using the "google.golang.org/protobuf" package.
2026-06-11 16:21:49 +00:00
Kubernetes Prow Robot
a00f6e9181
Merge pull request #139560 from yongruilin/dv-custom-validation
validation-gen: add +k8s:customValidation tag
2026-06-11 05:54:46 +05:30
Kubernetes Prow Robot
8f8aa9aae1
Merge pull request #139101 from lalitc375/conditions
Setup metav1.Condition for declarative valdiations.
2026-06-11 04:28:47 +05:30
Kubernetes Prow Robot
f7a260bfc5
Merge pull request #139609 from amritansh1502/promote-agnhost-2.64.0
Promote agnhost e2e test image to 2.64.0
2026-06-10 23:09:06 +05:30
Kubernetes Prow Robot
1b85ff009e
Merge pull request #137767 from princepereira/ppereira-kproxy-prometheus-metrics-master
Adding prometheues metrics for Kubeproxy failed loadbalancer operations.
2026-06-10 20:33:57 +05:30
Amritansh Amritansh
64915c6459 Promote agnhost e2e test image to 2.64.0 2026-06-10 14:18:35 +05:30
Yongrui Lin
a83ac6f8b4 Exempt ValidateCustom_ functions from the underscore naming lint
Hand-written custom validation functions follow the ValidateCustom_<Type>
naming convention required by validation-gen, like Convert_* and
SetDefaults_*.
2026-06-10 04:04:02 +00:00
Prince Pereira
62f1d9062c Add Prometheus metrics for KubeProxy failed loadbalancer operations 2026-06-09 20:30:36 +00:00
Jordan Liggitt
fc5828f588
Bump github.com/containerd/typeurl/v2 2026-06-09 11:10:21 -04:00
Kubernetes Prow Robot
dbc6f8a3fe
Merge pull request #139261 from tico88612/lint/newexpr
golangci-lint: re-enable newexpr hint in modernize linter
2026-06-09 02:33:45 +05:30
Tetiana Khotiainsteva
ff68f005f4 Output error message to stderr 2026-06-08 15:37:50 +02:00
Tetiana Khotiainsteva
8cbbb97d02
Update hack/verify-gofmt.sh
Co-authored-by: Benjamin Elder <bentheelder@google.com>
2026-06-08 15:31:48 +02:00
Kubernetes Prow Robot
e4606044ad
Merge pull request #139427 from Jefftree/bump-etcd-3-7-0-rc-0
etcd: update etcd image to v3.7.0-rc.0
2026-06-02 16:39:54 +05:30
Jefftree
2544f4dda2 etcd: update etcd image to v3.7.0-rc.0 2026-06-01 20:29:57 -04:00
Jefftree
30794a7a71 Update unwanted-dependencies.json for etcd master bump 2026-06-01 21:37:42 +00:00
Patrick Ohly
f4ec21c07f apidiff: compare only once, sort and filter
Sorting was broken (LC=C instead of LC_ALL=C) and only done for incompatible
changes. By splitting up the full output, we can:
- sort both sections
- filter out harmless incompatible changes

In 1.35 and 1.36, the following changes would have been reported as "Acceptable changes"
without causing pull-kubernetes-apidiff-client-go to fail:

Acceptable incompatible changes:
- ./informers/storagemigration.Interface.V1alpha1: removed
- ./informers/storagemigration.Interface.V1beta1: added
- ./kubernetes.(*Clientset).StoragemigrationV1alpha1: removed
- ./kubernetes.Interface.StoragemigrationV1alpha1: removed
- ./kubernetes.Interface.StoragemigrationV1beta1: added
- ./kubernetes/fake.(*Clientset).StoragemigrationV1alpha1: removed
- package k8s.io/client-go/applyconfigurations/storagemigration/v1alpha1: removed
- package k8s.io/client-go/informers/storagemigration/v1alpha1: removed
- package k8s.io/client-go/kubernetes/typed/storagemigration/v1alpha1/fake: removed
- package k8s.io/client-go/kubernetes/typed/storagemigration/v1alpha1: removed
- package k8s.io/client-go/listers/storagemigration/v1alpha1: removed
Compatible changes:
- ./applyconfigurations/meta/v1.GroupResource: added
...

Acceptable incompatible changes:
- ./applyconfigurations/certificates/v1alpha1.ExtractPodCertificateRequest: removed
- ./applyconfigurations/certificates/v1alpha1.ExtractPodCertificateRequestFrom: removed
- ./applyconfigurations/certificates/v1alpha1.ExtractPodCertificateRequestStatus: removed
- ./applyconfigurations/certificates/v1alpha1.PodCertificateRequest: removed
- ./applyconfigurations/certificates/v1alpha1.PodCertificateRequestApplyConfiguration: removed
- ./applyconfigurations/certificates/v1alpha1.PodCertificateRequestSpec: removed
- ./applyconfigurations/certificates/v1alpha1.PodCertificateRequestSpecApplyConfiguration: removed
- ./applyconfigurations/certificates/v1alpha1.PodCertificateRequestStatus: removed
- ./applyconfigurations/certificates/v1alpha1.PodCertificateRequestStatusApplyConfiguration: removed
- ./applyconfigurations/core/v1.PodCertificateProjectionApplyConfiguration: old is comparable, new is not
- ./informers/certificates/v1alpha1.Interface.PodCertificateRequests: removed
- ./informers/certificates/v1alpha1.NewFilteredPodCertificateRequestInformer: removed
- ./informers/certificates/v1alpha1.NewPodCertificateRequestInformer: removed
- ./informers/certificates/v1alpha1.PodCertificateRequestInformer: removed
- ./informers/certificates/v1beta1.Interface.PodCertificateRequests: added
- ./kubernetes/typed/certificates/v1alpha1.(*CertificatesV1alpha1Client).PodCertificateRequests: removed
- ./kubernetes/typed/certificates/v1alpha1.PodCertificateRequestExpansion: removed
- ./kubernetes/typed/certificates/v1alpha1.PodCertificateRequestInterface: removed
- ./kubernetes/typed/certificates/v1alpha1.PodCertificateRequestsGetter.PodCertificateRequests, method set of CertificatesV1alpha1Interface: removed
- ./kubernetes/typed/certificates/v1alpha1.PodCertificateRequestsGetter: removed
- ./kubernetes/typed/certificates/v1alpha1/fake.(*FakeCertificatesV1alpha1).PodCertificateRequests: removed
- ./kubernetes/typed/certificates/v1beta1.PodCertificateRequestsGetter.PodCertificateRequests: added
- ./listers/certificates/v1alpha1.NewPodCertificateRequestLister: removed
- ./listers/certificates/v1alpha1.PodCertificateRequestLister: removed
- ./listers/certificates/v1alpha1.PodCertificateRequestListerExpansion: removed
- ./listers/certificates/v1alpha1.PodCertificateRequestNamespaceLister: removed
- ./listers/certificates/v1alpha1.PodCertificateRequestNamespaceListerExpansion: removed
Compatible changes:
- ./applyconfigurations/certificates/v1beta1.ExtractPodCertificateRequest: added
...

Acceptable incompatible changes:
- ./applyconfigurations/resource/v1alpha3.(*DeviceTaintSelectorApplyConfiguration).WithDeviceClassName: removed
- ./applyconfigurations/resource/v1alpha3.(*DeviceTaintSelectorApplyConfiguration).WithSelectors: removed
- ./applyconfigurations/resource/v1alpha3.CELDeviceSelector: removed
- ./applyconfigurations/resource/v1alpha3.CELDeviceSelectorApplyConfiguration: removed
- ./applyconfigurations/resource/v1alpha3.DeviceSelector: removed
- ./applyconfigurations/resource/v1alpha3.DeviceSelectorApplyConfiguration: removed
- ./applyconfigurations/resource/v1alpha3.DeviceTaintSelectorApplyConfiguration.DeviceClassName: removed
- ./applyconfigurations/resource/v1alpha3.DeviceTaintSelectorApplyConfiguration.Selectors: removed
- ./kubernetes/typed/resource/v1alpha3.DeviceTaintRuleInterface.ApplyStatus: added
- ./kubernetes/typed/resource/v1alpha3.DeviceTaintRuleInterface.UpdateStatus: added
Compatible changes:
- ./applyconfigurations/resource/v1alpha3.(*DeviceTaintRuleApplyConfiguration).WithStatus: added
...

Acceptable incompatible changes:
- ./informers/autoscaling.Interface.V2beta1: removed
- ./informers/autoscaling.Interface.V2beta2: removed
- ./kubernetes.(*Clientset).AutoscalingV2beta1: removed
- ./kubernetes.(*Clientset).AutoscalingV2beta2: removed
- ./kubernetes.Interface.AutoscalingV2beta1: removed
- ./kubernetes.Interface.AutoscalingV2beta2: removed
- ./kubernetes/fake.(*Clientset).AutoscalingV2beta1: removed
- ./kubernetes/fake.(*Clientset).AutoscalingV2beta2: removed
- package k8s.io/client-go/applyconfigurations/autoscaling/v2beta1: removed
- package k8s.io/client-go/applyconfigurations/autoscaling/v2beta2: removed
- package k8s.io/client-go/informers/autoscaling/v2beta1: removed
- package k8s.io/client-go/informers/autoscaling/v2beta2: removed
- package k8s.io/client-go/kubernetes/typed/autoscaling/v2beta1/fake: removed
- package k8s.io/client-go/kubernetes/typed/autoscaling/v2beta1: removed
- package k8s.io/client-go/kubernetes/typed/autoscaling/v2beta2/fake: removed
- package k8s.io/client-go/kubernetes/typed/autoscaling/v2beta2: removed
- package k8s.io/client-go/listers/autoscaling/v2beta1: removed
- package k8s.io/client-go/listers/autoscaling/v2beta2: removed

Acceptable incompatible changes:
- ./informers/resource/v1beta2.Interface.DeviceTaintRules: added
- ./kubernetes/typed/resource/v1beta2.DeviceTaintRulesGetter.DeviceTaintRules: added
Compatible changes:
- ./applyconfigurations/resource/v1beta2.DeviceTaintRule: added
...

Acceptable incompatible changes:
- ./applyconfigurations/core/v1.(*VolumeMountStatusApplyConfiguration).WithImage: removed
- ./applyconfigurations/core/v1.VolumeMountStatusApplyConfiguration.Image: removed
- ./applyconfigurations/core/v1.VolumeMountStatusApplyConfiguration.VolumeStatusApplyConfiguration: removed
Compatible changes:
- ./applyconfigurations/core/v1.(*VolumeMountStatusApplyConfiguration).WithVolumeStatus: added
...

Acceptable incompatible changes:
- ./applyconfigurations/resource/v1.DeviceAttributeApplyConfiguration: old is comparable, new is not
- ./applyconfigurations/resource/v1beta1.DeviceAttributeApplyConfiguration: old is comparable, new is not
- ./applyconfigurations/resource/v1beta2.DeviceAttributeApplyConfiguration: old is comparable, new is not
Compatible changes:
- ./applyconfigurations/resource/v1.(*DeviceAttributeApplyConfiguration).WithBoolValues: added
...
2026-06-01 20:54:09 +02:00
Patrick Ohly
80aafd9529 apidiff: support analysis of merge commit
When "-m -t <merge commit revision>" are used, the diff and potential changelog
entry are about a merged pull request. This will be used to update the
CHANGELOG.md files for past Kubernetes releases.
2026-06-01 20:54:09 +02:00
Patrick Ohly
403786cf6c apidiff: track breaking changes in CHANGELOG.md files
When incompatible changes are detected in a directory like
./staging/src/k8s.io/client-go, the script checks if there is a
CHANGELOG.md file. If not, it behaves as before.

If it exists, it checks whether the file documents the change (must be included
verbatim in code block). If yes, the change is not considered a reason for
failure. If no, it gets reported as before and the overall result is a failure.

If incompatible changes are detected in directories with a changelog,
instructions are printed at the end which explain how to update the changelog
so that the next update of the pull request passes without failures: when the
new -u flag gets passed, the script adds a new section at the top of the
changelog file after the introduction. Developers then need to replace the
template text and include their documentation in their pull request.

With these changes, pull-kubernetes-apidiff-client-go can become merge-blocking:
- If there are only compatible changes, it already didn't fail.
- If there are incompatible changes, extending the changelog
  will make the check pass without failures.

A similar job can be added for apimachinery, or a combined job can check both.

pull-kubernetes-apidiff remains advisory: it cannot block merging because it
also checks directories for which no changelog is maintained.
2026-06-01 20:53:02 +02:00
Davanum Srinivas
0ef4cd6cbf
Mark github.com/envoyproxy/protoc-gen-validate as unwanted dependency
Archived upstream; pulled in transitively via google.golang.org/grpc.

Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2026-05-30 11:13:10 -04:00
Davanum Srinivas
73cabc240f
Bump go.opentelemetry.io/otel to v1.44.0
Update the OpenTelemetry core module (which provides the propagation and
baggage packages) and its sibling modules from v1.43.0 to v1.44.0:

- go.opentelemetry.io/otel v1.43.0 -> v1.44.0
- go.opentelemetry.io/otel/metric v1.43.0 -> v1.44.0
- go.opentelemetry.io/otel/sdk v1.43.0 -> v1.44.0
- go.opentelemetry.io/otel/trace v1.43.0 -> v1.44.0
- go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.43.0 -> v1.44.0
- go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.43.0 -> v1.44.0

Transitive updates pulled in by the bump:

- google.golang.org/grpc v1.81.0 -> v1.81.1
- google.golang.org/genproto/googleapis/{api,rpc} -> 20260526163538-3dc84a4a5aaa

Vendor regenerated via hack/update-vendor.sh. hack/lint-dependencies.sh and
hack/verify-typecheck.sh pass; no changes required to unwanted-dependencies.json.
2026-05-29 14:38:46 -04:00
Lalit Chauhan
803aafa11f Wire DV for metav1.Condition 2026-05-29 02:52:30 +00:00
Lubomir I. Ivanov
7262474f9e make-rules/test-cmd.sh: remove testing of cmd/kubeadm/test
The package is being consolidated as UT under cmd/kubeadm/app.
2026-05-28 20:59:31 +02:00
Tetiana Khotiainsteva
6ec358239a
Update hack/update-gofmt.sh
Co-authored-by: Benjamin Elder <bentheelder@google.com>
2026-05-28 14:43:12 +02:00
Maciej Skoczeń
8eb66b73ef Add support for PodGroups in scheduling queue 2026-05-27 13:06:13 +00:00
Tetiana Khotiainsteva
d793bb6512 hack: use toolchain-specific gofmt for formatting checks
Ensures that code formatting updates and verifications are executed using the
project's target Go toolchain version (specified in .go-version) instead of
the host system's global gofmt executable. Bypasses PATH configuration limits
by dynamically resolving and calling the GOROOT-aligned gofmt binary, which
prevents version mismatches in containerized development setups.
2026-05-27 14:15:15 +02:00
Kubernetes Prow Robot
870565d371
Merge pull request #139311 from SergeyKanzhelev/rename-sort-to-metric-sort
Rename instrumentation sort tool to metric-sort and stop installing it
2026-05-27 06:05:58 +05:30
Sergey Kanzhelev
faa4a90f18 Rename instrumentation sort tool to metric-sort and stop installing it
The sort tool in hack/tools/instrumentation/sort/ shadows /usr/bin/sort
when installed into GOBIN. Scripts like hack/verify-deadcode-elimination.sh
prepend GOBIN to PATH, causing the coreutil sort to be replaced by this
Go binary, which breaks unrelated verifiers.

The tool is not used by any automation, so remove it from the install
line. Also rename the directory from sort/ to metric-sort/ to prevent
future accidental PATH shadowing.
2026-05-26 13:11:19 -07:00
ChengHao Yang
297165e0c3
golangci-lint: re-enable newexpr hint in modernize linter
Signed-off-by: ChengHao Yang <17496418+tico88612@users.noreply.github.com>
2026-05-24 13:15:13 +08:00
YeRongyu
48adfae81d deprecate(apiserver): deprecate cache list metrics 2026-05-23 11:59:50 +08:00
Kubernetes Prow Robot
f6442409ad
Merge pull request #139248 from dims/bump-golang.org/x/crypto-to-v0.52.0
Bump golang.org/x/crypto to v0.52.0
2026-05-23 00:05:00 +05:30