Compare commits
2 Commits
feat/llm-p
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
| c0b4dc89f3 | |||
|
|
7f49294b36 |
@@ -29,25 +29,27 @@ echo " mcpctl Full Deploy"
|
|||||||
echo "========================================"
|
echo "========================================"
|
||||||
|
|
||||||
# --- Pre-flight: Pulumi drift check ---
|
# --- Pre-flight: Pulumi drift check ---
|
||||||
|
# Uses the kubernetes-deployment/scripts/pulumi.sh wrapper which pulls
|
||||||
|
# PULUMI_CONFIG_PASSPHRASE from OpenBao at runtime, so the passphrase
|
||||||
|
# never needs to live in .env or shell history. Falls back to a warning
|
||||||
|
# if the wrapper isn't present (older clone of kubernetes-deployment).
|
||||||
echo ""
|
echo ""
|
||||||
echo ">>> Pre-flight: checking for Pulumi infra drift"
|
echo ">>> Pre-flight: checking for Pulumi infra drift"
|
||||||
echo ""
|
echo ""
|
||||||
if [ -d "$PULUMI_DIR" ]; then
|
if [ -d "$PULUMI_DIR" ] && [ -x "$PULUMI_DIR/scripts/pulumi.sh" ]; then
|
||||||
if [ -z "$PULUMI_CONFIG_PASSPHRASE" ]; then
|
preview_output=$("$PULUMI_DIR/scripts/pulumi.sh" preview --stack "$PULUMI_STACK" --non-interactive --diff 2>&1) || true
|
||||||
echo " WARNING: PULUMI_CONFIG_PASSPHRASE not set — skipping drift check."
|
|
||||||
echo " Set it in .env or export it to enable."
|
|
||||||
else
|
|
||||||
preview_output=$(cd "$PULUMI_DIR" && pulumi preview --stack "$PULUMI_STACK" --non-interactive --diff 2>&1) || true
|
|
||||||
if echo "$preview_output" | grep -qE '^\s+[-+~]'; then
|
if echo "$preview_output" | grep -qE '^\s+[-+~]'; then
|
||||||
echo "$preview_output"
|
echo "$preview_output"
|
||||||
echo ""
|
echo ""
|
||||||
echo "ERROR: Pulumi detected infra changes that have not been applied."
|
echo "ERROR: Pulumi detected infra changes that have not been applied."
|
||||||
echo " Run: cd $PULUMI_DIR && pulumi up -s $PULUMI_STACK"
|
echo " Run: $PULUMI_DIR/scripts/pulumi.sh up -s $PULUMI_STACK"
|
||||||
echo " Then re-run this script."
|
echo " Then re-run this script."
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
echo " No drift — infra is in sync."
|
echo " No drift — infra is in sync."
|
||||||
fi # passphrase check
|
elif [ -d "$PULUMI_DIR" ]; then
|
||||||
|
echo " WARNING: $PULUMI_DIR/scripts/pulumi.sh not found or not executable —"
|
||||||
|
echo " skipping drift check. Pull latest kubernetes-deployment."
|
||||||
else
|
else
|
||||||
echo " WARNING: Pulumi repo not found at $PULUMI_DIR — skipping drift check."
|
echo " WARNING: Pulumi repo not found at $PULUMI_DIR — skipping drift check."
|
||||||
fi
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user