Skip to content

Evenfire is an intelligence layer platform for running LLM agents that take real actions, on your infrastructure

TypeScript

fix: refresh egress policy during recovery drift

Alfredo Lopez8e656ecd6a2e
diff --git a/scripts/minikube/full-setup.sh b/scripts/minikube/full-setup.sh
index 8f5afd3de..3b19f576a 100755
--- a/scripts/minikube/full-setup.sh
+++ b/scripts/minikube/full-setup.sh
@@ -1534,7 +1534,7 @@ apply_refreshed_k8s_api_network_policies() {
err "Validated Kubernetes API NetworkPolicy manifest is missing; refusing writer recovery"
return 1
fi
- if writer_recovery_policy_ready; then
+ if writer_recovery_policy_ready && [ "$K8S_API_EGRESS_POLICY_DRIFT" != true ]; then
log "Validated Kubernetes API egress policy already staged; resuming writer recovery"
return 0
fi
diff --git a/scripts/tests/test-gfs-deploy-contract.sh b/scripts/tests/test-gfs-deploy-contract.sh
index eb77d61fe..54e94c0b5 100755
--- a/scripts/tests/test-gfs-deploy-contract.sh
+++ b/scripts/tests/test-gfs-deploy-contract.sh
@@ -224,6 +224,8 @@ assert_minikube_upgrade_classifier() {
|| fail "$path does not mark post-migration recovery as complete"
grep -Fq 'WRITER_RECOVERY_FENCE_PENDING=true' "$path" \
|| fail "$path does not re-fence every durable post-migration resume"
+ grep -Fq 'if writer_recovery_policy_ready && [ "$K8S_API_EGRESS_POLICY_DRIFT" != true ]; then' "$path" \
+ || fail "$path can skip a refreshed Kubernetes API egress policy after endpoint drift"
grep -Fq 'render-fenced-writer-deployments.rb' "$path" \
|| fail "$path does not render a fenced recovery overlay"
grep -Fq 'writer_recovery_state_phase overlay-applying' "$path" \