Workshop completo: aulas 08-10 com Talos, n8n e GitLab na Hetzner
Aula 08 - Cluster Kubernetes HA: - Setup interativo com OpenTofu para Talos na Hetzner - CCM, CSI Driver, Cluster Autoscaler, Metrics Server - NGINX Ingress com LoadBalancer (HTTP/HTTPS/SSH) Aula 09 - n8n na Hetzner: - Deploy via Helm com PostgreSQL e Redis - Suporte multi-tenant com add-client.sh - Integração com Hetzner CSI para volumes persistentes Aula 10 - GitLab na Hetzner: - Setup agnóstico: CloudFlare (trusted proxies) ou Let's Encrypt - Anti-affinity para distribuir webservice/sidekiq em nós diferentes - Container Registry e SSH via TCP passthrough - Documentação do erro 422 e solução com trustedCIDRsForXForwardedFor Melhorias gerais: - READMEs atualizados com arquitetura e troubleshooting - Scripts cleanup.sh para todas as aulas - CLAUDE.md atualizado com contexto do projeto
This commit is contained in:
51
aula-06/cleanup.sh
Executable file
51
aula-06/cleanup.sh
Executable file
@@ -0,0 +1,51 @@
|
||||
#!/bin/bash
|
||||
# =============================================================================
|
||||
# Cleanup da Aula 06 - Remove n8n (ambiente LOCAL)
|
||||
# =============================================================================
|
||||
|
||||
set -e
|
||||
|
||||
# Cores para output
|
||||
RED='\033[0;31m'
|
||||
GREEN='\033[0;32m'
|
||||
YELLOW='\033[1;33m'
|
||||
BLUE='\033[0;34m'
|
||||
NC='\033[0m'
|
||||
|
||||
log_info() { echo -e "${BLUE}[INFO]${NC} $1"; }
|
||||
log_success() { echo -e "${GREEN}[OK]${NC} $1"; }
|
||||
log_warn() { echo -e "${YELLOW}[WARN]${NC} $1"; }
|
||||
|
||||
echo ""
|
||||
echo "============================================"
|
||||
echo " Cleanup - Aula 06 (n8n LOCAL)"
|
||||
echo "============================================"
|
||||
echo ""
|
||||
|
||||
# Remover n8n
|
||||
log_info "Removendo n8n..."
|
||||
helm uninstall n8n -n n8n 2>/dev/null || true
|
||||
log_success "Helm release removida"
|
||||
|
||||
# Remover PVCs
|
||||
log_info "Removendo PVCs..."
|
||||
kubectl delete pvc --all -n n8n 2>/dev/null || true
|
||||
log_success "PVCs removidos"
|
||||
|
||||
# Remover namespace
|
||||
log_info "Removendo namespace n8n..."
|
||||
kubectl delete namespace n8n 2>/dev/null || true
|
||||
log_success "Namespace removido"
|
||||
|
||||
# Opcional: remover NGINX Ingress
|
||||
read -p "Remover NGINX Ingress também? (s/N): " remove_ingress
|
||||
if [[ "$remove_ingress" =~ ^[Ss]$ ]]; then
|
||||
log_info "Removendo NGINX Ingress..."
|
||||
helm uninstall nginx-ingress -n ingress-nginx 2>/dev/null || true
|
||||
kubectl delete namespace ingress-nginx 2>/dev/null || true
|
||||
log_success "NGINX Ingress removido"
|
||||
fi
|
||||
|
||||
echo ""
|
||||
log_success "Cleanup concluído!"
|
||||
echo ""
|
||||
Reference in New Issue
Block a user