Comment le backend todos obtient son compte Postgres

Comment le backend todos obtient son compte Postgres A sequence diagram generated by Archify. login Kubernetes (SA todos-backend) rôle todos-demo, policytodos-demo-db token Vault read database/creds/todos-demo CREATE ROLE v-kubernet-…A (5 min) en vault_admin, droits DMLseulement username, password, bail 5 min écrit todos-db rollout restart lu au démarrage se connecte en v-kubernet-…A renouvelle le bail à 67 % du TTL de 5 min ALTER ROLE … VALID UNTIL +5 min renouvelle le bail bail tronqué : plafond proche read creds : compte neuf CREATE ROLE v-kubernet-…B nouveau todos-db rollout restart l'ancien pod s'arrête quand lenouveau est prêt le nouveau pod se connecte en …B pg_terminate_backend + DROP ROLE …A 1. Démarrage : obtenir un compte 2. Toutes les ~3 min 30 : renouveler 3. Au plafond d'1 h : compte neuf 4. Fin de l'ancien bail backend todos · pod FastAPI · Sequence participant backend todos pod FastAPI Secret todos-db · username, password · Sequence participant Secret todos-db username, password VSO · VaultDynamicSecret · Sequence participant VSO VaultDynamicSecret Vault · database/ (vault-1) · Sequence participant Vault database/ (vault-1) Postgres · base todos · Sequence participant Postgres base todos Legend main request return security async trace message