Commit Graph

42 Commits

Author SHA1 Message Date
Patrick Ohly
99151c39b7 kube-controller-manager: convert to structured logging
Most of the individual controllers were already converted earlier. Some log
calls were missed or added and then not updated during a rebase. Some of those
get updated here to fill those gaps.

Adding of the name to the logger used by each controller gets
consolidated in this commit. By using the name under which the
controller is registered we ensure that the names in the log
are consistent.
2023-03-14 19:16:32 +01: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
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
Mike Dame
bfd7f72e9b Remove Stop from ControllerContext and pass ctx.Done 2021-09-27 09:16:38 -04:00
Mike Dame
80dcf7df1b Update controller initializer funcs to take Context 2021-09-27 09:16:36 -04:00
Jiahui Feng
8f5771d243 use common controller interface in KCM. 2021-08-25 13:29:03 -07:00
chenyw1990
ade167e53a Delete AvailableResources judgment for GA features 2021-05-31 11:13:15 +08:00
sanwishe
e8f69398c3 simplify return boolean value expression in cmd/kube-controller-manager/app/certificates.go 2021-05-21 14:38:31 +08:00
Monis Khan
343a3d1882
csr signers: increase the number of workers
This change updates the number of workers that the CSR signing
controllers use.  If a large number of certificates (especially
short lived ones) are approved at the same time, it can take the
signing controllers a long time to process them serially.  The
NewCSRSigningController logic is already go routine safe.

Signed-off-by: Monis Khan <mok@vmware.com>
2021-02-24 15:50:52 -05:00
Shihang Zhang
cbf6e38bbd move RootCAConfigMap to ga 2021-02-22 15:59:27 -08:00
Shihang Zhang
d40f0c43c4 separate RootCAConfigMap from BoundServiceAccountTokenVolume 2020-11-04 17:10:39 -08:00
David Eads
e88fecf26b allow setting different certificates for kube-controller-managed CSR signers 2020-07-09 08:14:55 -04:00
Jordan Liggitt
6183bcff6b Check for v1 CSR API in kube-controller-manager 2020-06-10 22:46:30 -04:00
Jordan Liggitt
db4ca87d9d Switch CSR approver/signer/cleaner controllers to v1 2020-06-05 18:45:34 -04:00
Davanum Srinivas
442a69c3bd
switch over k/k to use klog v2
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2020-05-16 07:54:27 -04:00
David Eads
83035890ad refactor the CSR controller into distinct controllers to allow easy configuration of multiple signing keys 2020-05-05 10:18:04 -04:00
David Eads
e8b5781499 add identification for particular certificate controllers 2019-09-03 14:05:04 -04:00
Di Xu
c6a992a01d add warning log for csr controllers 2019-05-07 11:51:36 +08:00
Mike Danese
bf02f55147 rootcacertpublisher: trigger resync on namespace add and update
Last cleanup was a bit overzealous.
2018-11-13 11:38:45 -08:00
k8s-ci-robot
bd2cb5a72d
Merge pull request #70831 from mikedanese/securesvcacct
add BoundServiceAccountTokenVolume feature
2018-11-13 08:54:25 -08:00
Mike Danese
f4ff26679f add BoundServiceAccountTokenVolume feature
* require TokenRequest to be enabled and configured
* bind ca.crt publisher to this feature rather than to TokenRequest
2018-11-12 13:11:47 -08:00
Mike Danese
206f5892a7 combine syncs in rootcacertpublisher
and some misc simplifications.
2018-11-11 11:29:32 -08:00
Davanum Srinivas
954996e231
Move from glog to klog
- Move from the old github.com/golang/glog to k8s.io/klog
- klog as explicit InitFlags() so we add them as necessary
- we update the other repositories that we vendor that made a similar
change from glog to klog
  * github.com/kubernetes/repo-infra
  * k8s.io/gengo/
  * k8s.io/kube-openapi/
  * github.com/google/cadvisor
- Entirely remove all references to glog
- Fix some tests by explicit InitFlags in their init() methods

Change-Id: I92db545ff36fcec83afe98f550c9e630098b3135
2018-11-10 07:50:31 -05:00
WanLinghao
efac533f92 To inject ca.crt into container when projected volume was specified, configmap should be created in each namespace.
This patch add a controller called "root-ca-cert-publisher" to complete above job as well as some bootstrap rbac policies.
2018-11-08 11:33:47 +08:00
David Eads
fb7d137ea2 add debug handler capability for individual controllers 2018-07-26 13:24:36 -04:00
stewart-yu
4f06f9906f move some option struct from controller manager to kube-controller manager 2018-06-19 17:58:48 +08:00
stewart-yu
ec6399be53 split up the component config into smaller config 2018-04-13 08:40:54 +08:00
stewart-yu
0cbe0a6034 controller-manager: switch to config/option struct pattern 2018-02-13 11:16:17 +01:00
Walter Fender
070a7b5823 Seperate loop and plugin control
Seperate loop and plugin control in the kube-controller-manager.
Adding an "--external-plugin" flag to specify a plugin to load when
cloud-provider is set to "external". Flag has no effect currently
when the cloud-provider is not set to external. The expectation is
that the cloud provider and external plugin flags would go away once
all cloud providers are on stage 2 cloud-controller-manager solutions.

Managing the control loops more directly based on start up flags.
Addressing issue brought up by @wlan0

Switched to using the main node controller in CCM.
Changes to enable full NodeController to start in CCM.
Fix related tests.
Unifying some common code between KCM and CCM.
Fix related tests and comments.
Folded in feedback from @jhorwit2 and @wlan0
2017-12-18 10:58:45 -08:00
Mike Danese
2006fe524b certs: start deprecation of signing asset default paths 2017-11-16 14:09:29 -08:00
Mike Danese
1181a88cf2 certs: remove always nil error from New signature 2017-10-23 11:43:08 -07:00
Jacob Simpson
2a6099b8f9 New controller to GC CSRs. 2017-10-04 14:45:32 -07:00
Mike Danese
66b4b99616 migrate group approver to use subject access reviews 2017-05-30 11:43:03 -07:00
Jacob Simpson
07e9b0e197 Add support for specifying certificate duration at runtime. 2017-05-24 13:29:46 -07:00
Mike Danese
f04ce3cfba refactor certificate controller 2017-05-23 15:25:58 -07:00
Andy Goldstein
4cd38b863f Remove references to pkg/controller/informers 2017-02-27 06:47:59 -05:00
Jacob Beacham
7682aa53b1 Allow the CertificateController to use any Signer implementation.
This will allow developers to create CertificateControllers with
arbitrary Signers, instead of forcing the use of CFSSLSigner.
2017-02-10 14:26:45 -08:00
Andy Goldstein
e5fc73a4f1 Switch CSR controller to use shared informer 2017-02-08 11:01:34 -05:00
Mike Danese
e34351f715 refactor approver and signer interfaces to be consisten w.r.t. apiserver interaction
This makes it so that only the controller loop talks to the
API server directly. The signatures for Sign and Approve also
become more consistent, while allowing the Signer to report
conditions (which it wasn't able to do before).
2017-02-02 11:23:52 -08:00
Mike Danese
96c146c8f2 promote certificates.k8s.io to beta 2017-01-19 13:13:20 -08:00
deads2k
6a4d5cd7cc start the apimachinery repo 2017-01-11 09:09:48 -05:00
deads2k
f36a5ae9a1 separate controller initialization for easy controllers 2016-12-07 09:00:53 -05:00