Files
k3s/apps/codimd/stop.sh

13 lines
606 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.
#!/bin/bash
echo "--- 安全停止 CodiMD (保留資料) ---"
# 只刪除 Deployment, Service, Ingress, Middleware
# 故意跳過 02-codimd-pvc.yaml 和 01-codimd-secrets.yaml
kubectl delete -f manifests/03-codimd-db-deployment.yaml --ignore-not-found
kubectl delete -f manifests/05-codimd-app-deployment.yaml --ignore-not-found
kubectl delete -f manifests/04-codimd-db-svc.yaml --ignore-not-found
kubectl delete -f manifests/06-codimd-app-svc.yaml --ignore-not-found
kubectl delete -f manifests/07-codimd-ingress.yaml --ignore-not-found
echo "✅ 服務已停止Longhorn 磁碟資料安全保留。"