video-iac/scripts/fast-deploy-console

38 lines
1.1 KiB
Bash
Executable File

#!/bin/bash
set -e
# scripts/fast-deploy-infra.sh
# Quickly updates Console, Authelia, and Ingress-Nginx bypassing CI/CD.
ENV=${1:-staging}
CONTEXT="lke-video-$ENV" # Adjust this if your context names differ
echo "🚀 Fast-deploying infra components to $ENV..."
# 1. Update Authelia
echo "📦 Updating Authelia..."
helm upgrade --install authelia k8s/authelia
--namespace authelia
--create-namespace
-f k8s/authelia/values.yaml
-f k8s/authelia/values-$ENV.yaml
# 2. Update Console (The Wiki)
echo "📦 Updating Console..."
helm upgrade --install console k8s/console
--namespace console
--create-namespace
-f k8s/console/values-$ENV.yaml
# 3. Optional: Update Ingress-Nginx (usually static, but good to have)
if [[ "$2" == "--with-ingress" ]]; then
echo "📦 Updating Ingress-Nginx..."
# Note: This uses the official repo but local values pattern if we had one
# For now, we'll just trigger a restart to pick up any config changes if needed
kubectl rollout restart deployment/ingress-nginx-controller -n ingress-nginx
fi
echo "✅ Deployment complete. Checking status..."
kubectl get pods -n authelia
kubectl get pods -n console