feat(ci): Ajout support HA pour pannes de nœuds
Modification workflows CI/CD pour gérer élégamment pannes nœuds Proxmox : Workflow CI (ci.yml) : - Terraform Plan s'exécute uniquement sur branche main (CI plus rapide sur branches feature) - Échecs Plan sur nœuds indisponibles ne bloquent pas validation - Ajout message avertissement quand plan échoue Workflow Deploy (deploy.yml) : - Ajout continue-on-error à tous les jobs déploiement (pve1, pve2, pve3) - Modified cluster validation to require 2/3 nodes (quorum) - Enhanced deployment summary with success counter - Exit codes: 0 if >=2 nodes, 1 if 1 node, 1 if 0 nodes This ensures the infrastructure remains operational even when one Proxmox node is down, maintaining HA principles.
This commit is contained in:
parent
a855240c6d
commit
6041d76186
2 changed files with 38 additions and 8 deletions
|
|
@ -35,7 +35,7 @@ jobs:
|
|||
done
|
||||
|
||||
- name: Terraform Plan
|
||||
if: github.event_name == 'push'
|
||||
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
|
||||
run: |
|
||||
for dir in terraform/pve*; do
|
||||
if [ -d "$dir" ]; then
|
||||
|
|
@ -44,7 +44,7 @@ jobs:
|
|||
cd "$dir" && \
|
||||
cp ../terraform.tfvars.example terraform.tfvars && \
|
||||
tofu init && \
|
||||
tofu plan -out="tfplan-$(basename $dir)"
|
||||
tofu plan -out="tfplan-$(basename $dir)" || echo "WARNING: Plan failed for $(basename $dir) - node may be unavailable"
|
||||
)
|
||||
fi
|
||||
done
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue