Commit Graph

181 Commits

Author SHA1 Message Date
Marek Siarkowicz c1a2d5992c Graduate BtreeWatchCache feature gate to GA
Kubernetes-commit: e0f548183c46b1a488afa788666638b99499fb3a
2025-01-31 15:33:07 +01:00
Marek Siarkowicz 66f788143e Flip SeparateCacheWatchRPC feature gate to false and deprecate it.
Watch requests to etcd are mapped to a single stream that has a limited throughput.
By opening a lot of concurrent watch requests to single resource, users
could starve other watches from getting any events.

Separating the RPC was meant to protect the watch opened by cache.
However, as we are no longer planning to allow users to open watch directly to etcd,
the flag is not needed.

Kubernetes-commit: 4a5bbc4c159ec7d185d5fc39b95c48dbf3fab7d9
2025-01-31 11:38:58 +01:00
Marek Siarkowicz 0167eb5d20 Deprecate WatchFromStorageWithoutResourceVersion
Around the 1.31 release, we discovered that a change introduced in 1.27 allowead
clients to open WATCH requests directly to etcd. This had detrimental consequences,
enabling abusive clients to bypass caching and overwhelm etcd.
Unlike the API server, etcd lacks protection against such behavior.

To mitigate this, we redirected all WATCH requests to be served from the cache.
The WatchFromStorageWithoutResourceVersion feature gate was retained as an escape hatch.
However, since we have no plans to allow direct WATCH requests to etcd again,
this flag is now obsolete.

Direct WATCH requests to etcd offer no advantage, as they don't provide stronger
consistency guarantees. WATCH operations are inherently inconsistent; unlike LIST
operations, they do not confirm the resource version with a quorum. While Kubernetes
uses the WithRequireLeader option on WATCH requests to prevent maintaining connections
to isolated etcd members, the API server provides the same level of guarantee through
its health checks, which fail if it cannot connect to etcd member.  Therefore,
the WatchFromStorageWithoutResourceVersion feature gate can be deprecated and removed.

Kubernetes-commit: 065bf2004d27e5e3f1be3c0f128347d4060d8954
2025-01-31 11:49:28 +01:00
yongruilin ee59411d80 feat: add a lint rule to prevent Add unversioned featuregate
Kubernetes-commit: 8a0937c03467d04a25e10473e9570d2c8286cf4b
2025-01-24 11:02:16 -08:00
Paco Xu a2ab8dc0e3 remove GAed EfficientWatchResumption since v1.24
Kubernetes-commit: 69964319d1466d39a190a634a78440247ef83316
2025-01-22 16:50:26 +08:00
Paco Xu b66aedfe5c remove APIListChunking which was GAed since v1.29
Kubernetes-commit: 8d7aed698b772d38087103f385569ab769647923
2025-01-17 15:56:19 +08:00
Wojciech Tyczyński 30363fdd34 Remove WatchBookmark feature gate
Kubernetes-commit: a7937f5391598b50bc5d6eafdad69a462bc55dec
2025-01-13 15:54:17 +01:00
Siyuan Zhang 0daeb9f98b Add Validation to versioned feature specs.
Co-authored-by: Jordan Liggitt <liggitt@google.com>
Co-authored-by: Siyuan Zhang <sizhang@google.com>

Signed-off-by: Siyuan Zhang <sizhang@google.com>

Kubernetes-commit: 00dab9dffa6a35fbfaad4ebcdd17be00f40e423c
2024-12-03 18:48:07 +00:00
modulitos 026bd8791b set user.DefaultInfo.UID from x509 cert
Kubernetes-commit: b577972a551ea0dbc22f29ac97f0a0e621d42e1b
2024-10-06 19:28:21 -07:00
Stanislav Láznička 5047b8fe41 featuregate UID in RequestHeader authenticator
Kubernetes-commit: a051b067cdffc92fbe40bcc5a8e8f1bf974348c4
2024-12-04 15:44:45 +01:00
Abu Kashem 1f27993c44 implement unsafe deletion, and wire it
- implement unsafe deletion, and wire it
- aggregate corrupt object error(s) from the storage LIST operation
- extend storage error:
a) add a new type ErrCodeCorruptObj to represent a corrupt object:
b) add a new member 'InnerErr error' to StorageError to hold
   the inner error
- add API status error

Kubernetes-commit: 5d4b4a160dc551dc8979012eeabea1a098945603
2024-09-20 17:36:27 -04:00
Ben Luddy ca9c3d965e Add CBOR feature gates.
For alpha, there is one apiserver feature gate and two client-go feature gates controlling
CBOR. They were initially wired to separate test-only feature gate instances in order to prevent
them from being configurable at runtime via command-line flags or environment variables (for
client-go feature gates outside of Kubernetes components). All of the integration tests required by
the KEP as alpha criteria have been implemented. This adds the feature gates to the usual feature
gate instances and removes the temporary code to support separate test-only feature gate instances.

Kubernetes-commit: 072dfcb416fd4e1ddab0a89ac4faf519e268bc96
2024-11-04 10:40:19 -05:00
Marek Siarkowicz e85d45c0a4 Use btree for watch cache storage to serve LIST more efficiently
Can be disabled via BtreeWatchCache feature flag.

Kubernetes-commit: 5ea427ebb508ce2871d4d0f9869959275c0d3bce
2024-08-17 11:01:41 +02:00
Joe Betz bd808a01a1 Add feature gate
Co-authored-by: cici37 <cicih@google.com>

Kubernetes-commit: 4b13362dda020f80cf961dbeefae750f63f803f9
2024-10-25 13:22:58 -04:00
carlory 9b88185823 remove general avaliable feature-gate ZeroLimitedNominalConcurrencyShares
Kubernetes-commit: f68dc137609d6ceb2b4e66bd746bbf9f9e92ce25
2024-09-05 10:53:51 +08:00
Ben Luddy f27bb5491e Wire test-only feature gate for CBOR serving.
To mitigate the risk of introducing a new protocol, integration tests for CBOR will be written using
a test-only feature gate instance that is not wired to runtime options. On alpha graduation, the
test-only feature gate instance will be replaced by a normal feature gate in the existing apiserver
feature gate instance.

Kubernetes-commit: 0cad1a89b6721308746cc1a12f12de31a259a0d3
2024-10-23 16:36:25 -04:00
Jordan Liggitt 08766af90d KEP-3221: Promote StructuredAuthorizationConfiguration to GA
Kubernetes-commit: ad808e609a599723cf17f7fcdfb73ca37bcf78fc
2024-10-17 21:48:30 -04:00
Jordan Liggitt 1e62dc23aa KEP-4601: AuthorizeNodeWithSelectors / AuthorizeWithSelectors to beta
Kubernetes-commit: 9caca7312645b5ffba964cc8170484b4e7f7b602
2024-10-17 19:51:07 -04:00
Lukasz Szaszkiewicz aeae19662f Promote WatchList feature to Beta (#128053)
* e2e/apimachinery/watchlist: always run WatchList e2e tests

* kube-controller-manager: enable WatchListClient

* kube-apiserver: promote WatchList feature to beta

Kubernetes-commit: 06a15c5cf96131faaf44f93f1be228a013ae5c0d
2024-10-17 12:39:53 +00:00
AmarNathChary 54c7d50dd6 removed_comments_from_kube_feature_of_alpha_beta_ga
Kubernetes-commit: ff7c708207738c80c7a1185faa20f7f84afe5fb3
2024-10-16 15:36:34 +05:30
Cici Huang 0381d1eed6 Promote cost enforcement feature gates to GA
Kubernetes-commit: 4c64aa7a4eda6c379a3dec061dfef5beb311d66a
2024-09-26 16:39:18 +00:00
Jefftree 38adb499b0 Port the rest of unversioned features
Kubernetes-commit: a8390dcddda14274e5ce24dd517a19587118a198
2024-09-27 19:04:47 +00:00
Omer Aplatony 6dc6d8d7fa chore: moving apiserver featuregates to versioned
Signed-off-by: Omer Aplatony <omerap12@gmail.com>

Kubernetes-commit: ade730594005f93ac18e102ba54d61dbf23b616f
2024-09-24 23:36:30 +03:00
Joe Betz 91a4bf232d Promote RetryGenerateName to GA
Kubernetes-commit: e3cae09e63d72edef9cf841979418291acc31b17
2024-09-10 12:34:36 -04:00
Adarsh-verma-14 5db4826844 fixing inconsistency between the comment and the actual feature gate definition
Kubernetes-commit: 8f471803cb386c2a227fa61e922822aab168ec95
2024-09-09 18:33:00 +05:30
Jefftree b93ecaaa38 remove duplicate unused feature InPlacePodVerticalScaling
Kubernetes-commit: 14fe8e2a91ba5f6fc53617bea32223d79e1a060c
2024-09-05 16:27:07 +00:00
Adarsh-verma-14 8a5b9105e9 add missing comment
Kubernetes-commit: 8619996319a07d5c5f777b6e06f54ce3884a73b4
2024-09-07 00:07:31 +05:30
Jefftree e778ced9b7 Remove example feature gate from pkg/apiserver/kube_features.go
Kubernetes-commit: 79deb21ac1d0837fbafdf9e1556019062590c1d8
2024-09-04 14:50:41 +00:00
Vinayak Goyal 491f6248d4 KEP-4633: Graduate to BETA.
Signed-off-by: Vinayak Goyal <vinaygo@google.com>

Kubernetes-commit: 8a4e23ea30bb0af50aa425cea8af926998872ee4
2024-08-22 01:28:57 +00:00
carlory af2142bfe4 Remove GAed feature gates ServerSideApply/ServerSideFieldValidation
Kubernetes-commit: de7e4318d6b2ad0de4472dcaef7d97c34057d3d8
2024-09-02 13:52:48 +08:00
Cici Huang fac4f5d2a0 Remove feature gate ValiatingAdmissionPolicy after stable.
Kubernetes-commit: 0f19faf9be562f3d18880ed2ae12d6b9d059476c
2024-08-12 12:11:02 -07:00
Monis Khan 272e9eba82 Remove KMSv2 and KMSv2KDF feature gates
These have been GA since v1.29 and can be safely removed.

Signed-off-by: Monis Khan <mok@microsoft.com>

Kubernetes-commit: 6398b8a19fe0e113cf250c13b0639dea258a174f
2024-08-14 15:59:01 -04:00
Marek Siarkowicz 9aa7a6ac61 Introduce ConcurrentWatchObjectDecode feature gate disabled by default
Kubernetes-commit: 93a10a75698075e86344ee4fdb56701309468b95
2024-07-30 16:28:48 +02:00
Marek Siarkowicz c470f38c60 Move ConsistentListFromCache to Beta default again
This reverts commit aeb51a16e369d5b823a8ae6488d1d5e12c683516.

Kubernetes-commit: 2ca56aab87d0927e568f1d896d49692433d5d93a
2024-07-30 22:49:47 +02:00
Ben Luddy 788e7ee758 Move APIServingWithRoutine to alpha and disabled by default.
Kubernetes-commit: c8380040848fcbd0a0cc06600b9d4531b65098d2
2024-07-30 16:33:31 -04:00
Jefftree e749b346fa CLE feature gate
Kubernetes-commit: 9b16b0dc97c3f353f60eb935a8a532ec82b5e18e
2024-07-21 20:04:36 +00:00
Cici Huang 5678a8c44d Remove feature gate CustomResourceValidationExpressions.
Kubernetes-commit: 67a171a1422cc5861491aadd69e51ce718196434
2024-07-16 10:39:00 -07:00
David Eads f26d4ed894 add field and label selectors to authorization attributes
Co-authored-by: Jordan Liggitt <liggitt@google.com>

Kubernetes-commit: 92e3445e9d7a587ddb56b3ff4b1445244fbf9abd
2024-05-23 15:12:26 -04:00
Lukasz Szaszkiewicz 708f0cf46b Revert "kube-apiserver: promote WatchList feature to beta"
This reverts commit 0b15903b35d83ca32833e81997b6257ee4d4f369.

Kubernetes-commit: 88f47b4b4df2f099cc20381fdc0fbcfe0afcee8e
2024-07-18 09:29:24 +02:00
Monis Khan 17ba1a9a64 Revert "Move ConsistentListFromCache to Beta default"
This reverts commit 0c0e19b343d48d4bea0e7fa735e3781c70298a34.

During stress test for SVM controller, the controller is unable to
make a list call due to following error:

resourceversion.go:155: I0716 21:49:26.973127] storage-version-migrator-controller: Error syncing SVM resource, retrying svm="crdsvm" err="error getting latest resourceVersion for stable.example.com/v1, Resource=testcrds: Timeout: Too large resource version: 28976, current: 20349"

With the feature disabled, the stress test passes.

Signed-off-by: Monis Khan <mok@microsoft.com>

Kubernetes-commit: aeb51a16e369d5b823a8ae6488d1d5e12c683516
2024-07-16 23:12:16 -04:00
Abu Kashem f553925235 apiserver: remove feature gate APIPriorityAndFairness
Kubernetes-commit: ae647032a74bf8f671fa8db0602dee301cf865bf
2024-07-02 12:55:43 -04:00
Wojciech Tyczyński a643e14347 Implement resilient watchcache initialization post-start-hook
Kubernetes-commit: a5772bd42593f6492f5169eef49bc9884f95abba
2024-06-13 11:02:18 +02:00
Lukasz Szaszkiewicz 8321755755 kube-apiserver: promote WatchList feature to beta
Kubernetes-commit: 0b15903b35d83ca32833e81997b6257ee4d4f369
2024-06-19 11:48:20 +02:00
Vinayak Goyal 77f498853b KEP-4633: Allow health-only anonymous auth mode.
Signed-off-by: Vinayak Goyal <vinaygo@google.com>

Kubernetes-commit: 5e6a4937f5a3e20dd77238946220461332ecddff
2024-05-16 21:18:34 +00:00
Siyuan Zhang 22612a3528 apiserver: Add API emulation versioning.
Co-authored-by: Siyuan Zhang <sizhang@google.com>
Co-authored-by: Joe Betz <jpbetz@google.com>
Co-authored-by: Alex Zielenski <zielenski@google.com>

Signed-off-by: Siyuan Zhang <sizhang@google.com>

Kubernetes-commit: 403301bfdf2c7312591077827abd2e72f445a53a
2024-01-19 16:07:00 -08:00
Marek Siarkowicz ddbe9fe28a Move ConsistentListFromCache to Beta default
Kubernetes-commit: 0c0e19b343d48d4bea0e7fa735e3781c70298a34
2024-02-26 14:34:53 +01:00
Wojciech Tyczyński 5a0e942d09 Implement ResilientWatchCacheInitialization
Kubernetes-commit: a8ef6e9f0104a44023162bb8229fb677ec80beb1
2024-04-29 14:19:46 +02:00
Cici Huang d44012e895 Adding the feature gates to fix cost for VAP and webhook matchConditions.
Kubernetes-commit: d6e4115ead6b93d2accf688876471231b365ceae
2024-05-01 16:26:41 -07:00
Joe Betz e721afc903 Promote RetryGenerateName to beta
Kubernetes-commit: 1b59f3678fa95cb6bf647e349dd8ba023914eff0
2024-05-01 20:34:21 -04:00
Marek Siarkowicz 13a815b7c8 Serve watch without resourceVersion from cache and introduce a WatchFromStorageWithoutResourceVersion feature gate to allow serving watch from storage.
Kubernetes-commit: 0130072b053f85fb736c24d34552208cdd1bccfe
2024-03-14 15:20:29 +01:00