-
Notifications
You must be signed in to change notification settings - Fork 1.4k
KCP should introspect machine certificate expiry information from node to enable automatic certificate renewal #7342
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
Comments
@ykakarap: This issue is currently awaiting triage. If CAPI contributors determines this is a relevant issue, they will accept it by applying the The Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
I wonder if we should really introduce this mechanism in our controller. It's only needed for old machines, but we will still never be really able to remove this code again (as we will have to assume for a very long time that old machines still exist). Apart from that I wonder if it's worth investing the effort to implement this. It's non-trivial to do considering that this probably has to work on Windows & Linux, requires privileged access to control plane machines, ... . |
I wonder if there might be some other/better ways to determine the node creation date and I/we just missed them:
Verified "inspect the kube-apiserver" # Create kind cluster
kind create cluster
# Get server IP
kubectl config view --minify
# Check cert
openssl s_client -showcerts -connect 127.0.0.1:41913 2>/dev/null | openssl x509 -text
...
Issuer: CN = kubernetes
Validity
Not Before: Sep 30 16:27:20 2022 GMT
Not After : Sep 30 16:27:20 2023 GMT
... |
@vincepri WDYT? |
I'm +1 to explore this idea, but we should find a solution that does not require adding new binaries to the controller image (do something equivalent via some go code) |
/assign |
User Story
Recently a feature was introduced in KCP to enable automatic renewal of certificates by doing a repave: #6983
This feature only works for control plane machines created using Cluster API v1.3 or above.
For older control plane machines it needs manual intervention from the user to provide the actual certificate expiry date of the control plane machines.
This issue is to explore ideas around how we can introspect the certificate expiry time from the node without needing manual intervention from the user.
Detailed Description
The certificate expiry time cannot reliably calculated from the
creationTimestamp
of the Machine object. Example: If the machine object is restored from a backup thecreationTimestamp
would have changed.One possible way to calculate the certificate expiry time:
/kind feature
/area control-plane
The text was updated successfully, but these errors were encountered: