fix: corrigir tipos de servidor AMD (CPX→CX), autoscaler, stdin e cleanup

- Corrigir tipos Hetzner: CPX não existe, usar CX (Intel shared vCPU)
  - CX23 (2 vCPU, 4GB) equivalente ao CAX11
  - CX33 (4 vCPU, 8GB) equivalente ao CAX21
  - CX43 (8 vCPU, 16GB) equivalente ao CAX31
- Corrigir location no autoscaler para amd64 (nbg1→fsn1)
- Remover gitlab-pool do autoscaler (substituído pelo Gitea)
- Aumentar worker-pool max para 30
- Corrigir Floating IP e Load Balancer hardcoded em nbg1
- Corrigir stdin em read interativo: usar < /dev/tty e read -p
- Corrigir cleanup de namespace: lidar com Terminating e finalizers
- Corrigir CNPG: nome do deployment, secret e endpointURL duplo
- Aulas afetadas: 08, 09, 10, 11, 12, 14, 17
This commit is contained in:
ArgoCD Setup
2026-05-09 07:24:26 -03:00
parent 3d042a29ae
commit a0cf1e6cef
18 changed files with 153 additions and 92 deletions
+7 -14
View File
@@ -105,8 +105,7 @@ collect_user_input() {
echo -e "Deseja usar esta configuração?"
echo -e " 1) Sim, continuar com a configuração existente"
echo -e " 2) Não, reconfigurar"
echo -n "Escolha [1/2]: "
read -r choice
read -r -p "Escolha [1/2]: " choice < /dev/tty
if [[ "$choice" == "1" ]]; then
return 0
fi
@@ -114,8 +113,7 @@ collect_user_input() {
# Coletar hostname
echo ""
echo -n "Digite o hostname do Gitea (ex: git.kube.quest): "
read -r GITEA_HOST
read -r -p "Digite o hostname do Gitea (ex: git.kube.quest): " GITEA_HOST < /dev/tty
if [[ -z "$GITEA_HOST" ]]; then
log_error "Hostname não pode ser vazio"
@@ -134,8 +132,7 @@ collect_user_input() {
echo -e "Deseja usar esta configuração de TLS?"
echo -e " 1) Sim"
echo -e " 2) Não, reconfigurar"
echo -n "Escolha [1/2]: "
read -r choice
read -r -p "Escolha [1/2]: " choice < /dev/tty
if [[ "$choice" == "1" ]]; then
save_config
return 0
@@ -147,8 +144,7 @@ collect_user_input() {
echo "Você usa CloudFlare para DNS?"
echo " 1) Sim (com proxy/CDN ativado - ícone laranja)"
echo " 2) Não"
echo -n "Escolha [1/2]: "
read -r choice
read -r -p "Escolha [1/2]: " choice < /dev/tty
if [[ "$choice" == "1" ]]; then
USE_CLOUDFLARE=true
@@ -161,14 +157,12 @@ collect_user_input() {
echo "Deseja ativar HTTPS com Let's Encrypt?"
echo " 1) Sim (recomendado para produção)"
echo " 2) Não (apenas HTTP)"
echo -n "Escolha [1/2]: "
read -r choice
read -r -p "Escolha [1/2]: " choice < /dev/tty
if [[ "$choice" == "1" ]]; then
USE_LETSENCRYPT=true
echo ""
echo -n "Digite seu email para Let's Encrypt: "
read -r LETSENCRYPT_EMAIL
read -r -p "Digite seu email para Let's Encrypt: " LETSENCRYPT_EMAIL < /dev/tty
if [[ -z "$LETSENCRYPT_EMAIL" ]]; then
log_error "Email é obrigatório para Let's Encrypt"
@@ -340,8 +334,7 @@ if [[ "$USE_LETSENCRYPT" == "true" ]]; then
echo -e "${YELLOW} O Let's Encrypt precisa do DNS configurado para emitir o certificado.${NC}"
fi
echo ""
echo -n "Pressione ENTER quando o DNS estiver configurado..."
read -r
read -r -p "Pressione ENTER quando o DNS estiver configurado..." < /dev/tty
echo ""