feat: add .gitignore and apps/template for new apps

This commit is contained in:
2026-04-01 16:32:59 +08:00
parent 98cd6b71cb
commit 19342c6821
10 changed files with 292 additions and 0 deletions

31
apps/template/status.sh Executable file
View File

@@ -0,0 +1,31 @@
#!/usr/bin/env bash
# 用途:檢查 {{APP_NAME}} 狀態
set -euo pipefail
APP_NAME="{{APP_NAME}}"
echo "=== [ $APP_NAME 資源狀態 ] ==="
echo ""
# 1. Pods
echo "--- Pods ---"
kubectl get pods -l "app=$APP_NAME" -o wide
echo ""
# 2. Services
echo "--- Services ---"
kubectl get svc -l "app=$APP_NAME"
echo ""
# 3. PVC
echo "--- Storage (PVC) ---"
kubectl get pvc | grep "$APP_NAME" || echo "無 PVC"
echo ""
# 4. Ingress
echo "--- Access (Ingress) ---"
kubectl get ingress -l "app=$APP_NAME" -o custom-columns=NAME:.metadata.name,HOSTS:.spec.rules[*].host,ADDRESS:.status.loadBalancer.ingress[*].ip