fix: remover hardcoded ARM64 de aula-08/13/14 para suportar amd64

- aula-08/outputs.tf: usar local.selected_arch ao invés de CAX11 fixo
- aula-08/cleanup.sh: detectar arch dos nodes para filtrar instance type
- aula-08/setup.sh: custos estimados baseados na arch selecionada
- aula-13/prepare-images.sh: detectar arch do cluster automaticamente
- aula-14/setup.sh: detectar arch do cluster para build correto
This commit is contained in:
ArgoCD Setup
2026-05-09 03:39:33 -03:00
parent 72ffe47528
commit 3d042a29ae
5 changed files with 36 additions and 15 deletions
+8 -1
View File
@@ -44,7 +44,14 @@ fi
if [ -f "kubeconfig" ]; then
export KUBECONFIG="$SCRIPT_DIR/kubeconfig"
AUTOSCALER_WORKERS=$(kubectl get nodes -l node.kubernetes.io/instance-type=cax11 \
# Detectar arch dos nodes para filtrar instance type correto
NODE_ARCH=$(kubectl get nodes -o jsonpath='{.items[0].metadata.labels.kubernetes\.io/arch}' 2>/dev/null || echo "arm64")
if [[ "$NODE_ARCH" == "amd64" ]]; then
INSTANCE_PATTERN="cpx"
else
INSTANCE_PATTERN="cax"
fi
AUTOSCALER_WORKERS=$(kubectl get nodes --no-headers 2>/dev/null | grep -i "$INSTANCE_PATTERN" | wc -l | tr -d ' ' || echo "0")
--no-headers 2>/dev/null | wc -l | tr -d ' ' || echo "0")
if [ "$AUTOSCALER_WORKERS" -gt "1" ]; then