dynamiclistener/factory
Brad Davidson 242c2af2db
Check certificate fingerprint when deciding if memory store needs to be updated (#180)
When using a chained store of Kubernetes -> Memory -> File, a file-backed cert with a valid ResourceVersion could not be updated when the Kubernetes store was offline, as the Memory store was skipping the update if the ResourceVersion was not changed.
The Kubernetes store passes through the secret update without a modified ResourceVersion if the Secret controller is not yet available to round-trip the secret through the apiserver, as the apiserver is what handles updating the ResourceVersion when the Secret changes.
In RKE2, this caused a deadlock on startup when the certificate is expired, as the apiserver cannot be started until the cert is updated, but the cert cannot be updated until the apiserver is up.

Fix this by also considering the certificate hash annotation when deciding if the update can be skipped.

Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2025-06-11 10:52:11 -07:00
..
ca.go Prevent Panic for empty Arrays on Error 2023-07-14 08:28:48 +02:00
cert_utils.go Fix listenAndServe certificate expiration by preloading certs 2021-11-23 23:38:49 -08:00
gen.go Check certificate fingerprint when deciding if memory store needs to be updated (#180) 2025-06-11 10:52:11 -07:00