Commit Graph

1467 Commits

Author SHA1 Message Date
Stanislav Láznička
c36b1c901f KCM: CTB publisher: tolerate NotFound during discovery 2025-03-11 18:07:33 +01:00
Stanislav Láznička
5b3b68a3a1 KCM: CTBPublisher: use generics to handle both alpha/beta APIs 2025-03-11 18:07:29 +01:00
Stanislav Láznička
e0f536bf1f use the ClusterTrustBundles beta API 2025-03-11 18:07:24 +01:00
Morten Torkildsen
36d8a44b9c DRA: Update controller for Prioritized Alternatives in Device Requests 2025-02-28 19:32:59 +00:00
Monokaix
e5becd01c8 correct ResyncPeriod comments
Signed-off-by: Monokaix <changxuzheng@huawei.com>
2025-02-27 15:04:07 +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
Kubernetes Prow Robot
22f25efc2c Merge pull request #128991 from Henrywu573/cm-statuz
Add statusz endpoint for kube-controller-manager
2025-02-05 15:54:15 -08:00
Antonio Ojea
7721590b9e update controller manager 2025-01-20 13:01:53 +00:00
Kubernetes Prow Robot
e305c33988 Merge pull request #126387 from pohly/log-client-go-tools-cache-apis
client-go/tools/cache: add APIs with context parameter
2024-12-18 20:00:09 +01:00
Patrick Ohly
4638ba9716 client-go/tools/cache: add APIs with context parameter
The context is used for cancellation and to support contextual logging.

In most cases, alternative *WithContext APIs get added, except for
NewIntegerResourceVersionMutationCache where code searches indicate that the
API is not used downstream.

An API break around SharedInformer couldn't be avoided because the
alternative (keeping the interface unchanged and adding a second one with
the new method) would have been worse. controller-runtime needs to be updated
because it implements that interface in a test package. Downstream consumers of
controller-runtime will work unless they use those test package.

Converting Kubernetes to use the other new alternatives will follow. In the
meantime, usage of the new alternatives cannot be enforced via logcheck
yet (see https://github.com/kubernetes/kubernetes/issues/126379 for the
process).

Passing context through and checking it for cancellation is tricky for event
handlers. A better approach is to map the context cancellation to the normal
removal of an event handler via a helper goroutine. Thanks to the new
HandleErrorWithLogr and HandleCrashWithLogr, remembering the logger is
sufficient for handling problems at runtime.
2024-12-18 18:45:02 +01:00
Siyuan Zhang
00dab9dffa 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>
2024-12-17 15:59:02 -08:00
Henry Wu
5a8d77a2ae Add statusz endpoint for kube-controller-manager 2024-12-05 23:48:51 +00:00
Jefftree
0ce7b688a6 v1alpha2 LeaseCandidate API 2024-11-08 02:27:19 +00:00
Stanislav Láznička
a4b83e77d9 trustbundles: add a new kube-apiserver-serving signer 2024-11-07 18:07:06 +01:00
Kubernetes Prow Robot
dfba334a33 Merge pull request #128242 from jsafrane/selinux-controller
1710: Add SELinux warning controller
2024-11-06 20:09:44 +00:00
Patrick Ohly
33ea278c51 DRA: use v1beta1 API
No code is left which depends on the v1alpha3, except of course the code
implementing that version.
2024-11-06 13:03:19 +01:00
Jan Safranek
52b47ea4de Don't create a new controller context 2024-11-06 12:29:56 +01:00
Jan Safranek
4b99a342f4 Move feature gate to ControllerDescriptor 2024-11-06 12:29:56 +01:00
Jan Safranek
da2d9fa16e Fix golint errors
Revealed by the new SELinux warning controller, but not related to it.
2024-11-06 11:16:05 +01:00
Jan Safranek
aa8872d7a3 Add SELinux warning controller 2024-11-06 11:16:02 +01:00
Kubernetes Prow Robot
08391b3d27 Merge pull request #123549 from carlory/kep-3751-finalizer
A new controller adds/removes finalizer to VAC for protection
2024-11-05 21:45:30 +00:00
Kubernetes Prow Robot
d34c181465 Merge pull request #128444 from tosi3k/ds-syncs
Add --concurrent-daemonset-syncs argument to kube-controller-manager
2024-10-31 19:21:34 +00:00
Jan Safranek
9e29f95618 Refactor controller-manager volume plugins
Most of the volume plugins were removed from k/k. Refactor how KCM
controllers initialize the few leftovers.
2024-10-31 09:08:30 +01:00
Jan Safranek
cba5a93468 Remove portworx from attachable volume plugins
The volume plugin does not implement AttachableVolumePlugin interface.
2024-10-31 09:08:21 +01:00
Jan Safranek
0ecbdf3622 Remove fc from expandable plugins
FibreChannel volume plugin does not implement ExpandableVolumePlugin.
2024-10-31 09:08:21 +01:00
Jan Safranek
1fa8877c33 Add unit tests for KCM volume plugin probers 2024-10-31 09:08:19 +01:00
Antoni Zawodny
4afa554f65 Add --concurrent-daemonset-syncs flag to kube-controller-manager 2024-10-30 15:03:26 +01: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
Kubernetes Prow Robot
119f114f01 Merge pull request #128196 from richabanker/move-version
Move k8s.io/apiserver/pkg/util/version to component-base
2024-10-25 18:33:01 +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
Kubernetes Prow Robot
1af81c223d Merge pull request #128197 from aojea/extract_provider_flags
disable cloud-provider code from kube-controller-manager
2024-10-24 03:34:59 +01:00
Jeffrey Ying
78afa9ae4b remove unused code when build garbageCollector (#128277)
* remote unused code when build garbageCollector

Change-Id: Ib0474a8da6b250315fd400fb30b6a0a8c4e8ace4

* remove unused import

---------

Co-authored-by: 孔令飞 <colin404@foxmail.com>
2024-10-23 05:28:58 +01:00
Richa Banker
81cd728c66 Move k8s.io/apiserver/pkg/util/version to component-base 2024-10-22 13:03:42 -07:00
Antonio Ojea
8d6769f62c disable cloud-provider code from kube-controller-manager
Since 1.31 the core component cloud provider logic should not exist,
this disables the existing code in the kube-controller-manager that still
expects to work with the cloud-provider logic to avoid having time bombs
in the code base that can break the component.

The code can not be completely removed because this will impact existing
users that may be using some of the flags breaking their deployments, so
this just removes the code that is no longer to be used becuase it
depends on options that no longer are exposed to users.

It also adds validation on the configuration/flag level to ensure that
the --cloud-provider flag can only be set to external or empty.
2024-10-22 14:04:48 +00:00
杨朱 · Kiki
442183a929 Fix crash on kube manager's service-lb-controller after v1.31.0. (#128182)
* Fix crash on kube manager's service-lb-controller after v1.31.0.

* Update cmd/kube-controller-manager/app/controllermanager_test.go

Co-authored-by: Antonio Ojea <antonio.ojea.garcia@gmail.com>

---------

Co-authored-by: Antonio Ojea <antonio.ojea.garcia@gmail.com>
2024-10-21 17:38:52 +01:00
Kubernetes Prow Robot
b1b4e5d397 Merge pull request #128003 from pohly/dra-classic-dra-removal
DRA: remove "classic DRA"
2024-10-18 00:55:17 +01:00
Lukasz Szaszkiewicz
06a15c5cf9 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
2024-10-17 11:07:04 +01: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
Kubernetes Prow Robot
1b71b94b73 Merge pull request #127711 from elmiko/correct-provider-deprecation-logic
Correct cloud provider detection logic to be more representative of deprecation and disablement status
2024-09-30 20:37:24 +01:00
elmiko
38fe239ac4 factor our cloudprovider.DeprecationWarningForProvider
this change removes the deprecation warning function in favor of using
the `cloudprovider.DisableWarningForProvider`. it also fixes some of the
logic to ensure that non-external providers are properly detected and
warned about.
2024-09-30 12:20:25 -04:00
elmiko
d1d05d3eba remove IsDeprecatedInternal from cloudprovider.plugins
The internal cloud controller loops are disabled at this point, this
function should not be used as it does not return accurate information.
In its place we check for the presence of the external cloud provider as
that is the only acceptable value.
2024-09-26 14:55:25 -04:00
haorenfsa
87ca404634 garbagecollector: add initialSyncTimeout for Run
Signed-off-by: haorenfsa <haorenfsa@gmail.com>
2024-09-14 00:01:37 +08:00
Stanislav Láznička
26902de531 delegate authn: don't default the ReqHeaders UID header 2024-09-05 14:32:55 +02:00
Stanislav Láznička
7fabd06c2b requestheaders: add a "requestheader-uid-headers" flag and wire it up 2024-09-05 14:28:31 +02:00
Kubernetes Prow Robot
f28691d069 Merge pull request #127062 from eminwux/fix-kcm-flags-doc
Clarify KCM --service-account-private-key-file flag documentation and improve legacy controller warning message.
2024-09-04 18:20:54 +01:00
Emiliano Spinella
29f23af012 Clarify KCM --service-account-private-key-file flag documentation and remove legacy token controller warning message. 2024-09-04 17:06:07 +02:00
Kubernetes Prow Robot
e5e1b312a7 Merge pull request #126784 from eminwux/fix-allocate-cidr-doc
Fix flag documentation kube-controller-manager and cloud-provider
2024-09-02 16:19:16 +01:00
carlory
a9de9a3d07 controller-manager adds a new controller named volumeattributesclass-protection-controller which adds/removes finalizer to VAC for protection 2024-08-30 15:00:46 +08:00
Cici Huang
0f19faf9be Remove feature gate ValiatingAdmissionPolicy after stable. 2024-08-22 17:39:18 +00:00
Emiliano Spinella
dda5db815a Correct documentation for flags --allocate-node-cidrs and --cluster-cidr in cloud-provider and --service-cluster-ip-range in kube-controller-manager. 2024-08-19 16:44:32 +02:00