Commit Graph

1297 Commits

Author SHA1 Message Date
Jordan Liggitt
78cb3862f1
Fix indentation/spacing in comments to render correctly in godoc 2022-12-17 23:27:38 -05:00
Shihang Zhang
4fd09a06d6 lock LegacyServiceAccountTokenNoAutoGeneration 2022-12-16 10:45:35 -08:00
TommyStarK
454290c583 cmd/kube-controller-manager/app/options: Improving test coverage
Add a snippet of the expected error string related to the aspect being tested

Signed-off-by: TommyStarK <thomasmilox@gmail.com>
2022-12-13 14:05:48 +01:00
TommyStarK
270141aa0b cmd/kube-controller-manager/app/options: Improving test coverage
Signed-off-by: TommyStarK <thomasmilox@gmail.com>
2022-12-10 13:36:12 +01:00
Mengjiao Liu
c28b287253 clusterroleaggregation: use contextual logging 2022-12-09 11:02:47 +08:00
songxiao-wang87
9ae5af4b6a StorageVersionGC logger
Signed-off-by: songxiao-wang87 <wang.xiaosong23@zte.com.cn>
2022-11-23 03:20:12 +00:00
Patrick Ohly
0133df3929 kube-controller-manager: add ResourceClaim controller
The controller uses the exact same logic as the generic ephemeral inline volume
controller, just for inline ResourceClaimTemplate -> ResourceClaim.

In addition, it supports removal of pods from the ReservedFor field when those
pods are known to not need the claim anymore. At the moment, only this special
case is supported. Removal of arbitrary objects would imply granting full read
access to all types to determine whether a) an object is gone and b) if the
current incarnation is the one which is listed in ReservedFor. This may get
added later.
2022-11-10 20:23:50 +01:00
Kubernetes Prow Robot
2f22404003
Merge pull request #113747 from thockin/safer-controller-init-map
Make static controller registration slightly safer
2022-11-08 12:43:25 -08:00
Tim Hockin
d577e2bfb1
Make static controller registration slightly safer
As we have more and more of these, the risk of a dup name seems
non-zero.
2022-11-08 09:44:19 -08:00
kerthcet
b6d021b7e3 Deprecate CLI flag pod-eviction-timeout in KCM
Signed-off-by: kerthcet <kerthcet@gmail.com>
2022-11-08 00:21:56 +08:00
PingWang
015ca0c6a5 Correct some incorrect comments
Signed-off-by: PingWang <wang.ping5@zte.com.cn>
2022-10-26 10:06:24 +08:00
Kubernetes Prow Robot
85643c0f93
Merge pull request #108501 from zroubalik/hpa
add `--concurrent-horizontal-pod-autoscaler-syncs` flag to kube-controller-manager
2022-10-17 14:13:18 -07:00
Zbynek Roubalik
1cefcdea2d add --concurrent-horizontal-pod-autoscaler-syncs flag to kube-controller-manager
Signed-off-by: Zbynek Roubalik <zroubalik@gmail.com>
2022-10-17 17:39:31 +02:00
Han Kang
2bbd445f50 remove rate limiter metric as it is not in use
Change-Id: I91157653e3860eeecc3f572aee88da6ffc65faed
2022-10-13 13:07:11 -07:00
Han Kang
bd2417b435 add 'metrics/slis' to kcm health checks
Change-Id: I8c2114e538bb417deff8c3f9f107758c089227dc
2022-10-11 09:18:42 -07:00
Han Kang
e95179ffb6 Wire up feature_gate.go with metrics via AddMetrics method
wire up feature_gate.go with metrics via AddMetrics method

Change-Id: I9b4f6b04c0f4eb9bcb198b16284393d21c774ad8

wire in metrics to kubernetes components

Change-Id: I6d4ef8b26f149f62b03f32d1658f04f3056fe4dc

rename metric since we're using the value to determine if enabled is true or false

Change-Id: I13a6b6df90a5ffb4b9c5b34fa187562413bea029

Update staging/src/k8s.io/component-base/featuregate/feature_gate.go

Co-authored-by: Jordan Liggitt <jordan@liggitt.net>
2022-09-26 08:44:42 -07:00
Kubernetes Prow Robot
ee94dce5b1
Merge pull request #112015 from humblec/glusterfs-gone
Removal of GlusterFS code from the repo
2022-09-14 10:03:00 -07:00
Humble Chirammal
c2a7bfd6b4 removal of glusterfs in-tree driver code from the source
Signed-off-by: Humble Chirammal <hchiramm@redhat.com>
2022-09-13 20:11:50 +05:30
Jakub Przychodzeń
ef9f8d099f Ensure metric 'running_managed_controllers' is registered 2022-09-05 11:43:56 +00:00
SataQiu
1ae5237a66 controller-manager: remove deprecated insecure serving from Config 2022-08-31 17:32:21 +08:00
Maciej Szulik
04b4908b18
Add soltysh as cmd/kcm approver 2022-08-30 09:39:01 +02:00
Kubernetes Prow Robot
6e3d62ca1c
Merge pull request #111904 from pandaamanda/controller_codeclean
refactor: move attachdetach controller param validation ahead
2022-08-29 14:12:49 -07:00
Davanum Srinivas
9bbf01bae9
Remove references to openstack and cinder
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2022-08-22 16:43:14 -04:00
pandaamanda
3d87919a1e refactor: move attachdetach controller param validation ahead 2022-08-18 08:56:57 +00:00
Kubernetes Prow Robot
759785ea14
Merge pull request #109090 from sarveshr7/multicidr-rangeallocator
Enhance NodeIPAM to support multiple ClusterCIDRs
2022-08-07 15:40:18 -07:00
Sarvesh Rangnekar
5b801ba9f9 Introduce MultiCIDRRangeAllocator
MultiCIDRRangeAllocator is a new Range Allocator which makes using
multiple ClusterCIDRs possible. It consists of two controllers, one for
reconciling the ClusterCIDR API objects and the other for allocating
Pod CIDRs to the nodes.

The allocation is based on the rules defined in
https://github.com/kubernetes/enhancements/tree/master/keps/sig-network/2593-multiple-cluster-cidrs
2022-08-06 00:10:39 +00:00
Jonathan Dobson
5f774832a5 Move CSIInlineVolume feature to GA 2022-08-04 13:06:30 -06:00
Jiawei Wang
d52cdeae79 cleanup: Remove storageos volume plugins from k8s codebase 2022-08-03 20:19:59 +00:00
Kubernetes Prow Robot
1de16be28f
Merge pull request #111462 from jprzychodzen/controllers
Enable 'running_managed_controllers' for KCM/CCM controllers: routes, services and cloud-node
2022-08-02 13:59:09 -07:00
Kubernetes Prow Robot
70dcb0f129
Merge pull request #111618 from Jiawei0227/flocker
cleanup: Remove flocker volume plugins from k8s codebase
2022-08-02 09:16:16 -07:00
Jakub Przychodzeń
08749750a9 Enable 'running_managed_controllers' for few more controllers 2022-08-02 07:33:32 +00:00
Jiawei Wang
9c869b3dfc cleanup: Remove quobyte volume plugins from k8s codebase 2022-08-02 00:47:02 +00:00
Jiawei Wang
ff063889a7 cleanup: Remove flocker volume plugins from k8s codebase
Flocker storage plugin removed from k8s codebase.

Flocker, an early external storage plugin in k8s,
has not been in maintenance and their business is
down. As far as I know, the plugin is not being
used anymore.

This PR removes the whole flocker dependency and
codebase from core k8s to reduce potential security
risks and reduce maintenance work from the sig-storage community.
2022-08-02 00:42:50 +00:00
Kubernetes Prow Robot
42b6b2887c
Merge pull request #110888 from likakuli/feature_ignoreeventforgc
feat: ignore all event resource for gc
2022-08-01 12:10:28 -07:00
Kubernetes Prow Robot
4b5ee802e8
Merge pull request #111466 from jprzychodzen/nodeipam
Enable 'running_managed_controllers' for KCM nodeipam controller
2022-08-01 10:24:40 -07:00
Kubernetes Prow Robot
d46742b387
Merge pull request #111411 from alculquicondor/deprecate-disable-taint-manager
Mark enable-taint-manager CLI flag as deprecated
2022-08-01 09:02:28 -07:00
Jakub Przychodzeń
7dd4e89a99 Enable 'running_managed_controllers' for KCM nodeipam controller 2022-07-27 14:30:40 +00:00
Davanum Srinivas
a9593d634c
Generate and format files
- Run hack/update-codegen.sh
- Run hack/update-generated-device-plugin.sh
- Run hack/update-generated-protobuf.sh
- Run hack/update-generated-runtime.sh
- Run hack/update-generated-swagger-docs.sh
- Run hack/update-openapi-spec.sh
- Run hack/update-gofmt.sh

Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2022-07-26 13:14:05 -04:00
Aldo Culquicondor
cdb0b6babf Mark enable-taint-manager CLI flag as deprecated
Change-Id: Ib0247e034def837f973b69c55ed6bc9486bd364e
2022-07-25 17:04:06 -04:00
Wojciech Tyczyński
1f4f98e40d Clean shutdown of cloud controllers in integration tests 2022-07-25 11:28:50 +02:00
Jakub Przychodzeń
49553a46bd 'running_managed_controllers' for KCM/CCM for cloud-node-lifecycle controller 2022-07-21 13:18:56 +00:00
Andy Goldstein
a899441484
quota: add an update filter
Fix a TODO to plumb an update filter from above in the resource quota
monitor code that was handling update events for quota-able objects,
instead of hard-coding the logic in the resource quota monitor.

Signed-off-by: Andy Goldstein <andy.goldstein@redhat.com>
2022-07-08 18:39:55 -04:00
likakuli
74a3b8f4a9 feat: fix a bug thaat not all event be ignored by gc controller
Signed-off-by: likakuli <1154584512@qq.com>
2022-07-04 18:00:54 +08:00
Iceber Gu
cac919bca4 fix the running of the kube-controller-manager
Signed-off-by: Iceber Gu <wei.cai-nat@daocloud.io>
2022-06-18 09:24:04 +08:00
Patrick Ohly
4c6338ac0f logs: replace config methods with functions
API types are only supposed to have methods related to serialization.
2022-06-17 20:22:13 +02:00
Patrick Ohly
1aceac797d logs: make LoggingConfiguration an unversioned API
Making the LoggingConfiguration part of the versioned component-base/config API
had the theoretic advantage that components could have offered different
configuration APIs with experimental features limited to alpha versions (for
example, sanitization offered only in a v1alpha1.KubeletConfiguration). Some
components could have decided to only use stable logging options.

In practice, this wasn't done. Furthermore, we don't want different components
to make different choices regarding which logging features they offer to
users. It should always be the same everywhere, for the sake of consistency.

This can be achieved with a saner Go API by dropping the distinction between
internal and external LoggingConfiguration types. Different stability levels of
indidividual fields have to be covered by documentation (done) and potentially
feature gates (not currently done).

Advantages:

- everything related to logging is under component-base/logs;
  previously this was scattered across different packages and
  different files under "logs" (why some code was in logs/config.go
  vs. logs/options.go vs. logs/logs.go always confused me again
  and again when coming back to the code):

  - long-term config and command line API are clearly separated
    into the "api" package underneath that

  - logs/logs.go itself only deals with legacy global flags and
    logging configuration

- removal of separate Go APIs like logs.BindLoggingFlags and
  logs.Options

- LogRegistry becomes an implementation detail, with less code
  and less exported functionality (only registration needs to
  be exported, querying is internal)
2022-06-17 20:22:13 +02:00
Wojciech Tyczyński
fe3616cafb Clean shutdown of kcm, ccm and scheduler 2022-05-26 12:36:59 +02:00
cyclinder
6150737d11 remove feature gate GA for 1.25
Signed-off-by: cyclinder qifeng.guo@daocloud.io
2022-05-12 14:15:23 +08:00
Kubernetes Prow Robot
7adb7c1d06
Merge pull request #109612 from pandaamanda/remove_DeprecatedControllerOptions
refactor: remove deprecated `deleting-pods-qps` `deleting-pods-burst` `register-retry-count`  flags
2022-05-04 02:34:54 -07:00
Kubernetes Prow Robot
2d1f12942f
Merge pull request #108476 from ialidzhikov/cleanup/experimental-cluster-signing-duration
kube-controller-manager: Remove the deprecated `--experimental-cluster-signing-duration` flag
2022-05-03 18:23:31 -07:00
熊中谅10171568
c4579165f1 refactor: remove deprecated flags
refactor: remove deprecated deleting-pods-qps deleting-pods-burst register-retry-count flags
2022-04-22 20:28:12 +08:00
SataQiu
9ac1b4b68f remove unused option deployment-controller-sync-period for deployment controller 2022-03-30 20:00:53 +08:00
Kubernetes Prow Robot
5b8dbfbbcf
Merge pull request #108995 from pohly/log-contextual
contextual logging
2022-03-29 17:35:59 -07:00
Patrick Ohly
7de1b05e85 logging: add ContextualLogging feature
InitLogs overrides the klog default and turns contextual logging off. This
ensures that it is only enabled in Kubernetes commands that explicitly enable
it via a feature gate. A feature gate for it gets defined in
k8s.io/component-base/logs and is then used by Options.ValidateAndApply.

The effect of disabling contextual logging is very limited according to
benchmarks with kube-scheduler. The feature gets added anyway to satisfy the
PRR recommendation that features should be controllable.

The following commands have support for contextual logging:
- kube-apiserver
- kube-controller-manager
- kubelet
- kube-scheduler
- component-base/logs example

Supporting a feature gate check in ValidateAndApply and not in InitLogs is a
simplification: changing InitLogs to accept a FeatureGate would have implied
changing also component-base/cli.Run. This didn't seem worthwhile because
ValidateAndApply already covers the relevant commands.
2022-03-29 13:29:57 +02:00
Ross Peoples
98837de446 TimeZone support for CronJobs 2022-03-28 16:33:00 -05:00
Kubernetes Prow Robot
b5f8d9ec16
Merge pull request #107724 from kkkkun/fix-leaderlost
Fixes exited messages when leaderelection lost
2022-03-28 06:44:48 -07:00
Kubernetes Prow Robot
c239b406f0
Merge pull request #108929 from gnufied/move-expansion-feature-gate-ga
Move all volume expansion feature gates to GA
2022-03-25 18:08:16 -07:00
Hemant Kumar
9343cce20b remove ExpandPersistentVolume feature gate 2022-03-24 10:02:47 -04:00
Kun Zhang
6f8e9aa05d Fixes exited messages when leaderelection lost 2022-03-24 17:33:16 +08:00
Kubernetes Prow Robot
14e8db067e
Merge pull request #108191 from ravisantoshgudimetla/wire-cert-contexts
Wire cert contexts
2022-03-23 11:20:17 -07:00
Ravi Gudimetla
72a62f47f7 Wire context for cert controllers
All the controllers should use context for signalling termination of communication with API server. Once kcm cancels context all the cert controllers which are started via kcm should cancel the APIServer request in flight instead of hanging around.
2022-03-07 10:19:45 -05:00
ialidzhikov
9c7c7cca24 kube-controller-manager: Cleanup MarkDeprecared call for already removed flag
Signed-off-by: ialidzhikov <i.alidjikov@gmail.com>
2022-03-05 12:53:44 +02:00
Kubernetes Prow Robot
d7d121999d
Merge pull request #108480 from wojtek-t/log_golang_envs
Log main golang runtime env vars
2022-03-04 00:10:51 -08:00
Wojciech Tyczyński
ef2e32ab65 Log main golang runtime env vars 2022-03-04 08:04:02 +01:00
ialidzhikov
a444eb60d7 kube-controller-manager: Remove the deprecated --experimental-cluster-signing-duration flag
Signed-off-by: ialidzhikov <i.alidjikov@gmail.com>
2022-03-03 08:47:49 +02:00
Shihang Zhang
fb6c727fde no auto-generation of secret-based service account token 2022-02-23 14:17:30 -08:00
ravisantoshgudimetla
65ff81757d Wire contexts to Disruption controllers 2022-02-04 10:32:04 -05:00
ahrtr
972dc46a1f replace deprecated io/ioutil with os and io for cmd 2022-02-01 13:59:41 +08:00
Davanum Srinivas
ba1f853b5a
Add mwielgus back
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2022-01-10 09:02:53 -05:00
Davanum Srinivas
9682b7248f
OWNERS cleanup - Jan 2021 Week 1
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2022-01-10 08:14:29 -05:00
Kubernetes Prow Robot
28bda67fb2
Merge pull request #105721 from yxxhero/optimize_controllermanger_cobra_param
Optimize Cobra parameters of Controller Manager
2022-01-04 11:26:50 -08:00
Kubernetes Prow Robot
1426587e08
Merge pull request #106436 from dims/cleanup-owners-files-no-activity-in-a-year
Cleanup OWNERS files (No Activity in the last year)
2021-12-15 12:07:51 -08:00
Davanum Srinivas
497e9c1971
Cleanup OWNERS files (No Activity in the last year)
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2021-12-15 10:34:02 -05:00
Kubernetes Prow Robot
90110f71cb
Merge pull request #106256 from ardaguclu/use-serve-with-listener-stopped
Rename ServeWithListenerStopped to Serve in secure_serving
2021-12-13 07:35:58 -08:00
Davanum Srinivas
9405e9b55e
Check in OWNERS modified by update-yamlfmt.sh
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2021-12-09 21:31:26 -05:00
Jian Zeng
c73d96ac87
refactor: remove the insecure flags in controller-manager
Signed-off-by: Jian Zeng <anonymousknight96@gmail.com>
2021-12-08 10:50:12 +08:00
Oksana Naumov
3af11fc12d Add support for Portworx to csi-translation lib
Signed-off-by: Oksana Naumov <trierra.dev@gmail.com>
2021-11-16 13:26:09 -08:00
Kubernetes Prow Robot
6d1d8c73ee
Merge pull request #106316 from josephburnett/controller-v2
Watch HPA v2 instead of v1.
2021-11-16 06:41:38 -08:00
Joseph Burnett
711f96e05e Watch HPA v2 instead of v1. 2021-11-16 11:13:21 +01:00
Kubernetes Prow Robot
66c342ba63
Merge pull request #95361 from humblec/rbd-migration
RBD in-tree plugin migration to CSI driver using migration translation lib
2021-11-15 19:53:25 -08:00
Humble Chirammal
7c40eb9ae0 Add support for rbd plugin to csi-translation-lib
In support of csi-migration proposal here:
https://github.com/kubernetes/community/blob/master/contributors/design-proposals/storage/csi-migration.md

Will help with migration of in-tree RBD plugin ( kubernetes.io/rbd)
to RBD CSI driver ( rbd.csi.ceph.com ).

Fixes https://github.com/kubernetes/enhancements/issues/2923

Signed-off-by: Humble Chirammal <hchiramm@redhat.com>
2021-11-15 23:46:29 +05:30
Kubernetes Prow Robot
2bd67845d4
Merge pull request #105550 from damemi/wire-contexts-rbac
Wire contexts to RBAC controllers
2021-11-11 15:15:25 -08:00
Mike Dame
80c01707e0
Wire contexts to Batch controllers (#105491)
* Wire contexts to Batch controllers

* (hold) feedback + updates that overlap with Apps controllers

* fixup errors
2021-11-10 14:56:46 -08:00
Arda Güçlü
a8d2b3a792 Rename ServeWithListenerStopped to Serve in secure_serving
This PR removes Serve function and uses all required places
ServeWithListenerStopped which takes place new Serve function.

This function returns ListenerStopped channel can be used to drain
requests before shutting down the server.
2021-11-08 17:20:31 +03:00
Kubernetes Prow Robot
dc93951ad0
Merge pull request #106090 from pohly/log-v-flags
component-base: move v/vmodule/log-flush-frequency into LoggingConfiguration
2021-11-04 12:34:34 -07:00
Kubernetes Prow Robot
5446b89857
Merge pull request #104470 from pacoxu/patch-4
Remove GAed feature gate CronJobControllerV2
2021-11-03 06:40:58 -07:00
Patrick Ohly
4df70dfd41 component-base: initialize logging as soon as possible
In various places log messages where emitted as part of validation or even
before it (for example, cli.PrintFlags). Those log messages did not use the
final logging configuration, for example text output instead of JSON or not the
final verbosity. The last point became more obvious after moving the setup of
verbosity into logs.Options.Apply because PrintFlags never printed anything
anymore.

In order to force applications to deal with logging as soon as possible, the
Options.Validate and Options.Apply methods are now private. Applications should
use the new Options.ValidateAndApply directly after parsing.
2021-11-03 11:55:54 +01:00
Patrick Ohly
3948cb8d1b component-base: move v/vmodule/log-flush-frequency into LoggingConfiguration
These three options are the ones from logs.AddFlags which are not deprecated.
Therefore it makes sense to make them available also via the configuration file
support in the one command which currently supports that (kubelet).

Long-term, all commands should use LoggingConfiguration, either with a
configuration file (as in kubelet) or via flags (kube-scheduler,
kube-apiserver, kube-controller-manager).

Short-term, both approaches have to be supported. As the majority of the
commands only use logs.AddFlags, that function by default continues to register
the flags and only leaves that to Options.AddFlags when explicitly requested.

A drive-by bug fix is done for log flushing: the periodic flushing called
klog.Flush and therefore missed explicit flushing of the newer logr
backend. This bug was never present in any release Kubernetes and therefore the
fix is not submitted in a separate PR.
2021-11-03 07:41:46 +01:00
Kubernetes Prow Robot
aa0ea62489
Merge pull request #104903 from ikeeip/storageobjectinuseprotection_feature_ga_cleanup
Remove StorageObjectInUseProtection feature gate logic
2021-11-02 20:22:57 -07:00
Kubernetes Prow Robot
3fdeb490e0
Merge pull request #105510 from damemi/wire-contexts-bootstrap
Wire contexts to Bootstrap controllers
2021-11-02 14:27:42 -07:00
Konstantin Misyutin
808c8f42d5 Remove StorageObjectInUseProtection feature gate logic
This feature has graduated to GA in v1.11 and will always be
enabled. So no longe need to check if enabled.

Signed-off-by: Konstantin Misyutin <konstantin.misyutin@huawei.com>
2021-11-03 00:13:50 +03:00
Mike Dame
4960d0976a Wire contexts to Core controllers 2021-11-01 10:29:00 -04:00
Kubernetes Prow Robot
c592bd40f2
Merge pull request #105609 from pohly/generic-ephemeral-volume-ga
generic ephemeral volume GA
2021-10-28 17:36:50 -07:00
yxxhero
feaa78380c Optimize Cobra parameters of Controller Manager
Signed-off-by: yxxhero <aiopsclub@163.com>
2021-10-17 18:57:23 +08:00
Kubernetes Prow Robot
3aafe75698
Merge pull request #105461 from damemi/wire-contexts-autoscaling
Wire contexts to Autoscaling controllers
2021-10-14 06:59:33 -07:00
Kubernetes Prow Robot
f27e4714ba
Merge pull request #105377 from damemi/wire-contexts-apps
Wire contexts to Apps controllers
2021-10-14 06:59:19 -07:00
Mike Dame
41fcb95f2f Wire contexts to Apps controllers 2021-10-13 16:32:13 -04:00
Mike Dame
7780024916 Wire contexts to Autoscaling controllers 2021-10-12 14:34:05 -04:00
Patrick Ohly
a8c930ef46 generic ephemeral volume: graduation to GA
The feature gate gets locked to "true", with the goal to remove it in two
releases.

All code now can assume that the feature is enabled. Tests for "feature
disabled" are no longer needed and get removed.

Some code wasn't using the new helper functions yet. That gets changed while
touching those lines.
2021-10-11 20:54:20 +02:00
Sahil Vazirani
3988405c8d
GA TTLAfterFinish 2021-10-07 16:58:50 -07:00