Commit Graph

101 Commits

Author SHA1 Message Date
Stanislav Láznička
e0f536bf1f use the ClusterTrustBundles beta API 2025-03-11 18:07:24 +01:00
Paco Xu
8195f82fe8 remove AggregatedDiscoveryEndpoint that was GAed in v1.30 2025-03-11 10:51:43 +08:00
Jefftree
05a90bf642 Revert "Add LeaseCandidate v1beta1"
This reverts commit fad4594fd9.
2025-03-01 14:14:25 +00:00
Jefftree
1a1b566d61 Revert "LeaseCandidate alpha -> beta,"
This reverts commit ac7a95efb0.
2025-03-01 14:14:19 +00:00
Jefftree
ac7a95efb0 LeaseCandidate alpha -> beta, 2025-02-27 17:50:36 +00:00
Jefftree
fad4594fd9 Add LeaseCandidate v1beta1 2025-02-27 15:41:26 +00:00
Kubernetes Prow Robot
1e38c86893 Merge pull request #129996 from yongruilin/fix-flag-apiserver
fix: apiserver flagz to response actual parsed flags
2025-02-16 13:56:23 -08:00
Mark Rossetti
5e6611af55 fixing various unit tests on Windows that create abstract sockets
by now having them create file-based sockets on windows/darwin

Signed-off-by: Mark Rossetti <marosset@microsoft.com>
2025-02-13 15:41:33 -08:00
yongruilin
b1d72a5b7c test: Add emulated-version flag verification in flagz test 2025-02-07 22:18:36 -08:00
Siyuan Zhang
8fc3a33454 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>
2025-02-05 16:10:53 -08:00
Samuel Davidson
7936d64e03 Replace IsExternalSigner boolean with ExtendedSigningDuration throughout apiserver to ensure consistent token signing length between local and external token signing. 2025-01-29 17:49:22 +00:00
Antoni Zawodny
4a2b7ee569 Configure watch cache history window based on request timeout 2024-12-17 15:06:00 +01:00
Jordan Liggitt
1fd76884b9 Isolate mock signer for externaljwt tests 2024-12-02 18:44:40 -05:00
Kubernetes Prow Robot
45260fd76a Merge pull request #127857 from Jefftree/cle-v1alpha2
Coordinated Leader Election add v1alpha2
2024-11-08 07:10:43 +00:00
Jefftree
0ce7b688a6 v1alpha2 LeaseCandidate API 2024-11-08 02:27:19 +00:00
Richa Banker
da8dc433e9 Add flagz implementation and enablement in apiserver 2024-11-07 17:11:49 -08:00
Richa Banker
8bf6eecedf add statusz implementation and enablement in apiserver 2024-11-07 12:37:38 -08:00
Harshal Neelkamal
6fdacf0411 Add plugin and key-cache for ExternalJWTSigner integration 2024-11-07 03:16:23 +00:00
Patrick Ohly
d6bad27b7d DRA apiserver: allow DRAAdminAccess feature without DynamicResourceAllocation
This makes a configuration with --feature-gates=AllAlpha=true valid
again. Without this change, that flag enabled DRAAdminAccess without
DynamicResourceAllocation being enabled (default off!) and the kube-apiserver
refused to start.

While DRAAdminAccess isn't usable without DynamicResourceAllocation, it's also
not really wrong to allow it - it simply won't matter.
2024-11-06 13:03:20 +01:00
Joe Betz
c0f9c81338 Add MutatingAdmissionPolicy to samples 2024-11-04 21:40:54 -05:00
Patrick Ohly
9a7e4ccab2 DRA admin access: add feature gate
The new DRAAdminAccess feature gate has the following effects:
- If disabled in the apiserver, the spec.devices.requests[*].adminAccess
  field gets cleared. Same in the status. In both cases the scenario
  that it was already set and a claim or claim template get updated
  is special: in those cases, the field is not cleared.

  Also, allocating a claim with admin access is allowed regardless of the
  feature gate and the field is not cleared. In practice, the scheduler
  will not do that.
- If disabled in the resource claim controller, creating ResourceClaims
  with the field set gets rejected. This prevents running workloads
  which depend on admin access.
- If disabled in the scheduler, claims with admin access don't get
  allocated. The effect is the same.

The alternative would have been to ignore the fields in claim controller and
scheduler. This is bad because a monitoring workload then runs, blocking
resources that probably were meant for production workloads.
2024-10-29 09:50:11 +01:00
Richa Banker
9274a584b8 Split k8s.io/component-base/registry and add into k8s.io/component-base/version and k8s.io/component-base/featuregate 2024-10-24 19:09:30 -07:00
Richa Banker
81cd728c66 Move k8s.io/apiserver/pkg/util/version to component-base 2024-10-22 13:03:42 -07:00
Patrick Ohly
f84eb5ecf8 DRA: remove "classic DRA"
This removes the DRAControlPlaneController feature gate, the fields controlled
by it (claim.spec.controller, claim.status.deallocationRequested,
claim.status.allocation.controller, class.spec.suitableNodes), the
PodSchedulingContext type, and all code related to the feature.

The feature gets removed because there is no path towards beta and GA and DRA
with "structured parameters" should be able to replace it.
2024-10-16 23:09:50 +02:00
Stanislav Láznička
0409ba7ff1 cluster trust CM: wire in the new RequestHeader UID config 2024-09-05 14:28:31 +02:00
Jefftree
56b278d5d2 fix flake in TestLeaseCandidateCleanup 2024-07-24 14:41:13 +00:00
Jefftree
0c774d0b1f Change PingTime to be persistent 2024-07-24 14:41:13 +00:00
Jefftree
e0c6987ca8 add gc and improve testing 2024-07-24 14:38:11 +00:00
Jefftree
c47ff1e1a9 CLE controller and client changes 2024-07-24 14:38:11 +00:00
Jefftree
e3e56eb1e2 CLE storage and type registration changes 2024-07-24 14:38:11 +00:00
Kubernetes Prow Robot
e83fca8dd9 Merge pull request #124530 from sttts/sttts-controlplane-plumbing-split
Step 12 - Add generic controlplane example
2024-07-23 12:21:02 -07:00
Kubernetes Prow Robot
bb350f7111 Merge pull request #125661 from mjudeikis/mjudeikis/poststarthookctx.stopch.cleanup
Clean deprecated context.StopCh
2024-07-23 02:12:22 -07:00
Dr. Stefan Schimanski
17970b291a generic-controlplane: add generic-controlplane apiserver sample
Signed-off-by: Dr. Stefan Schimanski <stefan.schimanski@gmail.com>

generic

Signed-off-by: Dr. Stefan Schimanski <stefan.schimanski@gmail.com>
2024-07-23 08:38:33 +02:00
Patrick Ohly
9f36c8d718 DRA: add DRAControlPlaneController feature gate for "classic DRA"
In the API, the effect of the feature gate is that alpha fields get dropped on
create. They get preserved during updates if already set. The
PodSchedulingContext registration is *not* restricted by the feature gate.
This enables deleting stale PodSchedulingContext objects after disabling
the feature gate.

The scheduler checks the new feature gate before setting up an informer for
PodSchedulingContext objects and when deciding whether it can schedule a
pod. If any claim depends on a control plane controller, the scheduler bails
out, leading to:

    Status:       Pending
    ...
      Warning  FailedScheduling             73s   default-scheduler  0/1 nodes are available: resourceclaim depends on disabled DRAControlPlaneController feature. no new claims to deallocate, preemption: 0/1 nodes are available: 1 Preemption is not helpful for scheduling.

The rest of the changes prepare for testing the new feature separately from
"structured parameters". The goal is to have base "dra" jobs which just enable
and test those, then "classic-dra" jobs which add DRAControlPlaneController.
2024-07-22 18:09:34 +02:00
Patrick Ohly
b51d68bb87 DRA: bump API v1alpha2 -> v1alpha3
This is in preparation for revamping the resource.k8s.io completely. Because
there will be no support for transitioning from v1alpha2 to v1alpha3, the
roundtrip test data for that API in 1.29 and 1.30 gets removed.

Repeating the version in the import name of the API packages is not really
required. It was done for a while to support simpler grepping for usage of
alpha APIs, but there are better ways for that now. So during this transition,
"resourceapi" gets used instead of "resourcev1alpha3" and the version gets
dropped from informer and lister imports. The advantage is that the next bump
to v1beta1 will affect fewer source code lines.

Only source code where the version really matters (like API registration)
retains the versioned import.
2024-07-21 17:28:13 +02:00
Jordan Liggitt
4d535db8be Add selector authorization to the Node authorizer 2024-07-19 15:06:51 -04:00
Jeffrey Ying
1c8204ded1 Remove impossible error check controlplane/apiserver/server.go 2024-07-02 20:41:54 -04:00
Wojciech Tyczyński
a5772bd425 Implement resilient watchcache initialization post-start-hook 2024-07-01 12:54:57 +02:00
Davanum Srinivas
a88dc632a4 kube-apiserver: default --enable-logs-handler flag to false
Co-Authored-By: Iceber Gu <wei.cai-nat@daocloud.io>
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2024-06-28 15:22:22 -04:00
Kubernetes Prow Robot
522e2e5066 Merge pull request #124917 from vinayakankugoyal/kep4633
KEP-4633: Only allow anonymous auth for configured endpoints.
2024-06-27 20:39:51 -07:00
Vinayak Goyal
5e6a4937f5 KEP-4633: Allow health-only anonymous auth mode.
Signed-off-by: Vinayak Goyal <vinaygo@google.com>
2024-06-28 00:30:05 +00:00
Kubernetes Prow Robot
ef1d28aa52 Merge pull request #125177 from liggitt/dynamic-public-key
Move public key serviceaccount getter to interface, filter by key id
2024-06-27 11:57:06 -07:00
Mangirdas Judeikis
24ecb20e41 clean deprecated context.StopCh 2024-06-27 16:07:29 +03:00
Kubernetes Prow Robot
44c1a0eec2 Merge pull request #124667 from linxiulei/trim
controlplane/apiserver: Trim managedFields off self-requested informers
2024-06-26 08:10:20 -07:00
Siyuan Zhang
379676c4be add DefaultComponentGlobalsRegistry flags in ServerRunOptions
Signed-off-by: Siyuan Zhang <sizhang@google.com>
2024-06-25 22:12:11 +00:00
Siyuan Zhang
4352c4ad27 Add version mapping in ComponentGlobalsRegistry.
Signed-off-by: Siyuan Zhang <sizhang@google.com>
2024-06-25 22:12:11 +00:00
Siyuan Zhang
701e5fc374 Add composition flags for emulation version and feature gate.
Signed-off-by: Siyuan Zhang <sizhang@google.com>
2024-06-25 22:12:11 +00:00
Siyuan Zhang
403301bfdf 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>
2024-06-25 22:12:11 +00:00
Jordan Liggitt
3e037070bb Move public key getter to interface 2024-06-25 18:10:08 -04:00
Jordan Liggitt
b8be6275b9 Clean up service account options completion and fallback
- Remove unused fallback to TLS serving key as service account verifying key
- Separate ServiceAccountTokenMaxExpiration setup from signer setup
- Separate the check for a signing method (private key) from the existence of issuers
2024-06-12 21:59:39 -04:00