Commit graph

4170 commits

Author SHA1 Message Date
Kubernetes Publisher
9cfb483a4b Merge pull request #138621 from pohly/dep-moby-term
dependencies: update github.com/moby/term v0.5.2

Kubernetes-commit: 446abd3e5f1eb384049a9d9e9a45523c52479ced
2026-04-28 00:21:30 +00:00
Kubernetes Publisher
52b287cb8e Merge pull request #138340 from pacoxu/bump-unwanted
bump stretchr/objx to v0.5.3

Kubernetes-commit: ef1853d811fb004f24e73494b1753b7beb977390
2026-04-27 20:18:22 +00:00
Patrick Ohly
24103e8d01 dependencies: update github.com/moby/term v0.5.2
This will get pulled in eventually. Doing it now simplifies some upcoming PR.

Kubernetes-commit: a49b40cc921f003f2bce3b2d57bc94806f7381a2
2026-04-27 17:06:19 +02:00
Paco Xu
944b2233c0 bump github.com/stretchr/objx to v0.5.3
Kubernetes-commit: 8730b0ebc99d0554e318138d2c83370a6bdef12c
2026-04-27 14:59:42 +08:00
Kubernetes Publisher
ac4fc59cb0 Merge pull request #138573 from dims/update-go-openapi-deps-rebase
Update go-openapi dependencies (jsonpointer, jsonreference, swag)

Kubernetes-commit: e9b95827ebf963f7bab0a1a8ddd90e408858c892
2026-04-26 04:20:37 +00:00
Kubernetes Publisher
7fb973354e Merge pull request #138393 from humblec/bump-etcd-sdk-3.6.10
etcd: bump etcd sdk to v3.6.10

Kubernetes-commit: e1cf06b9b41f3534fd1ce475a18ef20d46e8f876
2026-04-25 16:30:35 +00:00
Humble Devassy Chirammal
5e6985e2a7 etcd: bump etcd sdk to v3.6.10
Bump go.etcd.io/etcd/{api,client/pkg,client,pkg,server}/v3 from v3.6.8 to v3.6.10.
go.etcd.io/etcd/raft/v3 is intentionally left unchanged (separate release cadence).

Signed-off-by: Humble Devassy Chirammal <humble.devassy@gmail.com>

Kubernetes-commit: 15492a41ed637237cf1891ef140544f64197643d
2026-04-25 09:08:49 +05:30
Kubernetes Publisher
d3c92e6b86 Merge pull request #138562 from dims/update-cbor-dep
Update github.com/fxamacker/cbor/v2 to v2.9.1

Kubernetes-commit: 6e4605d14e04ea9681b6dd6b5729c788e28e89b7
2026-04-24 12:24:37 +00:00
Kubernetes Publisher
1bd8f21ffe Merge pull request #138561 from dims/update-xnet-dep
Update golang.org/x/net to v0.53.0

Kubernetes-commit: 1f22abeebcb4e1ecae2f3dbcf3f0cd747ecfb3d6
2026-04-24 12:24:36 +00:00
Davanum Srinivas
a73af44a57 Update go-openapi dependencies (jsonpointer, jsonreference, swag)
Bump go-openapi dependencies to latest versions:
- github.com/go-openapi/jsonpointer v0.21.0 → v0.22.4
- github.com/go-openapi/jsonreference v0.20.2 → v0.21.4
- github.com/go-openapi/swag v0.23.0 → v0.25.4

The new swag version has been restructured into a multi-module monorepo
with submodules (cmdutils, conv, fileutils, jsonname, jsonutils, loading,
mangling, netutils, stringutils, typeutils, yamlutils). As a result:
- mailru/easyjson and josharian/intern are no longer transitive deps
  and have been removed from vendor
- go-openapi/jsonpointer and go-openapi/swag no longer reference
  unwanted deps davecgh/go-spew, mailru/easyjson, or gopkg.in/yaml.v3
- Updated hack/unwanted-dependencies.json accordingly

Signed-off-by: Davanum Srinivas <davanum@gmail.com>

Kubernetes-commit: 693dc57f5753ce69f7d3f49f26bfefc9554e47e6
2026-04-24 08:13:31 -04:00
Davanum Srinivas
f8f46ea66d Update github.com/fxamacker/cbor/v2 to v2.9.1
Parser hardening for the kube-apiserver CBOR deserializer (PRs #750,
#753, #757): fixes tag-1 epoch float64 overflow into time.Time fields
(directly reachable via DecTagOptional decode path), RawMessage clone
defense, and keyasint type-confusion fixes.

Kubernetes-commit: dc29a934e460eb29130de6724787ca1b677e31e0
2026-04-23 21:43:02 -04:00
Davanum Srinivas
8f8d114f81 Update golang.org/x/net to v0.53.0
Fixes CVE-2026-33814 (golang/go#78476): HTTP/2 Transport hangs
indefinitely when a peer sends a SETTINGS frame with MaxFrameSize=0.
This is reachable from kube-apiserver's OIDC, admission webhook,
and aggregated API client paths.

Kubernetes-commit: 12a2470693d86f63f4614048ffdd43dc393dd7e0
2026-04-23 21:36:05 -04:00
Kubernetes Publisher
07b2c1d143 Merge pull request #138291 from soltysh/drop_generators
Drop generators from kubectl run

Kubernetes-commit: 5ad3251400fa9e830828b35436c0a4d8fbbf7984
2026-04-23 22:17:48 +00:00
Kubernetes Publisher
63f12ca074 Merge pull request #138192 from skitt/otel-1.42
Bump otel to 1.43.0 and contrib to 0.68.0

Kubernetes-commit: 5ed1fd971d594a3cda7f7e26cd037e8be37f520f
2026-04-23 22:17:46 +00:00
Maciej Szulik
3fe5e3bbf1 Drop generators entirely from kubectl
Signed-off-by: Maciej Szulik <soltysh@gmail.com>

Kubernetes-commit: 2e7089b46420f6d98cc67086ba6b0c1f364798d1
2026-04-08 17:14:35 +02:00
Maciej Szulik
a174022b42 Remove generators from kubectl run
Signed-off-by: Maciej Szulik <soltysh@gmail.com>

Kubernetes-commit: e7ad4d65fe4f0364169311588986f22115be077d
2026-04-08 17:48:21 +02:00
Stephen Kitt
c128a9a956 Bump otel to 1.43.0 and contrib to 0.68.0
See
https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.41.0
https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.42.0
https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.43.0
and
https://github.com/open-telemetry/opentelemetry-go-contrib/releases/tag/v1.41.0
https://github.com/open-telemetry/opentelemetry-go-contrib/releases/tag/v1.42.0
https://github.com/open-telemetry/opentelemetry-go-contrib/releases/tag/v1.43.0
for details.

otelgrpc no longer produces "messages" span events so these are
removed from the tracing test.

Signed-off-by: Stephen Kitt <skitt@redhat.com>

Kubernetes-commit: 1a63916abee48d6356fbc2e6965433647e6cf073
2026-04-03 10:10:53 +02:00
Kubernetes Publisher
60ec487e8f Merge pull request #138499 from soltysh/double_quote_command
Ensure the path inside the container is correctly handled

Kubernetes-commit: 5c0362e8d1d636816423e90459e3b021022ee62e
2026-04-23 22:17:44 +00:00
Kubernetes Publisher
ef67d87dbf Merge pull request #138480 from xigang/errors_format
fix: properly format DebugError output in kubectl StandardErrorMessage

Kubernetes-commit: 44aaa8e169f7cd6a8b8c3ac38ab660240bbe2a5f
2026-04-23 03:27:06 +00:00
Kubernetes Publisher
be1551afc8 Merge pull request #138262 from brianpursley/remove-CreateSubcommandOptions
kubectl: Remove unused CreateSubcommandOptions from create.go

Kubernetes-commit: e21ce5e0bc52d61da6531d2a285caf2112ee7bfe
2026-04-23 03:27:04 +00:00
Leoy
39dad5862b kubectl: use %w for error wrapping and remove redundant .Error() calls (#138223)
* kubectl: use %w for error wrapping and remove redundant .Error() calls

Replace fmt.Errorf with %s and err.Error() with idiomatic %w wrapping
in kubectl's polymorphichelpers, wait, and drain packages. This enables
proper error chain inspection via errors.Is/As and follows Go best
practices.

Also fixes a typo: "Statefulset" -> "StatefulSet" in history.go.

* Address review: use %w for error wrapping in extendErrWaitTimeout

Use fmt.Errorf with %w instead of %v to preserve the error chain,
allowing wait.Interrupted() to correctly detect timeout errors.

Signed-off-by: supermario_leo <leo.stack@outlook.com>

* Fix lint: wrap both errors with %w in cordon error path

The linter flags err used with %v when it is an error type. Since
Go 1.20+ supports multiple %w verbs in a single fmt.Errorf call,
wrap both err and patchErr to preserve both error chains.

Signed-off-by: supermario_leo <leo.stack@outlook.com>

---------

Signed-off-by: supermario_leo <leo.stack@outlook.com>

Kubernetes-commit: d916c320deb859cd264354c48f3bd5419f7a2950
2026-04-23 08:37:22 +08:00
hunshcn
b600e51f90 kubectl: strict check for exec command (#138214)
* kubectl: strict check for exec command

Fix https://github.com/kubernetes/kubectl/issues/1745

The current implementation doesn't properly check for arguments between
the resource name and the dash separator. This can lead to unexpected
behavior when using commands like 'kubectl exec -it pod-0 bash -- run.sh',
which should raise an error but doesn't.

This fix ensures that when a dash separator (--) is used, there are no
extra arguments between the resource name and the dash.

- Only allow argsLenAtDash == 0 or == 1 (exactly one arg before --)
- Add test for extra args between pod and --
- Add test for flag-like args without dash separator

* test: add kubectl exec container flag coverage

* Apply suggestion from @soltysh

Co-authored-by: Maciej Szulik <soltysh@gmail.com>

---------

Co-authored-by: Maciej Szulik <soltysh@gmail.com>

Kubernetes-commit: b528be0a5658083db98e4a757483a36e1a83e27c
2026-04-23 08:37:14 +08:00
Kubernetes Publisher
51961f2e20 Merge pull request #138189 from ogormans-deptstack/fix/kubectl-create-run-to-rune
Remove *cobra.Command dependency from kubectl create's RunCreate

Kubernetes-commit: a5744f0a29ed3ac1131d0b68f0dd74fb696b2584
2026-04-23 03:27:00 +00:00
Ahmad Maha
76619b0639 kubectl: honor --label-columns with custom-columns (#138094)
* Honor --label-columns for custom-columns output

* Validate --label-columns with custom-columns

* Remove label-columns support from custom-columns

Kubernetes-commit: 1168c4e832f0ad12b0c11b96d15e93eb3c6a8907
2026-04-23 03:26:58 +00:00
Takehiro Ogura
7aefd5b71b Update po, mo files for kubectl Japanese translation (#131176)
* Update Japanese translation for kubectl

* Update test for kubectl help

* apply kubernetes translations rules https://kubernetes.io/ja/docs/contribute/localization/#basic-policy

* Update kubectl help test string

* rebuild kubectl mo file

* fix k8s specific terms to original one

Kubernetes-commit: 37be90f2959691c6d527ebb545675e66c1aac4c7
2026-04-23 05:48:41 +09:00
ogormans-deptstack
0338767df8 Discard unused return from cmd.Flags().Set in test
Signed-off-by: ogormans-deptstack <sean.ogorman@deptagency.com>

Kubernetes-commit: f11acbe3d9d199f6f0fbea73a94a618db63a176f
2026-04-22 09:45:15 +01:00
xigang
9372aa7db9 fix: use klog.Infof to properly format DebugError output in StandardErrorMessage
Signed-off-by: xigang <wangxigang2014@gmail.com>

Kubernetes-commit: 03b523ace7bcf4643da17c835b8545235cd524a0
2026-04-20 17:54:44 +08:00
ogormans-deptstack
c367c1bfc5 Add unit test for editOptions initialization in Complete()
Verify that editOptions is populated when EditBeforeCreate is true
and remains nil otherwise. Also verify that RunCreate returns a
clear error when called without Complete().

Kubernetes-commit: f3318c86571530c1e31013162ea6561371134a4f
2026-04-16 17:39:25 +01:00
Kubernetes Publisher
efd8ecc992 Merge pull request #138346 from dashpole/update_otel_prop
Update go.opentelemetry.io/otel to v1.41.0

Kubernetes-commit: eb51fbf7c6de0e361504729feabdadd178cd2b7b
2026-04-14 21:01:34 +00:00
Kubernetes Publisher
50157eb9cd Merge pull request #138354 from dims/update-moby-spdystream-v0.5.1
Update github.com/moby/spdystream from v0.5.0 to v0.5.1

Kubernetes-commit: 02b979213695b4e3d707ceb5a79095ae7d81b7a0
2026-04-14 21:01:33 +00:00
Davanum Srinivas
072ab7a0e0 Update github.com/moby/spdystream from v0.5.0 to v0.5.1
Kubernetes-commit: 7e9c2c8eef26f99aa2f94d8e09d6d32de86c7769

Kubernetes-commit: f6209104d25a6c0ea7605a73b9ec4085aacbca03
2026-04-13 13:57:52 -04:00
David Ashpole
84680786c0 update go.opentelemetry.io/otel to v1.41.0
Kubernetes-commit: feda787db4c9ebb53621afb83d0e486b39a14e76
2026-04-13 14:23:49 +00:00
Brian Pursley
a83cc50347 Remove unused CreateSubcommandOptions from create.go
Kubernetes-commit: 500ceb2c5c5b782b5021a18b44f6cd1aab7b3b22
2026-04-07 16:20:26 -04:00
Kubernetes Publisher
8144b746a4 Merge pull request #138199 from neolit123/1.36-fix-pause-image-drift
pause: fix version drift and enforce full SemVer validation

Kubernetes-commit: 093c91d2264ad9c4b965ad6dd27b3089681b0d73
2026-04-06 19:23:50 +00:00
ogormans-deptstack
2347603eff Remove *cobra.Command from RunCreate to enable library use
Move EditOptions construction into Complete() where cmd is naturally
available, so RunCreate no longer needs a cobra.Command parameter.
Third-party callers can now invoke RunCreate(f) without constructing
a command. EditBeforeCreate is handled via pre-built editOptions.

Also extract CreateAnnotation from cmd flags in Complete() to remove
the remaining cmd dependency from RunCreate.

Kubernetes-commit: 40843a4d0a1b992154571c3308c43d4d87186239
2026-04-04 20:15:41 +01:00
Lubomir I. Ivanov
1458cb7a54 pause: fix version drift in various files
The latest pause version is 3.10.2 but due to the introduction
of the PATCH level version to the pause image (previously was
only MAJOR.MINOR), various files have remained on an older
version. Either 3.10 or 3.10.1. Our validation with
build/dependencies.yaml ./hack/verify-external-dependencies.sh
did not account for that.

Kubernetes-commit: bc2179d8824f41bce3e25bf563e7164989d094ea
2026-04-03 16:01:49 +02:00
Kubernetes Publisher
82a3c05422 Merge pull request #137906 from aramase/aramase/c/grpc_v1.79.0
update google.golang.org/grpc to v1.79.3

Kubernetes-commit: e00eb8f394b92630827e95d22b9185d72d70d906
2026-03-20 00:11:53 +00:00
Anish Ramasekar
efc77af9a0 update google.golang.org/grpc to v1.79.3
Signed-off-by: Anish Ramasekar <anish.ramasekar@gmail.com>

Kubernetes-commit: f5d48853c511a99d3e8a734bce5a7926f7bdfdfb
2026-03-19 11:26:57 -05:00
Yashasvi Misra
87e157cce8 top command documentation enhancement (#136825)
* top command documentation enhancement

* Added FAQ details

Kubernetes-commit: 1132a4e4efd80d50b9ef17e1ec479c2d73979f25
2026-03-19 20:03:52 +00:00
Kubernetes Publisher
3aa1fee938 Merge pull request #137849 from bryantbiggs/deps/update-kube-openapi
deps: Update `kube-openapi` to drop `ginkgo/gomega` indirect deps

Kubernetes-commit: ec68099e62c85901c8d225705d55adfac26cf69d
2026-03-18 21:37:20 +00:00
Kubernetes Publisher
f1a9fe21da Merge pull request #131744 from ArangoGutierrez/dra_describe
Add ResourceSlices field to kubectl describe node

Kubernetes-commit: e7a3b09a0366f348f0e090fad656ffef2f8b8260
2026-03-18 21:37:17 +00:00
Kubernetes Publisher
abf88630f4 Merge pull request #137843 from pacoxu/cobra-v1.10.2
bump spf13/cobra to v1.10.2

Kubernetes-commit: cf09296f9ab90e5a8855105c270fdc57546e94a0
2026-03-18 17:34:27 +00:00
Kubernetes Publisher
5444625a39 Merge pull request #136988 from pedjak/kubectl-explain-extradocs
kubectl explain: render externalDocs from OpenAPI v3 schemas

Kubernetes-commit: 1baff9532430ff2fc94dd888aeff3817923428ac
2026-03-18 17:34:24 +00:00
Bryant Biggs
ea4d065c85 dependencies: bump kube-openapi to drop ginkgo/gomega indirect deps
Bump k8s.io/kube-openapi to pick up kubernetes/kube-openapi#579 which
moved the last ginkgo/gomega tests to stdlib testing and ran go mod
tidy, removing ginkgo/gomega from kube-openapi's go.mod.

This drops ginkgo/gomega as indirect deps from apimachinery. It also
prunes Masterminds/semver, google/pprof, and golang.org/x/tools from
client-go and other staging modules where they were only needed
through kube-openapi's ginkgo/gomega chain.

Contributes to kubernetes/kubernetes#127888

Kubernetes-commit: 56cd74d879f1ba11aadcff95326f17a1cc2c82ef
2026-03-18 09:09:11 -05:00
Paco Xu
559d096a96 bump spf13/cobra to v1.10.2
Kubernetes-commit: a304826799f652da7944937758a177e9f8970ba6
2026-03-18 16:46:23 +08:00
Kubernetes Publisher
e12c2a86e0 Merge pull request #137742 from dims/dsrinivas/issue-137739-drain-timeout
kubectl/drain: widen namespace termination retry timeout

Kubernetes-commit: 23e0d392cebf6eb434de81e5b7a4b2494d5fac53
2026-03-17 14:29:39 +00:00
Davanum Srinivas
e67d906fc9 kubectl/drain: widen namespace termination retry timeout
TestEvictDuringNamespaceTerminating intentionally exercises the retry path
but only allows 10ms of total time. The production loop sleeps, refreshes
state, and retries under that same deadline, so a single retry plus
scheduler jitter is enough to exhaust the budget under -race or on busy
CI workers.

Keep the retry interval small so the test still covers the retry behavior,
but widen the overall timeout so the assertion measures semantics instead
of machine speed.

Tested:
go test -race ./staging/src/k8s.io/kubectl/pkg/drain -run TestEvictDuringNamespaceTerminating -count=100

Kubernetes-commit: 77f8d7c2a9571dd9a76ee1be8b234a4dddd2ad35
2026-03-14 10:11:26 -04:00
Kubernetes Publisher
3b3daf56ef Merge pull request #137683 from ndixita/ippr-kubectl
Bug fix - consider status resources when computing total resources

Kubernetes-commit: cf291323c2d614dd1a66837bed853c3967449b16
2026-03-17 14:29:36 +00:00
Kubernetes Publisher
be18aaf83e Merge pull request #137706 from scaliby/extract-resource-under-describe
Extract resource under describe to a separate variable

Kubernetes-commit: 2fd6c4765634e7cc6ca7a24b61381bd779b5f9d3
2026-03-17 14:29:34 +00:00
Kubernetes Publisher
d449ccb37a Merge pull request #137298 from dims/dsri/cri-streaming-option-a-hardcut
cri streaming option a hardcut - add new staging repositories `streaming` and `cri-streaming`

Kubernetes-commit: 2bd6c7fe3cb8663804dc6e7672ff01aeebc97274
2026-03-17 14:29:23 +00:00