Commit Graph

1122 Commits

Author SHA1 Message Date
Jon Huhn a4a670721b Fix comment typos
Kubernetes-commit: 006ebbc33a842ed102983c390892d03e908593b9
2025-01-07 21:18:10 -06:00
xigang 056896e970 Fix typo in ResourceEncodingConfig comment
Signed-off-by: xigang <wangxigang2014@gmail.com>

Kubernetes-commit: f844abfc6f950fd90a3b66355641ec53879d79a2
2025-04-18 15:55:38 +08:00
David Mengqi Yu c9834df380 Add example in etcd override flag help text
Kubernetes-commit: 44d31af29bf442520722024f7fa58a64b44d68de
2024-09-04 12:28:53 -07:00
Siyuan Zhang 5a4ec0a797 bug fix: fix version order in emulation forward compatibility.
Signed-off-by: Siyuan Zhang <sizhang@google.com>

Kubernetes-commit: b1a9cc347311012bade7230b55ab95229a1e22c9
2025-04-07 18:38:43 -07:00
David Ashpole 6898b8387d restrict trace context propagation to system:master and system:monitoring
Kubernetes-commit: 3842d74d97d803372eb8e2d6cfc3d3d56a4c7a0d
2024-09-01 18:03:26 +00:00
Siyuan Zhang b94acad08e chore: update emulation version help msg.
Signed-off-by: Siyuan Zhang <sizhang@google.com>

Kubernetes-commit: 0ec6566c68c4e10b0379518bb91fdc4edfce7adc
2025-03-19 10:29:42 -07:00
googs1025 7af25044da flake: fix data race for TestApfWatchHandlePanic unit test
Signed-off-by: googs1025 <googs1025@gmail.com>

Kubernetes-commit: 1a660d3d0c9e93279c8faae56a4f8e1cca0003a4
2025-03-12 10:44:49 +08:00
Siyuan Zhang 942f114031 Add option to explicitly enable future gv or gvr in runtime-config.
Signed-off-by: Siyuan Zhang <sizhang@google.com>

Kubernetes-commit: 3d2d8db83509eadcad0529fda1f8ef81e1682ca5
2025-02-07 16:43:58 -08:00
Siyuan Zhang 5a72bc815b Add emulation forward compatibility into api enablement and RemoveDeletedKinds.
Signed-off-by: Siyuan Zhang <sizhang@google.com>

Kubernetes-commit: 819cb8fe22fe37bf691f460bc32d0f03f53cce09
2025-02-04 10:11:56 -08:00
yongruilin 2b4f068bdb refactor: detach Info from apimachinery util version
- Remove `info` field from `Version` struct
- Modify `WithInfo` and `Info` methods to be deprecated
- Update version information retrieval to use base version info
- Simplify version information generation in compatibility tests
- Remove unnecessary version info passing in build and test scenarios

Kubernetes-commit: 14934b481ef6522d6c1003ded19002ea45abe5d1
2025-03-05 23:55:08 +00:00
yongruilin b6717882da feat: extend version information with more detailed version fields
- Add new version fields to version.Info struct:
  * EmulationMajor and EmulationMinor to track emulated version
  * MinCompatibilityMajor and MinCompatibilityMinor for compatibility tracking
- Update related code to populate and use these new fields
- Improve version information documentation and OpenAPI generation
- Modify version routes and documentation to reflect new version information structure

Kubernetes-commit: a3094ccbe6f9f134da29aedf4d6d87a9a97bf463
2025-02-06 16:11:12 -08:00
Marek Siarkowicz 67ec836891 Implement streaming proto encoding
Kubernetes-commit: f5dd7107f7144c4f76ca6159c1eeddb48a12feaa
2024-12-19 12:30:39 +01:00
Paco Xu bd0e774416 remove AggregatedDiscoveryEndpoint that was GAed in v1.30
Kubernetes-commit: 8195f82fe82e7bcf36ba50ddc8b78c00fa8df2bc
2025-03-03 11:01:02 +08:00
Jefftree b12d7a1290 Allow OpenAPI verification to pass both with and without strict alpha
handling

Kubernetes-commit: c597cc1f30977bcfaba5aebb2ed7983f578b1f2c
2025-02-20 15:57:37 +00:00
Marek Siarkowicz 38b01a1f78 Streaming JSON encoder for List
Kubernetes-commit: e7c743b2ebfaed1e3132027c0369ac25b14b6f47
2024-12-19 10:38:30 +01:00
HirazawaUi c533eff8e7 adjusting loopback certificate validity in kube-apiserver
Kubernetes-commit: 553e9bf84d199be3d6a3da6675671859723219f4
2025-02-08 19:43:48 +08:00
Siyuan Zhang 9bb4aa730a Refactor compatibility version code
Replace DefaultComponentGlobalsRegistry with new instance of componentGlobalsRegistry in test api server.

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

move kube effective version validation out of component base.

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

move DefaultComponentGlobalsRegistry out of component base.

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

move ComponentGlobalsRegistry out of featuregate pkg.

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

remove usage of DefaultComponentGlobalsRegistry in test files.

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

change non-test DefaultKubeEffectiveVersion to use DefaultBuildEffectiveVersion.

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

Restore useDefaultBuildBinaryVersion in effective version.

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

rename DefaultKubeEffectiveVersion to DefaultKubeEffectiveVersionForTest.

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

pass options.ComponentGlobalsRegistry into config for controller manager and scheduler.

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

Pass apiserver effective version to DefaultResourceEncodingConfig.

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

change statusz registry to take effective version from the components.

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

Address review comments

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

update vendor

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

Kubernetes-commit: 8fc3a33454ba38783bb63de41ecf5343e2ced67c
2024-12-20 07:03:03 +00:00
Zhonghu Xu 29de537bfa Cleanupï: only initiate http2 server options when http2 is not disabled
Kubernetes-commit: a2a0a7521027c2887855dcc0c16857c79f720826
2025-01-09 11:28:51 +08:00
Krzysztof Dąbrowski 2146712740 apiserver: decrease timeout for TestKMSHealthzEndpoint
Kubernetes-commit: ee3e9a7bd448b26f49e07a89247276687b8a535d
2024-03-27 20:58:35 +01:00
Jefftree 15b54ba29c Expand emulated version range to n-3 with 1.31 floor
Kubernetes-commit: cf28c0405c02e82e1028193a4ce1aa75d473ae8e
2024-12-10 16:34:34 +00:00
Patrick Ohly b84662911c remove import doc comments
The "// import <path>" comment has been superseded by Go modules.
We don't have to remove them, but doing so has some advantages:

- They are used inconsistently, which is confusing.
- We can then also remove the (currently broken) hack/update-vanity-imports.sh.
- Last but not least, it would be a first step towards avoiding the k8s.io domain.

This commit was generated with
   sed -i -e 's;^package \(.*\) // import.*;package \1;' $(git grep -l '^package.*// import' | grep -v 'vendor/')

Everything was included, except for
   package labels // import k8s.io/kubernetes/pkg/util/labels
because that package is marked as "read-only".

Kubernetes-commit: 8a908e0c0bd96a3455edf7e3b5f5af90564e65b0
2024-12-02 14:43:58 +01:00
Keisuke Ishigami 753940e964 📝 output log when server shutdown is failed
Kubernetes-commit: dd1300df98682f524a2f028e3b296b3e8783a711
2024-11-21 00:58:27 +09:00
Stanislav Láznička 5047b8fe41 featuregate UID in RequestHeader authenticator
Kubernetes-commit: a051b067cdffc92fbe40bcc5a8e8f1bf974348c4
2024-12-04 15:44:45 +01:00
Richa Banker 10dc325a69 Add flagz implementation and enablement in apiserver
Kubernetes-commit: da8dc433e9b5fb29f3cc91f79ed15f366addefd1
2024-03-28 19:41:00 -07:00
Richa Banker d520e75de3 add statusz implementation and enablement in apiserver
Kubernetes-commit: 8bf6eecedffaa85c6d06ef2c8ad412ded77cb309
2024-06-18 20:30:43 -07:00
Ben Luddy 0b5852eb9a Wire serving codecs to CBOR feature gate.
Integration testing has to this point relied on patching serving codecs for built-in APIs. The
test-only patching is removed and replaced by feature gated checks at runtime.

Kubernetes-commit: 439d2f7b4028638b3d8d9261bb046c3ba8d9bfcb
2024-11-01 16:05:32 -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
Joe Betz a5e93cb37c Add MutatingAdmissionPolicy plugin to admission chain
This expands the generic plugin support to both validating and mutating policies.  It also adds the
mutating policy admission plugin using the generics plugin support.

This also implements both ApplyConfiguration and JSONPatch support.

Co-authored-by: Alexander Zielensk <alexzielenski@gmail.com>

Kubernetes-commit: 25e11cd1c143ef136418c33bfbbbd4f24e32e529
2024-10-25 13:46:58 -04:00
Joe Betz 7d5891a801 Unit test for emulated storage version selection
Kubernetes-commit: d5517b7a518c60e8e6f1aadc1806f4e2a254d6a9
2024-10-30 13:15:35 -04:00
Joe Betz f0baf72379 Don't pick versions that have a replacement as storage version
Kubernetes-commit: af811be190b7d04a49ecf47bf55a3858fa7e7e96
2024-10-30 11:47:43 -04:00
Kubernetes Prow Robot 4bece4d457 Merge pull request #128196 from richabanker/move-version
Move k8s.io/apiserver/pkg/util/version to component-base

Kubernetes-commit: 119f114f012ae6d1cd851bdb2c3f849307e83258
2024-10-29 18:49:35 +00: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
Mangirdas Judeikis 3e52ced45d fully remove StopCh
Signed-off-by: Mangirdas Judeikis <mangirdas@judeikis.lt>

Kubernetes-commit: fd76176811654c409cd6799de4a174bcb051a90d
2024-09-13 12:08:57 +03:00
Vinayak Goyal 9da53c5ba3 KEP-2862: Fine-grained Kubelet API Authorization
Signed-off-by: Vinayak Goyal <vinaygo@google.com>

Kubernetes-commit: b1f290d444f75b351f77f4d3292bbf557ae1cc45
2024-09-29 04:02:55 +00:00
Monis Khan 4f8e2cfe4c kmsv2: run KDF tests in parallel
This change updates the KDF "feature flag" to be per KMS provider
instead of global to the API server.  This allows integration tests
that use distinct provider names to run in parallel.

Locally this change reduced the runtime of
test/integration/controlplane/transformation by 3.5 minutes.

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

Kubernetes-commit: 43740c0def10f22a0ab7f522c1569188913b35a3
2024-10-16 15:01:35 -04:00
Sean Sullivan e6b796812a TracingConfiguration is now validated strictly
Kubernetes-commit: a9c8061b1e4c2ac38c223fa6bf9c5c1bf8b01606
2024-10-14 18:09:16 -07:00
Sean Sullivan 285603b2d8 EgressSelectorConfiguration now uses strict validation
Kubernetes-commit: 32b2eea50d6457b4b1abf50e8e03be52e81d30c2
2024-10-11 16:17:09 -07:00
Lukasz Szaszkiewicz 3257d91a56 server/config: assing system:apiserver user to system:authenticated group
Kubernetes-commit: dfeb560d4a2294c7a9a6233e2acb6b27039ed37a
2024-10-07 17:39:10 +02:00
Abu Kashem 4483cc97cf apiserver: all bookkeeping must complete before apf handler returns
all bookkeeping must complete before the apf handler returns,
whether it panics or returns normally

Kubernetes-commit: 71d9307eaeda86d6a205548ecdeb7fbf226d7d82
2024-09-05 12:01:36 -04:00
Abu Kashem a785076ef7 apiserver: fix apf watch test
the assert to verify that 'atomicReadOnlyExecuting' is zero
should be executed if the apf handler panics, all apf
bookkeeping must be completed before the handler returns

Kubernetes-commit: 0c8632de57075191e6c4e34897fb7871034c7081
2024-09-05 11:57:47 -04:00
Matthieu MOREL e32a42cf11 fix: enable expected-actual rule from testifylint in module `k8s.io/apiserver`
Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>

Kubernetes-commit: fbd773ecb82aa0afef3c02274db901afe1788220
2024-09-27 07:49:07 +02:00
Matthieu MOREL 9996ba35fd fix: enable compares rule from testifylint in module k8s.io/apiserver
Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>

Kubernetes-commit: 6e82050ef0e8eae2c31e43b402646d7591e5eca4
2024-09-21 22:18:56 +02:00
Abhishek Kr Srivastav 17ab6c21d5 Fix Go vet errors for master golang
Co-authored-by: Rajalakshmi-Girish <rajalakshmi.girish1@ibm.com>
Co-authored-by: Abhishek Kr Srivastav <Abhishek.kr.srivastav@ibm.com>

Kubernetes-commit: 95860cff1c418ea6f5494e4a6168e7acd1c390ec
2024-09-12 18:15:22 +05:30
xuzhenglun 3abc312093 add test coverage for cohabitating resources in StroageFactory
Kubernetes-commit: d994895dc4580101f17661eb573fc282d4b8517d
2024-09-12 16:59:08 +08:00
xuzhenglun a096b0dd8d API emulation versioning honors cohabitating resources
Kubernetes-commit: cd5b27304f58f6b634be800ec4ec9990d28550a3
2024-09-09 17:54:35 +08:00
Stanislav Láznička cf15325096 delegate authn: don't default the ReqHeaders UID header
Kubernetes-commit: 26902de531620d2df5ce1bb572d2ea6965a7b7e9
2024-05-20 13:43:22 +02:00
Stanislav Láznička b9e6a66c69 requestheaders: add a "requestheader-uid-headers" flag and wire it up
Kubernetes-commit: 7fabd06c2be41f4134f425fa967d79ac31dc5756
2023-02-16 11:28:50 +01:00
Kensei Nakada cfa44309dd Revert "apiserver: fix data race in apf tests in server/filters package"
This reverts commit dde23bb0b103a00ac9c8e568e81826149b42472c.

Kubernetes-commit: d26772120531617e897a745b1bfd1178648fb995
2024-09-03 19:39:38 +09:00
Kensei Nakada 6bd08c5dc4 Revert "apiserver: improve logging for apf tests in server/filters package"
This reverts commit 8fa3e61399b85d534566dca6566ddb287873839c.

Kubernetes-commit: 9fe3b8410726b0276d2d65a79ce7645660d491f9
2024-09-03 19:39:32 +09:00
Abu Kashem 9d542feed9 apiserver: improve logging for apf tests in server/filters package
Kubernetes-commit: 8fa3e61399b85d534566dca6566ddb287873839c
2024-08-07 07:49:54 -04:00