Using the option to add the certificates to a secret, restarting pods on renewal? #160
-
Hi,
And the OpenShift documentation states:
Is it possible to execute a rollout restart triggered by a secret change because of a certificate renewal? Maybe through owner reference or by some other means? If it's possible as-is, the documentation needs an update. If not, could it be considered as a feature request? I want to help out in line of my abilities but I'm not very experienced so I might need some guidance. Please give me pointers on how to proceed if I can be of any assistance. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Hi, As secrets are live mounted, the change will be seen also on disk so you could just wire life reload in your app. If you don't control it, a sidecar could send e.g. SIGHUP. If you really want a rolling restart, you'd need a controller that hashes the secret content and places an annotation on you workload resource template.podSpec - that'll trigger a rolling restart. That's what some operators do when they don't control the payload to wire a live reload.
This is a generic problem with kube and secrets, I don't think that's something we'd include in the controller. But it can be a standalone controller. (Maybe there are already some.) |
Beta Was this translation helpful? Give feedback.
Hi,
As secrets are live mounted, the change will be seen also on disk so you could just wire life reload in your app. If you don't control it, a sidecar could send e.g. SIGHUP.
If you really want a rolling restart, you'd need a controller that hashes the secret content and places an annotation on you workload resource template.podSpec - that'll trigger a rolling restart. That's what some operators do when they don't control the payload to wire a live reload.
This is a generic problem with kube and secrets, I don't think that's something we'd include in the controller. But it can be a standalone controller. (Maybe there are already some.)