varie
This commit is contained in:
@@ -7,6 +7,8 @@ ENVIRONMENT="${1:-dev}"
|
||||
|
||||
YAML_DIR="kubernetes"
|
||||
|
||||
# Valore di alert_notification_email per l'ambiente (ultima occorrenza in env/<env>/*.env)
|
||||
ALERT_EMAIL=$(cat "env/$ENVIRONMENT"/*.env 2>/dev/null | grep -E '^[[:space:]]*alert_notification_email[[:space:]]*=' | tail -n 1 | sed -E 's/^[^=]*=//' | tr -d '\r"'"'"'[:space:]' || true)
|
||||
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
@@ -15,6 +17,10 @@ YAML_DIR="kubernetes"
|
||||
find "$YAML_DIR" -type d | while read DIR; do
|
||||
if ls "$DIR"/*.yaml 1> /dev/null 2>&1; then
|
||||
if [ "$(basename "$DIR")" = "monitoring" ]; then
|
||||
if [ -z "$ALERT_EMAIL" ]; then
|
||||
echo "alert_notification_email non valorizzata per l'ambiente $ENVIRONMENT: deploy di $DIR saltato."
|
||||
continue
|
||||
fi
|
||||
echo "Deploy delle risorse di monitoring nella directory $DIR con kubeconfig dedicato..."
|
||||
kubectl --kubeconfig=/root/work/pipeline/kc apply -f "$DIR"
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user