Commit Graph

8348 Commits

Author SHA1 Message Date
Kubernetes Publisher 2b0cf5428c Merge pull request #132960 from benluddy/webhook-client-content-type
Configure JSON content type for generic webhook RESTClient.

Kubernetes-commit: b86ff94014e02b31149f34159ae966bd4cbbdc12
2025-09-02 16:39:35 +00:00
Kubernetes Publisher 234cda4ae8 Merge pull request #133647 from jpbetz/apiserver-docs
Add doc.go and ARCHITECTURE.md to apiserver

Kubernetes-commit: 9820f1e4e2e4da699aa40fc95348652b60ef3212
2025-09-02 12:39:15 +00:00
Kubernetes Publisher d1d7aa3db2 Merge pull request #131092 from aldudko/dry-run-sli
metrics: exclude dryRun requests from apiserver_request_sli_duration_seconds

Kubernetes-commit: c600ebb74bec8440f2a428de15aba5e4b2c23f0e
2025-09-02 08:53:55 +00:00
Kubernetes Publisher dac6b3e300 Merge pull request #133823 from dims/update-to-spf13/pflag-to-prevent-CI-break
Update to spf13/pflag to prevent CI break

Kubernetes-commit: 80b8c7b40657efbf68c1687bc7c749d4fafd827d
2025-09-01 21:02:54 +00:00
Davanum Srinivas f6fe8c108b Bump github.com/spf13/cobra v1.10.0
Kubernetes-commit: a41de8771af781a25b9d9717640470e3b8b686a2
2025-09-01 11:21:11 -04:00
Davanum Srinivas b620d4f66d Update to spf13/pflag to prevent CI break
Kubernetes-commit: 6ddf6261d445564dd287b2e95019910cb9c4a662
2025-09-01 08:21:12 -04:00
Kubernetes Publisher 6db1a1e84d Merge pull request #133430 from liggitt/json-patch-v4-errors
bump gopkg.in/evanphx/json-patch.v4

Kubernetes-commit: d5065bdf192b2ebb723657b3432c66ce3ea15b23
2025-08-30 17:01:23 +00:00
Joe Betz 5cc8cd0839 Apply feedback, minor cleanups
Kubernetes-commit: 6cefbb65d0fbd4cb4fd8c49425a90898e48820a6
2025-08-21 16:11:41 -04:00
Joe Betz 521d59db89 Add doc.go, example_test.go and ARCHITECTURE.md to apiserver
Kubernetes-commit: e1c586eb00f185c05afb82d2292ddb6bf179709d
2025-08-20 17:51:05 -04:00
Jordan Liggitt 2de906d48a bump gopkg.in/evanphx/json-patch.v4
Kubernetes-commit: 9f8d9432e2067bc8b0e0ea5362b00559846ca54b
2025-08-07 16:02:03 -04:00
Kubernetes Publisher 204e1a5ae2 Merge pull request #132128 from skitt/cadvisor-0.53
Bump cadvisor to 0.53

Kubernetes-commit: aead71c1c2e1846f554d21a257ff577b65f8493a
2025-08-28 17:03:51 +00:00
Kubernetes Publisher 91d53018a6 Merge pull request #133408 from richabanker/etcd-metrics-test
Update TestDeleteStoreStats to validate the new apiserver_resource_objects metric

Kubernetes-commit: 67216cfdd980cdd0234866d66a9ffe2ba3d8fcc4
2025-08-28 12:51:19 +00:00
David Bimmler ad4acd27c3 cache: do not allocate chan for nothing (#133500)
* cache: do not allocate chan for nothing

The explicit purpose of this channel is to never be closed and nothing
to be sent down on it. Hence, there's no need to allocate a channel - a
nil channel has exactly the desired behaviour.

Additionally, this is more relevant now that testing/synctest gets
unhappy when goroutines are blocked on reading on channels which are
created outside of the synctest bubble. Since this is a package var, that's
hard to avoid when using this package. Synctest is fine with nil
channels though.

Reported-by: Jussi Maki <jussi@isovalent.com>
Signed-off-by: David Bimmler <david.bimmler@isovalent.com>

* handlers: do not allocate chan for nothing

Nil chan has the desired semantics already, and this breaks
testing/synctest because the channel is allocated outside of the bubble.

Signed-off-by: David Bimmler <david.bimmler@isovalent.com>

---------

Signed-off-by: David Bimmler <david.bimmler@isovalent.com>

Kubernetes-commit: 52b7d035f9655d0c6ebeaaafd60add99700bb468
2025-08-28 04:14:34 +00:00
Kubernetes Publisher 248bd3123e Merge pull request #133449 from richabanker/etcd-metrics-owners
Add sig-instrumentation as OWNERS for etcd3/metrics

Kubernetes-commit: 7afb545ff1d76de844b5c3c4c279bb52515cea23
2025-08-28 04:14:32 +00:00
Kubernetes Publisher 69e9a4fbdd Merge pull request #133358 from ostrain/bugfix/ostrain/132359
Bugfix: DeleteOptions decode errors should return 400 instead of 500

Kubernetes-commit: 338d035cd44b4eb6f26073ea6d996f02f7716289
2025-08-28 04:14:30 +00:00
Kubernetes Publisher 5166e327b0 Merge pull request #133310 from stlaz/testauthz-delay
authz tests: delay response in context cancelled scenario

Kubernetes-commit: 803e0a6887179ddb2e99b8d2770b61c0ebdd6fa9
2025-08-28 00:16:08 +00:00
Kubernetes Publisher 51b01ad08b Merge pull request #132613 from gavinkflam/130656-duplicate-validation-errors-metric
feat: increment an internal metric when duplicate validation errors are found

Kubernetes-commit: 310603902c51ff4efda99f8b11478e72303cc03c
2025-08-28 00:16:06 +00:00
Kubernetes Publisher 0813ef73bd Merge pull request #133604 from serathius/watchcache-count
Fix storage counting all objects instead of objects for resource

Kubernetes-commit: 4e8b192b66cc2a6952b8f1a5067e563c4019c276
2025-08-19 09:23:36 -07:00
Marek Siarkowicz 7f5c70221d Fix storage counting all objects instead just objects for resource
Kubernetes-commit: d49e3d67cb39eb2dee6e9216ffed0e3ae13501a5
2025-08-19 15:09:44 +02:00
Kubernetes Publisher dbf8da5304 Merge pull request #133570 from BenTheElder/pr131351
Clarify staging repository READMEs

Kubernetes-commit: 8082e9ab157b280c740a623ae9d73679b9ee95a4
2025-08-16 06:50:47 +00:00
Benjamin Elder 658f74ca99 clarify that staging repos are automatically published
Kubernetes-commit: e49f6116f9eec5d48f2c8913e598fef496644d01
2025-08-15 14:33:07 -07:00
Benjamin Elder a009bb8597 add pointer to CONTRIBUTING.md for more details on contributing, clarify read-only
Kubernetes-commit: ada2ed8487708056ff11bd2413da1073558e6d7c
2025-08-15 10:13:18 -07:00
Benjamin Elder 64145c7e2b link to what a staging repository is
Kubernetes-commit: 011d50019758a7405c6ff37f0fdbd44dacb607b5
2025-08-15 10:10:26 -07:00
Richa Banker 45fdfc0ca4 Add sig-instrumentation as OWNERS for apiserver/pkg/storage/etcd3/metrics
Kubernetes-commit: a28eda435f2c2d5f4cd4461466fea87897d9822b
2025-08-08 09:58:02 -07:00
Richa Banker e8d163a6bc Register apiserver_resource_objects in TestDeleteStoreStats
Kubernetes-commit: 3995b6cf72bbd5ec8ed964d7fcbb9fcf440d1d36
2025-08-06 16:57:37 -07:00
Owen Strain 7b84a2828a Bugfix: DeleteOptions decode errors should return 400 instead of 500
Kubernetes-commit: eac9da061ddf3b2d71ffcab124af8b0e3fb71cae
2025-08-01 00:21:54 +00:00
Gavin Lam fefd424016 feat: increment an internal metric when duplicate validation errors
Signed-off-by: Gavin Lam <gavin.oss@tutamail.com>

Kubernetes-commit: d0816f84f9c46de3fbeddfb022c2be7bd4157301
2025-07-31 00:48:29 -04:00
Stanislav Láznička a7981497b1 authz tests: delay response in context cancelled scenario
The net/http transport checks for immediate response when
its handling context cancellation. The unit test was racing
with this check by responding too fast.

Signed-off-by: Stanislav Láznička <slznika@microsoft.com>

Kubernetes-commit: efcf97f98c7c9891015d4f2b37d2fc3afcdd336c
2025-07-30 14:33:28 +02:00
Ben Luddy 36d7848a30 Configure JSON content type for generic webhook RESTClient.
Authorization, token authentication, imagepolicy admission, and audit webhooks configure RESTClients
that encode to JSON regardless of the ContentType of the provided rest.Config. Because this is
opaque to the RESTClient, configuring a ContentType other than "application/json" results in
requests with JSON-encoded bodies and a non-JSON media type in the Content-Type header. Webhook
servers that respect the Content-Type request header will be unable to decode an object from the
request body.

Explicitly overriding the ContentType of the provided rest.Config fixes this issue and is consistent
with how clients are constructed for conversion and admission webhooks.

Kubernetes-commit: ed07efbc57939afdf154afa80be35507d0a81d66
2025-07-15 11:28:06 -04:00
Stephen Kitt 91f12b08ca 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>

Kubernetes-commit: 684473af6232a5d68a5585837837d1a96f009414
2025-06-05 17:17:56 +02:00
Alex Dudko cb5a78f9ba metrics: don't record apiserver_request_sli_duration_seconds for dryRun requests
Kubernetes-commit: dd37ad1bc2cd9df470924d4891f5b4bc7405ab66
2025-05-22 18:23:05 -05:00
sAchin-680 45ddd69e2b docs: clarify that this is a staging repository and not for direct contributions
Signed-off-by: sAchin-680 <mrmister680@gmail.com>

Kubernetes-commit: 7c43e6d2fdbf88f8d92559dac3cabb23da2a2957
2025-04-17 17:51:45 +05:30
Kubernetes Publisher 84a7cbfda5 Merge pull request #133431 from richabanker/etcd-metrics-delete
Remove DeprecatedVersion for apiserver_storage_objects, adjust help text

Kubernetes-commit: f003bd2de38227820431bae632ade3111dbb1072
2025-08-08 11:39:43 -07:00
Richa Banker b64541f9b2 Remove DeprecatedVersion for apiserver_storage_objects, adjust help text
Kubernetes-commit: cbd6fb867ba26f977df605fe6a84f8570ed7abdc
2025-08-07 14:02:46 -07:00
Kubernetes Publisher 67884f45c0 Merge pull request #133412 from richabanker/etcd-metrics-delete
Use Delete() instead of DeleteLabelValues() for etcd metrics

Kubernetes-commit: 8ac9a3c089c480413cb2231d57c756cbfe750e69
2025-08-07 15:41:51 +00:00
Richa Banker 646afb740b Use Delete() instead of DeleteLabelValues() for etcd metrics
Kubernetes-commit: 2629fe25faa73837201dcfc7c4de039112ca125f
2025-08-06 21:24:27 -07:00
Kubernetes Publisher 25a3c17485 Merge pull request #133193 from aojea/deflake_TestStreamTranslator_WebSocketServerErrors
Deflake test stream translator web socket server errors

Kubernetes-commit: b933c4643cd4e3fa88f0bd614664c854344c9241
2025-07-29 19:24:44 +00:00
Antonio Ojea 8f1beab7b2 fix flake on TestStreamTranslator_WebSocketServerErrors
The metrics assertion race with the metric update, and since this
happens at the serverside, we use an active look to check the metrics
instead of expecting to be updated immidiatly.

Change-Id: I9a64b66301d5f4ac3df0c0a01de10602a20f89ea

Kubernetes-commit: f07dcd443d7335d09dc0de7a47485e2e6c87d725
2025-07-24 21:56:42 +00:00
Antonio Ojea 1c694e9979 websocket streamtranslator increament metrics before writing status
Test that assert on metrics use the returned status to sync the test, if
the metric is updated AFTER the state is returned the test will flake
because the assertion on the metric will race.

Change-Id: I317708a22cb47256c37dac3cab0463a2f925ad6b

Kubernetes-commit: 7ba22700bfd12cd32ff72db022e4b53ccda1deca
2025-07-28 21:59:08 +00:00
Antonio Ojea c8e4cae9a6 TestStreamTranslator_BlockRedirects use subtests
Reset metrics per status code also allow to  log the particular status
code that flake, in case the problem comes from an specific one.

Change-Id: I29f67d4c5d76449350f45049f45ce8325a2d0ddd

Kubernetes-commit: 0aea6a1e45d178371b44eabcaf0d318a01f9ac3d
2025-07-24 21:38:10 +00:00
Kubernetes Publisher 7de8f16ff3 Merge pull request #133226 from ivanvc/bump-etcd-to-3.6.4
Bump etcd sdk to v3.6.4

Kubernetes-commit: d33916baa473d089d33c9fe336bd172cebdb3b6e
2025-07-27 11:03:00 +00:00
Ivan Valdes cdf2b6007e Bump etcd sdk to v3.6.4
Kubernetes-commit: 57ceb56c6fa74df9ead49afcd40daaa76de3f673
2025-07-25 14:09:41 -07:00
Kubernetes Publisher b0d4f2b904 Merge pull request #132942 from thockin/kyaml
Add KYAML support to kubectl

Kubernetes-commit: 1451dd1b0873e801e082f3a06a52685bcd68dcac
2025-07-25 03:06:54 +00:00
Kubernetes Publisher e08cc1978f Merge pull request #132935 from benluddy/cbor-bump-custom-marshalers
KEP-4222: Adopt text and JSON transcoding support for CBOR.

Kubernetes-commit: dfc0998baa4d6c2cd630aa3c5b8def4e9b1fcd8e
2025-07-24 23:06:16 +00:00
Tim Hockin 4e1a04bd2a Re-vendor sigs.k8s.io/yaml @ v1.6.0
Kubernetes-commit: 8182a27f3b0769cefe1bcebfb938a7bafd51c88e
2025-07-24 11:46:03 -07:00
Kubernetes Publisher 4f018447f7 Merge pull request #132837 from JoelSpeed/fix-max-elements-x-int-or-string
Fix IntOrString cost estimation when schema has a MaxLength constraint

Kubernetes-commit: f9fde2dfbdfb73c25e0a17d675313748948cd78c
2025-07-24 15:05:58 +00:00
Kubernetes Publisher 953f6a8aff Merge pull request #133159 from ylink-lfs/chore/ptrto_migration
chore: ptrTo util removal with ptr.To

Kubernetes-commit: ff657e166b92ebdeaf2cefbba557c4e882bb4f2a
2025-07-24 07:00:08 +00:00
Simran Kaur dae80c21fd List available endpoints for kube-apiserver (#132581)
Fix tests and formatting

Use ListedPaths for finding useful endpoints

Fix maps import

Update dependencies

Fix lint

Add option to pass listedpaths

Remove apiserver component check

Install statuz in genericapiserver

Register zpagesfeatures

Fix import order

Avoid adding non-debugging endpoints

Fix tests

Fix tests

fix tests

Sort paths

Sort in-place

Copy paths before sorting

Fix string initialization

Move sorting to later stage

Fix imports

Kubernetes-commit: c7d6c09683344d6dacbe5ba3383a8217c1d4ccd7
2025-07-24 07:00:07 +00:00
Kubernetes Publisher 26d1b81057 Merge pull request #133146 from liggitt/debug-flake
Add flake debugging for admission test

Kubernetes-commit: 48f9786332eb99e4874df987abd804080286b9ea
2025-07-24 07:00:06 +00:00
ylink-lfs f6d019a595 chore: ptrTo util removal with ptr.To
Kubernetes-commit: 5f4a1aa58c3dbdffbc5bd49a1bd7363b1cd20345
2025-07-24 09:11:09 +08:00