Files
home-network-k3s-impl/conformance/tests/l3-fault-injection/dr-restore/chainsaw-test.yaml
T

53 lines
2.2 KiB
YAML

# =============================================================================
# L3 FAULT-INJECTION SCAFFOLD — DR restore (R-STATE-03) *SAFETY-CRITICAL*
# Catalog: docs/14 "DR restore (R-STATE-03, L3)"
#
# GIVEN an OFF-CLUSTER backup of a namespace + volumes,
# WHEN the namespace + volumes are restored into a CLEAN state,
# THEN the service returns with its data.
#
# R-TEST-05: proves recoverability by restoring into a genuinely clean namespace
# (not by reading the still-live original). Backup TARGET is OQ-BKP (OPEN) — the
# restore mechanism is Velero (T-4.3/T-4.4); this scaffold is target-agnostic.
#
# STATUS: scaffold — needs T-4.3 (Velero + off-cluster schedule) + T-4.4 (drill).
# BLOCKED-BY spec open question OQ-BKP (off-cluster backup target) — see report.
# =============================================================================
apiVersion: chainsaw.kyverno.io/v1alpha1
kind: Test
metadata:
name: dr-restore
labels:
conformance.home.k3s/R-STATE-03: "true"
annotations:
conformance.home.k3s/requirements: "R-STATE-03"
conformance.home.k3s/layer: "L3"
conformance.home.k3s/safety-critical: "true"
conformance.home.k3s/intent: >-
Restore a namespace + volumes from an off-cluster backup into a clean state;
the service returns with its data.
conformance.home.k3s/blocked-by: "OQ-BKP (off-cluster backup target, spec-open)"
spec:
steps:
- name: given-off-cluster-backup-exists
try:
- script:
content: 'echo "TODO(T-4.3): ensure a Velero backup of ns+volumes exists off-cluster"'
- name: when-restore-into-clean-namespace
try:
- script:
content: |
set -euo pipefail
echo "TODO(T-4.4): create a clean target ns; trigger Velero restore of ns+PVs"
- name: then-service-returns-with-data
try:
- script:
content: |
set -euo pipefail
echo "TODO: assert app Ready in restored ns AND canary data present"
echo "DR_RESTORE_OK"
check: { ($stdout =~ 'DR_RESTORE_OK'): true }
finally:
- script:
content: 'echo "TODO: delete the restore target namespace (self-cleaning)"'