|
180 | 180 | │ KYVERNO ADMISSION WEBHOOK INTERCEPTS │ |
181 | 181 | │ │ |
182 | 182 | │ "I see a PVC with backup: hourly (or daily)" │ |
183 | | -│ "Let me check if a backup exists..." │ |
184 | 183 | │ │ |
| 184 | +│ Step 1: Validate rule checks PVC Plumber health (FAIL-CLOSED) │ |
| 185 | +│ ┌────────────────────────────────────────────────────────────────────────────┐ │ |
| 186 | +│ │ HTTP GET http://pvc-plumber.volsync-system/readyz │ │ |
| 187 | +│ │ If unreachable -> DENY PVC creation (apps retry via ArgoCD backoff) │ │ |
| 188 | +│ │ If healthy -> proceed to step 2 │ │ |
| 189 | +│ └────────────────────────────────────────────────────────────────────────────┘ │ |
| 190 | +│ │ |
| 191 | +│ Step 2: Mutate rule checks if backup exists │ |
185 | 192 | │ ┌────────────────────────────────────────────────────────────────────────────┐ │ |
186 | 193 | │ │ HTTP GET http://pvc-plumber.volsync-system/exists/karakeep/data-pvc │ │ |
187 | 194 | │ └────────────────────────────────────────────────────────────────────────────┘ │ |
|
204 | 211 | │ Returns JSON to Kyverno: │ |
205 | 212 | │ {"exists": true} OR {"exists": false} │ |
206 | 213 | │ │ |
207 | | -│ On ANY error (timeout, network, parse) -> {"exists": false} (fail-open) │ |
| 214 | +│ On ANY error (timeout, network, parse) -> {"exists": false} │ |
| 215 | +│ NOTE: Kyverno validate rule DENIES PVC creation if PVC Plumber is unreachable │ |
| 216 | +│ (fail-closed). See Scenario 5 below. │ |
208 | 217 | │ │ |
209 | 218 | └─────────────────────────────────────────────────────────────────────────────────────┘ |
210 | 219 | │ |
|
407 | 416 | │ │ |
408 | 417 | └─────────────────────────────────────────────────────────────────────────────────────┘ |
409 | 418 |
|
| 419 | +┌─────────────────────────────────────────────────────────────────────────────────────┐ |
| 420 | +│ SCENARIO 5: PVC PLUMBER DOWN DURING DISASTER RECOVERY (FAIL-CLOSED) │ |
| 421 | +├─────────────────────────────────────────────────────────────────────────────────────┤ |
| 422 | +│ │ |
| 423 | +│ Your cluster died. You rebuild from scratch. NFS has all your Kopia backups. │ |
| 424 | +│ But PVC Plumber fails to start (bad config, NFS unreachable, etc.) │ |
| 425 | +│ │ |
| 426 | +│ 1. New cluster bootstrapped │ |
| 427 | +│ 2. ArgoCD syncs apps │ |
| 428 | +│ 3. PVC Plumber (Wave 2) is unhealthy │ |
| 429 | +│ 4. Kyverno (Wave 4) deploys with validate rule │ |
| 430 | +│ 5. Apps (Wave 6) attempt to create PVCs with backup labels │ |
| 431 | +│ 6. Kyverno validate rule calls PVC Plumber /readyz -> UNREACHABLE │ |
| 432 | +│ 7. PVC creation DENIED │ |
| 433 | +│ 8. ArgoCD retries with exponential backoff (5s -> 10s -> 20s -> 40s -> 3m) │ |
| 434 | +│ 9. Operator fixes PVC Plumber │ |
| 435 | +│ 10. PVC Plumber starts, /readyz returns 200 │ |
| 436 | +│ 11. ArgoCD retries -> PVC creates -> pvc-plumber finds backup -> data restored │ |
| 437 | +│ │ |
| 438 | +│ Result: Apps wait for PVC Plumber. Data safety over availability. │ |
| 439 | +│ Human intervention required to fix PVC Plumber. │ |
| 440 | +│ │ |
| 441 | +│ Trade-off: Apps with backup labels CANNOT deploy until PVC Plumber is healthy. │ |
| 442 | +│ Apps WITHOUT backup labels deploy normally and are unaffected. │ |
| 443 | +│ │ |
| 444 | +│ Why this matters: Without this, apps deploy with empty PVCs and the restore │ |
| 445 | +│ window is permanently missed (Kyverno only checks on PVC CREATE). │ |
| 446 | +│ │ |
| 447 | +└─────────────────────────────────────────────────────────────────────────────────────┘ |
| 448 | +
|
410 | 449 |
|
411 | 450 | ═══════════════════════════════════════════════════════════════════════════════════════ |
412 | 451 | COMPONENT SUMMARY |
|
0 commit comments