Commit Graph

6550 Commits

Author SHA1 Message Date
Abu Kashem 62a4b39be7 apiserver: make watch termination during shutdown configurable
Kubernetes-commit: 791fcd6fb429002349b3f697b1bcc68ff7146dde
2023-02-10 11:43:06 -05:00
Abu Kashem 41067f8ef1 apiserver: fix APF tests, use T functions on the test goroutine
Kubernetes-commit: 62742db16b16449678c888490bfc141047a6939d
2023-02-10 09:49:27 -05:00
Wojciech Tyczyński 27cf1d8797 Minor refactor of DeleteCollection
Kubernetes-commit: e1aa521c141e14e53278b463233c0839238f642f
2023-02-09 21:14:17 +01:00
TommyStarK 9349b8c968 apiserver/util/proxy: Improving test coverage
Signed-off-by: TommyStarK <thomasmilox@gmail.com>

Kubernetes-commit: c6aa6e5007ffb73c5c5866554d880872faddea2b
2023-02-08 22:44:07 +01:00
Jefftree 31f3fb382d Add metrics for aggregated discovery
Kubernetes-commit: 387d97605ee81cb8beacad990255439ee464b5f3
2023-02-08 21:11:15 +00:00
A. Lombarte 1f02ef5b4e getHost and getHostname have documentation swapped for IPv6
Kubernetes-commit: cb4637b378d464dc8622e637d0a72a29b756336f
2023-02-08 19:50:02 +01:00
Paco Xu 1e1b60ce05 archived design proposals are now moved to Design Proposals Archive Repo.
Kubernetes-commit: 019d2615af3f7fd0ed0d593ef9df348f6d85b204
2023-02-08 11:12:22 +08:00
Jiahui Feng 9fa5ee5fdb generated: ./hack/update-vendor.sh
Kubernetes-commit: b29f618ca7e35a5116ab8c36f3f819ea5ee44ae5
2023-02-07 15:57:05 -08:00
Jiahui Feng de2a3360b1 avoid deepcopying schemas.
Kubernetes-commit: 7106d42a275e959d55e407180668873451399d81
2023-02-07 18:03:58 -08:00
Jiahui Feng 5ec13b3cf1 adaptor between structral and OpenAPI.
Kubernetes-commit: 7eb7c8b4fadc40f987de668c37abc99c1d58b557
2023-02-06 18:56:51 -08:00
Jordan Liggitt 8d0e8f8cb8 Partition watchers by namespace/name scope
Kubernetes-commit: 1c2fa0c7f791cbe28ee54d957d6f8a1120d91018
2023-02-05 18:46:19 -05:00
Lukasz Szaszkiewicz c190575821 Add SetListOptionsDefaults for setting defaults on ListOptions
Kubernetes-commit: 52d613efde52437a64a1d4438f28e50d59c1596e
2023-01-31 14:07:30 +01:00
Lukasz Szaszkiewicz 10e39104a7 Disable SendInitialEvents for etcd and watch cache
Kubernetes-commit: 7b67bbbcf361983e563663424e13f2b6cf6d5392
2023-03-01 11:00:12 +01:00
Paco Xu d32b6a6fa4 upgrade etcd deps to v3.5.7
Signed-off-by: Paco Xu <paco.xu@daocloud.io>

Kubernetes-commit: b5dbb33da9df0bc3591d2da7462b1e0889299781
2023-01-31 14:24:31 +08:00
Lukasz Szaszkiewicz 175c211688 Add SendInitialEvents to storage ListOptions
Kubernetes-commit: e1537fc41b9eecb0e5026bfc72b27e4a07d771ba
2023-01-30 14:54:59 +01:00
Lukasz Szaszkiewicz c0f50f11ef Update calls to ValidateListOptions
Kubernetes-commit: 4b3e0a39e5c1850363328682b8208be400f3b4a3
2023-01-30 14:10:10 +01:00
Lukasz Szaszkiewicz 5bdfba728f Add WatchList feature gate
Kubernetes-commit: ea084ff4da7c6227b09435473ceb5bf3b8343124
2023-03-01 10:57:17 +01:00
Patrick Ohly 2299962290 dependencies: update klog v2.90.1
This improves performance of the text formatting and ktesting.

Because ktesting no longer buffers messages by default, one unit
test needs to ask for that explicitly.

Kubernetes-commit: 961819a4d09488e20931103e0c36d2bed588fdcb
2023-01-23 18:19:54 +01:00
Nilekh Chaudhari 9bc62d2547 feat: implements encrypt all
Signed-off-by: Nilekh Chaudhari <1626598+nilekhc@users.noreply.github.com>

Kubernetes-commit: 9382fab9b65669e74e8fb77247b14e6cb3ec6b3f
2023-01-18 00:54:47 +00:00
Madhav Jivrajani db00da87d8 cacher: Fix watch behaviour for unset RV
The original design was to honour strong consistency
semantics for when the RV is unset, i.e. serve the
watch by doing a quorum read.

However, the implementation did not match the intent,
in that, the Cacher did not distinguish between set
and unset RV. This commit rectifies that behaviour by
serving the watch from the underlying storage if the
RV is unset.

This commit subsequently also adds a test for the same.

Signed-off-by: Madhav Jivrajani <madhav.jiv@gmail.com>

Kubernetes-commit: 610b67031c79c6c38964631d27dd59df357c6d2e
2023-01-16 11:10:05 +05:30
Madhav Jivrajani fd369afe45 cacher: Allow injecting errors for Watch()
This commit allows injecting errors for the
Watch() method of the dummy storage impl.

As a consequence of this, a race is introduced
between when the injected error is written and
read whenever a Watch() is invoked using the
dummy storage. This commit adds locking in order
to mitigate this.

Signed-off-by: Madhav Jivrajani <madhav.jiv@gmail.com>

Kubernetes-commit: 2593671337ad449f51b9dcc0b63aa190dd07ab68
2023-01-16 12:48:43 +05:30
hasheddan 330de968e5 Fix gorestful typos in the APIServerHandler.Director docstring
Fixes up a few misspellings of gorestful in the Director field docstring
for APIServerHandler.

Signed-off-by: hasheddan <georgedanielmangum@gmail.com>

Kubernetes-commit: b1e3326eaeee982d3d5c1618022c306d50fe631e
2023-01-14 12:10:00 -05:00
Abu Kashem 61a789ab70 apiserver: terminate watch with a rate limiter during shutdown
Kubernetes-commit: 6385b86a9b124eb03848af9a3029e8bc9058d72f
2023-01-13 18:04:13 -05:00
Abu Kashem 4995a4f631 apiserver: watch gets notified on server shutdown signal
Kubernetes-commit: 697d96710856f96329a79a2574e109abd2f1626a
2023-01-13 18:02:41 -05:00
Anish Ramasekar ea9c745386 [KMSv2] Generate proto API and update feature gate for beta
Signed-off-by: Anish Ramasekar <anish.ramasekar@gmail.com>

Kubernetes-commit: ad698cc0aeb6e9b5fb1a7913d5db9f65fb1a51ac
2023-01-12 00:14:42 +00:00
Alexander Zielenski d58478335d clean up unnecessary field
Kubernetes-commit: 3e96127af1d33b7d958d6cb328eaf06b49904d46
2023-01-11 14:54:03 -08:00
Jiahui Feng b0c0a5edc5 make structural type use OpenAPI lib.
Kubernetes-commit: e11ea145eaa9c3261a3a6c3ef8c9c5ff29ad5e56
2023-01-11 10:08:11 -08:00
Jefftree 91d432c304 Enable aggregated discovery
Kubernetes-commit: 361391117dcb5ab76dc06918d4165c6c644ad717
2023-01-09 17:51:19 +00:00
Antoine Pelisse f42dbf07d0 Update kubernetes code for minor API changes to kube-openapi
Kubernetes-commit: 88ec8fba32f0ef7b768ec528cfbe44046877ea34
2022-12-29 12:12:33 -08:00
Antoine Pelisse 2f34b8f267 Update kube-openapi to 15aac26d736a
Kubernetes-commit: 9bbdb9f130516a14a73914d0b41396ddb72a88ea
2023-03-07 16:14:54 -08:00
Antoine Pelisse 85d860d23f managedfields: Move most of fieldmanager package to managefields
Kubernetes-commit: 4f3859ce911bd308dbf6f617a8c9e2bdf3a1883b
2022-12-22 14:34:58 -08:00
Damien Grisonnet 77fa29c10e pkg/registry: rename pod logs metrics
The pod_logs subsystem was inadvertently made redundant in the following
kube-apiserver metrics:
- kube_apiserver_pod_logs_pods_logs_backend_tls_failure_total
- kube_apiserver_pod_logs_pods_logs_insecure_backend_total

To safely rename them, it is required to deprecate them in 1.27 whilst
introducing the new metrics replacing them.

Signed-off-by: Damien Grisonnet <dgrisonn@redhat.com>

Kubernetes-commit: 1efa1a65ee26c68de3f972f4e079338889a3e5e9
2022-12-14 23:40:21 +01:00
Jiahui Feng ac15595911 create OWNERS file for cel libs.
Kubernetes-commit: 43ef87a2680ecc007a036ca032ee17e294aff55c
2022-12-14 09:19:25 -08:00
Jiahui Feng 46ab726885 implement OpenAPI-based schema resolver.
Kubernetes-commit: 26089a4c957a87c27da31ecbf171e4943f5af6c0
2022-12-14 09:18:54 -08:00
Jiahui Feng bfa588de84 refit CEL typing library
to use OpenAPI schemas.

Kubernetes-commit: f2ee977afd72ee2a66fb491eb74713f1d14a12fd
2022-12-14 09:18:27 -08:00
ZhangYu 7e4c7c03fd change unnecessary switch to if in metrics.go
Kubernetes-commit: 48b9f7bb6c8298a00cdc04e394af15afe5804a3e
2022-11-30 11:04:03 +08:00
Kubernetes Publisher 534818d7e2 Merge pull request #115394 from ritazh/kmsv2-metrics
kmsv2: add metrics

Kubernetes-commit: 292450717cb76e0c480fa5883d18fe1245176d63
2023-02-16 04:24:46 +00:00
Kubernetes Publisher acc030f978 Merge pull request #115802 from logicalhan/webhook-metrics
webhook metrics top out at 2.5s but default timeout is 10s

Kubernetes-commit: a25834cb5a16bbd6a9295aeb5d1621aa8a4cd407
2023-02-16 00:32:54 +00:00
Han Kang 6ae8541062 add 25s bucket
Kubernetes-commit: 7b823002f3ee850b53cc0523ca271bc18661e5ef
2023-02-15 10:27:56 -08:00
Han Kang d92f186e5f use 10 seconds as the biggest bucket for webhook metrics otherwise charts will top out at 2.5s for webhook latencies
Kubernetes-commit: 20b5205dad419fa79b0c6cd69d01183d21f7d9c5
2023-02-15 09:16:16 -08:00
Kubernetes Publisher 019815a2d6 Merge pull request #115786 from liggitt/net-0.7.0-master
Update golang.org/x/net to v0.7.0

Kubernetes-commit: b3d8ac8496a23d65a907f9333d906bcd5463764e
2023-02-15 12:11:58 +00:00
Kubernetes Publisher 4481ce46b5 Merge pull request #115626 from hh/patch-3
Migrate apiserver tracing_test.go to registry.k8s.io

Kubernetes-commit: 62903e3de68475bccceb08735eba311f02302b3e
2023-02-15 06:34:09 +00:00
Kubernetes Publisher 7ccdd9a293 Merge pull request #115758 from sourcelliu/storageversion
Remove unused code

Kubernetes-commit: b8688048f8d3cca513ae36b2eb6e15f457a18df3
2023-02-15 06:34:04 +00:00
Jordan Liggitt ea0916c5d0 Update golang.org/x/net to v0.7.0
Kubernetes-commit: f8e00778ddca11c08117ccf1d1c410641c70c428
2023-02-14 23:14:30 -05:00
Kubernetes Publisher fce0631cbe Merge pull request #115456 from pohly/goroutine-leak-check
test/integration: goroutine leak check

Kubernetes-commit: 4cf352c4bba7ae7b2cf95f3278afc44a12c9b332
2023-02-14 18:23:56 +00:00
mantuliu 24f1059004 Remove unused code
Signed-off-by: mantuliu <240951888@qq.com>

Kubernetes-commit: bc70548c470983b2299a6d29add41ea81f676d92
2023-02-14 20:08:11 +08:00
Hippie Hacker 90d239d3a7 Migrate apiserver to registry.k8s.io
Part of kubernetes/k8s.io#4738

Kubernetes-commit: 75da0cc91ad5a268ef5a2b1fa0b251b81347ca56
2023-02-09 06:49:27 +13:00
Patrick Ohly 64242c43b8 test: use go-uber/goleak for strict leak checking
It provides more readable output and has additional APIs for using it inside a
unit test. goleak.IgnoreCurrent is needed to filter out the goroutine that gets
started when importing go.opencensus.io/stats/view.

In order to handle background goroutines that get created on demand and cannot
be stopped (like the one for LogzHealth), a helper function ensures that those
are running before calling goleak.IgnoreCurrent. Keeping those goroutines
running is not a problem and thus not worth the effort of adding new APIs to
stop them.

Other goroutines are genuine leaks for which no fix is available. Those get
suppressed via IgnoreTopFunction, which works as long as that function
is unique enough.

Example output for the leak fixed in https://github.com/kubernetes/kubernetes/pull/115423:

    E0202 09:30:51.641841   74789 etcd.go:205] "EtcdMain goroutine check" err=<
        found unexpected goroutines:
        [Goroutine 4889 in state chan receive, with k8s.io/apimachinery/pkg/watch.(*Broadcaster).loop on top of the stack:
        goroutine 4889 [chan receive]:
        k8s.io/apimachinery/pkg/watch.(*Broadcaster).loop(0xc0076183c0)
        	/nvme/gopath/src/k8s.io/kubernetes/vendor/k8s.io/apimachinery/pkg/watch/mux.go:268 +0x65
        created by k8s.io/apimachinery/pkg/watch.NewBroadcaster
        	/nvme/gopath/src/k8s.io/kubernetes/vendor/k8s.io/apimachinery/pkg/watch/mux.go:77 +0x116
    >

Kubernetes-commit: f131cabfa05d4d2867d987516c898f3a3519f21c
2023-02-01 14:48:46 +01:00
Kubernetes Publisher 942c3101da Merge pull request #115669 from aramase/aramase/f/structured_logging_check_kms
logcheck.conf: ensure that kms and value/encrypt uses structured logging

Kubernetes-commit: d2f40481d115155f3ce7abc0b7b2ff2cf8a0bb1e
2023-02-09 20:37:46 -08:00
Anish Ramasekar 0304cd9f08 logcheck.conf: ensure that kms and value/encrypt uses structured logging
Signed-off-by: Anish Ramasekar <anish.ramasekar@gmail.com>

Kubernetes-commit: b6b00e65bcfe40fdaca9ce8b214baf5015ad7c5c
2023-02-10 00:17:54 +00:00