Commit Graph

25 Commits

Author SHA1 Message Date
Paco Xu
160f015ef4 kubelet: add key encipherment usage only if it is rsa key
remove allowOmittingUsageKeyEncipherment as it is always true

Signed-off-by: Paco Xu <paco.xu@daocloud.io>
2022-12-27 16:04:25 +08:00
David Ashpole
120da3bb9b
fix copylock vet errors in component-base metrics 2022-03-31 15:07:11 +00:00
Antonio Ojea
0cd75e8fec run hack/update-netparse-cve.sh 2021-08-20 10:42:09 +02:00
tanjing2020
523b4c0918 Replace 'x.Sub(time.Now())' with 'time.Until(x)' 2021-07-23 10:03:36 +08:00
Jordan Liggitt
a298c14f18 Switch cert manager to v1 CSR API by default, falling back to v1beta1 2020-06-10 02:30:54 -04:00
Jordan Liggitt
2408d8101f Fix kubelet client certificate gauge 2020-05-15 12:57:34 -04:00
James Munnelly
d5dae04898 certificates: update controllers to understand signerName field
Signed-off-by: James Munnelly <james.munnelly@jetstack.io>
2020-02-27 15:54:31 +00:00
Samuel Davidson
aba0b31526 Changed Kubelet client and serving cert TTL/Expiry certs to use gaugefunc for calculating time remaining. 2019-12-06 15:52:03 -08:00
Ryan Phillips
8e50c55e6b kubelet: add certificate rotation error metric 2019-11-05 16:51:40 -06:00
Samuel Davidson
3e817d17a5 Updated usage of certificate.Manager to use new rotation metric 2019-11-01 13:32:09 -07:00
Han Kang
3a50917795 migrate kubelet's metrics/probes & metrics endpoint to metrics stability framework 2019-08-28 11:16:38 -07:00
Clayton Coleman
fde87329cb
bootstrap: Use kubeconfig contents as seed for cert dir if necessary
kubeadm uses certificate rotation to replace the initial high-power
cert provided in --kubeconfig with a less powerful certificate on
the masters. This requires that we pass the contents of the client
config certData and keyData down into the cert store to populate
the initial client.

Add better comments to describe why the flow is required. Add a test
that verifies initial cert contents are written to disk. Change
the cert manager to not use MustRegister for prometheus so that
it can be tested.
2018-11-17 19:52:12 -05:00
Clayton Coleman
486577df17 Restore "Make bootstrap client cert loading part of rotation""
This reverts the revert of commit 3464222267.
2018-11-17 13:44:58 -05:00
Clayton Coleman
3464222267
Revert "Make bootstrap client cert loading part of rotation"
This reverts commit 0af19875ad.

Revert "Ensure the bootstrap rotation code is tested by forcing rotation"

This reverts commit de293b2d7d.
2018-11-17 10:24:39 -05:00
Clayton Coleman
0af19875ad
Make bootstrap client cert loading part of rotation
Ensure that bootstrap+clientcert-rotation in the Kubelet can:

1. happen in the background so that static pods aren't blocked by bootstrap
2. collapse down to a single call path for requesting a CSR
3. reorganize the code to allow future flexibility in retrieving bootstrap creds

Fetching the first certificate and later certificates when the kubelet
is using client rotation and bootstrapping should share the same code
path. We also want to start the Kubelet static pod loop before
bootstrapping completes. Finally, we want to take an incremental step
towards improving how the bootstrap credentials are loaded from disk
(potentially allowing for a CLI call to get credentials, or a remote
plugin that better integrates with cloud providers or KSMs).

Reorganize how the kubelet client config is determined. If rotation is
off, simplify the code path. If rotation is on, load the config
from disk, and then pass that into the cert manager. The cert manager
creates a client each time it tries to request a new cert.

Preserve existing behavior where:

1. bootstrap kubeconfig is used if the current kubeconfig is invalid/expired
2. we create the kubeconfig file based on the bootstrap kubeconfig, pointing to
   the location that new client certs will be placed
3. the newest client cert is used once it has been loaded
2018-11-16 21:50:26 -05:00
Lucas Käldström
7a840cb4c8
automated: Rename all package references 2018-08-29 19:07:52 +03:00
Jordan Liggitt
db9d3c2d10
Derive kubelet serving certificate CSR template from node status addresses 2018-07-10 14:33:48 -04:00
supereagle
b694d51842 use versiond group clients from client-go 2017-11-07 14:47:22 +08:00
Jacob Simpson
415c4d2c3a Move certificate manager to client. 2017-10-05 12:54:38 -07:00
Jacob Simpson
f1fef11b37 Add a kubelet metric to track certificate expiration. 2017-08-30 09:55:40 -07:00
Michael Taufen
24bab4c20f move KubeletConfiguration out of componentconfig API group 2017-08-15 08:12:42 -07:00
Michael Taufen
443d58e40a Dynamic Kubelet Configuration
Alpha implementation of the Dynamic Kubelet Configuration feature.
See the proposal doc in #29459.
2017-08-08 12:21:37 -07:00
Malepati Bala Siva Sai Akhil
f90a825308 Fix typo in certificate 2017-08-05 20:50:56 +05:30
Jacob Simpson
29c1b81d4c Scripted migration from clientset_generated to client-go. 2017-07-17 15:05:37 -07:00
Clayton Coleman
b8e662fcea
Move the kubelet certificate management code into a single package
Code is very similar and belongs together.
2017-07-05 18:11:49 -04:00