Support rotating certs in running pods instead of restarting them
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 35/100
- Issue type
- Feature
- Clarity
- Mostly clear
- Activity status
- Active
- Tech stack
- kubernetes, rust
- Domain
- infrastructure, security
Research direction
Start by tracing the CSIDriver configuration and the NodePublishVolume implementation, then find where the replace time is computed for the restarter annotation. The issue proposes opt-in per-volume certificate renewal, safe replacement of files in mounted volumes, and retaining restart behavior as a fallback. Done would include renewal on republish without exposing partially written certificates; the issue names no files or tests.
Written by the indexing model from the issue text.
Description
Description
Right now, when a cert from the secret-operator gets close to expiring, the restarter just kills the pod based on the annotation set by secret-op (I think). That works, but it’s annoying for things that are slow to come back up or don't handle restarts well (looking at you, NiFi!), and it means short cert lifetimes come with a lot of restarts.
Some products can already reload certs from disk on their own. For example NiFi does this with nifi.security.autoreload.enabled. For products like that, it’d be nice if we could swap the cert in the volume and let the product take it from there, without forcing an unneeded restart on the pod.
The CSI lifecyle in Kubernetes has a hook for this: if we set requiresRepublish: true on our CSIDriver, the kubelet keeps calling NodePublishVolume for volumes that are already mounted. We can use that to check whether the cert is past its replace time and, if so, issue a new one and write it into the existing volume. We already compute that time for the restarter annotation, so we’d mainly need to keep it somewhere cheap to check, for example in memory with a small file in the volume as a fallback after the driver restarts.
This would have to be opt-in per volume, since products that don’t reload would just keep using the old cert until it expires. We’d probably also keep the restarter annotation as a safety net in case reissuing fails.
Bit of file handling to investigate since we don't want half-written certs being read, so probably need to come up with some symlink or mv magic, but that should be doable.
- Dominant language
- Rust
- Stars
- 14
- Forks
- 8
- Avg merge
- 1d 12h
- Merged PRs (30d)
- 9
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- No contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from stackabletech/secret-operator
-
type/bug
Difficulty 4/5 3-5 days Newbie friendliness 45/100
stackabletech/secret-operator#754 ·
Maintainers usually reply within 1 day
-
autoTls: bound certificate lifetime by the CA that will actually sign it, not the configured caCertificateLifetimePossibly taken @xeniape claimed this 25 days ago. Open
Difficulty 3/5 1-2 days Newbie friendliness 48/100
stackabletech/secret-operator#753 · 1 comment · 1 assignee ·
Maintainers usually reply within 1 day
-
skip the PodListeners lookup when the served Pod is being deletedPossibly taken @soenkeliebau claimed this 9 days ago. Open
Difficulty 3/5 1-2 days Newbie friendliness 72/100
stackabletech/secret-operator#720 · 1 comment · 1 assignee ·
Maintainers usually reply within 1 day
-
customer-request type/bug
Difficulty 3/5 1-2 days Newbie friendliness 38/100
stackabletech/secret-operator#666 · 2 comments ·
Maintainers usually reply within 1 day
-
Allow certificates to contain subjects with allowed external namesMay be free again @NickLarsenNZ claimed this 451 days ago, and no pull request is open. Opencustomer-request type/feature-improvement
stackabletech/secret-operator#630 · 7 comments · 1 assignee ·
Maintainers usually reply within 1 day
All issues in stackabletech/secret-operator
Similar issues
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
storytold/photocraft#14822 ·
Maintainers usually reply within 1 day
-
bug css
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
dginev/latexml-oxide#853 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
Maintainers usually reply within 2 days
-
[Bug] export_build_environment admits its output directory only after the export ran in the build computerPossibly taken @viniciusdsandrade claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day