Files
k3s/apps/template/deploy.sh

19 lines
415 B
Bash
Executable File
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
#!/usr/bin/env bash
# 用途:部署 {{APP_NAME}} 到 K3s
set -euo pipefail
BASE_DIR="$(cd "$(dirname "$0")" && pwd)"
MANIFESTS="$BASE_DIR/manifests"
APP_NAME="{{APP_NAME}}"
echo "🚀 部署 $APP_NAME..."
# 依序套用 manifests按檔名排序
kubectl apply -f "$MANIFESTS/"
echo "⏳ 等待 Pod 就緒..."
kubectl rollout status deployment/$APP_NAME --timeout=120s
echo "$APP_NAME 部署完成"