fix(cd): snapshot live network policy for rollback
Some checks failed
CD Pipeline / workflow-shape (push) Successful in 0s
CD Pipeline / cancel-stale-cd (push) Has been skipped
CD Pipeline / tests (push) Successful in 3m25s
CD Pipeline / build-and-deploy (push) Failing after 5m54s
AI 技術雷達監控 / ai-technology-watch (push) Successful in 43s
CD Pipeline / post-deploy-checks (push) Has been skipped

This commit is contained in:
ogt
2026-07-11 01:56:16 +08:00
parent 3eb5d9188c
commit 954abc6864
2 changed files with 23 additions and 2 deletions

View File

@@ -70,6 +70,10 @@ def test_cd_applies_rolls_back_and_verifies_network_boundary() -> None:
assert "02-network-policy.yaml" in workflow
assert "NETWORK_POLICY_ROLLBACK_FILE" in workflow
assert "git show HEAD^:k8s/awoooi-prod/02-network-policy.yaml" not in workflow
assert "BROKER_POLICY_EXISTED" in workflow
assert "$KUBECTL get networkpolicy default-deny-all" in workflow
assert "$KUBECTL delete networkpolicy '$BROKER_POLICY_NAME'" in workflow
assert "allow-ansible-executor-broker-ssh-egress" in workflow
assert "api_ssh_egress_denied=true" in workflow
assert "worker_ssh_egress_denied=true" in workflow