Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Kubelet cert TTL via GaugeFunc #85874

Merged
merged 1 commit into from Dec 9, 2019
Merged

Conversation

@sambdavidson
Copy link
Contributor

sambdavidson commented Dec 4, 2019

Rewrote the Kubelet client and serving certificate packages to use a GaugeFunc instead of a traditional Gauge. This allows them both to accurately report the TTL of their certificates at read time rather than arbitrary setting the TTL in unrelated threads.

The metric certificate_manager_server_expiration_seconds has been renamed to certificate_manager_server_ttl_seconds and its behavior has changed from reporting an absolute time, to reporting the seconds remaining e.g. date seconds since epoch like 1257894000 -> remaining seconds like 1234.

The behavior of rest_client_exec_plugin_ttl_seconds remains the same it has just become more accurate when read.

What type of PR is this?
/kind cleanup

What this PR does / why we need it:
Building off of new client cert metrics (#84382), new serving cert metrics (#84534), and a GaugeFunc implementation (#83830). We now have accurate insights into Kubetlet certificate rotations and TTL. This provides visibility towards efforts of shortening certificate lifetimes.

Which issue(s) this PR fixes:

Fixes #

Special notes for your reviewer:

Does this PR introduce a user-facing change?:

- Renamed Kubelet metric certificate_manager_server_expiration_seconds to certificate_manager_server_ttl_seconds and changed to report the second until expiration at read time rather than absolute time of expiry.
- Improved accuracy of Kubelet metric rest_client_exec_plugin_ttl_seconds.

/assign @awly @logicalhan @liggitt

Copy link
Contributor

logicalhan left a comment

/lgtm

Thanks for iterating over this!

@k8s-ci-robot k8s-ci-robot added the lgtm label Dec 6, 2019
@sambdavidson sambdavidson force-pushed the sambdavidson:ttlFunc branch from 261fc50 to 781c3c3 Dec 6, 2019
@k8s-ci-robot k8s-ci-robot removed the lgtm label Dec 6, 2019
…func for calculating time remaining.
@sambdavidson sambdavidson force-pushed the sambdavidson:ttlFunc branch from 781c3c3 to aba0b31 Dec 6, 2019
@liggitt

This comment has been minimized.

Copy link
Member

liggitt commented Dec 9, 2019

/lgtm
/approve

@k8s-ci-robot k8s-ci-robot added the lgtm label Dec 9, 2019
@k8s-ci-robot

This comment has been minimized.

Copy link
Contributor

k8s-ci-robot commented Dec 9, 2019

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: liggitt, sambdavidson

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot merged commit 398e2bc into kubernetes:master Dec 9, 2019
14 of 15 checks passed
14 of 15 checks passed
tide Not mergeable. Retesting: pull-kubernetes-verify
Details
cla/linuxfoundation sambdavidson authorized
Details
pull-kubernetes-bazel-build Job succeeded.
Details
pull-kubernetes-bazel-test Job succeeded.
Details
pull-kubernetes-dependencies Job succeeded.
Details
pull-kubernetes-e2e-gce Job succeeded.
Details
pull-kubernetes-e2e-gce-100-performance Job succeeded.
Details
pull-kubernetes-e2e-gce-device-plugin-gpu Job succeeded.
Details
pull-kubernetes-e2e-kind Job succeeded.
Details
pull-kubernetes-integration Job succeeded.
Details
pull-kubernetes-kubemark-e2e-gce-big Job succeeded.
Details
pull-kubernetes-node-e2e Job succeeded.
Details
pull-kubernetes-node-e2e-containerd Job succeeded.
Details
pull-kubernetes-typecheck Job succeeded.
Details
pull-kubernetes-verify Job succeeded.
Details
@k8s-ci-robot k8s-ci-robot added this to the v1.18 milestone Dec 9, 2019
@sambdavidson sambdavidson deleted the sambdavidson:ttlFunc branch Dec 9, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.