Support rotating certs in running pods instead of restarting them

Aberta
#769 1 comentário 1 reação 0 responsáveis Ver no GitHub

Mantenedores costumam responder em até 1 dia

Ninguém assumiu esta issue ainda.

Avaliação

Dificuldade
5/5
Tempo estimado
Mais de uma semana
Facilidade para iniciantes
35/100
Tipo de issue
Funcionalidade
Clareza
Razoavelmente clara
Status de atividade
Ativa
Stack de tecnologia
kubernetes, rust

Direção de pesquisa

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.

Escrita pelo modelo de indexação a partir do texto da issue.

Descrição

customer-request

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.

Linguagem predominante
Rust
Estrelas
14
Forks
8
Merge médio
1d 12h
PRs com merge (30d)
9

Preparar o ambiente

  • Sem Dockerfile nem arquivo Docker Compose
  • Tem um modelo de pull request
  • Sem guia de contribuição

Primeiros passos

  1. Leia a issue inteira e depois o guia de contribuição do projeto.
  2. Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
  3. Faça um fork do repositório e trabalhe em uma branch.
  4. Abra um pull request que referencie o número da issue.

Mais de stackabletech/secret-operator

Todas as issues de stackabletech/secret-operator

Issues semelhantes

Mais issues de Rust

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.