mirror of
https://github.com/dredx/prole.git
synced 2026-09-24 17:44:33 +00:00
- fix conf/prod/prole.cfg by replacing hardcoded /Users/chrisfu paths with /Users/chrisfu - remove injected [update.sh] log lines and stray password artifacts so config is executable - include latest pending updates across deployment config, UI/core flow, vault/network artifacts, and helper scripts
37 lines
1.5 KiB
Bash
37 lines
1.5 KiB
Bash
#!/usr/bin/env bash
|
|
set -euo pipefail
|
|
export KUBECONFIG=/Users/chrisfu/dev/prole/prole-k3s.kubeconfig
|
|
|
|
echo "==> Deleting GitLab CR (lets operator clean up managed resources)..."
|
|
kubectl -n gitlab delete gitlab gitlab --ignore-not-found --timeout=60s 2>&1 || true
|
|
|
|
echo "==> Waiting 20s for operator cleanup..."
|
|
sleep 20
|
|
|
|
echo "==> Deleting gitlab namespace (all remaining resources)..."
|
|
kubectl delete namespace gitlab --ignore-not-found --timeout=120s 2>&1 || true
|
|
|
|
echo "==> Deleting jemalloc-builder (if in different ns)..."
|
|
kubectl delete daemonset jemalloc-builder -n gitlab --ignore-not-found 2>/dev/null || true
|
|
|
|
echo "==> Releasing bound/retained PVs for gitlab..."
|
|
for pv in gitlab-gitaly-synology gitlab-minio-synology; do
|
|
kubectl patch pv "$pv" -p '{"spec":{"claimRef":null}}' 2>/dev/null || true
|
|
kubectl delete pv "$pv" --ignore-not-found 2>/dev/null || true
|
|
done
|
|
|
|
echo "==> Wiping synology data dirs on gandalf (fresh start)..."
|
|
kubectl -n knoe-system run gitlab-wipe \
|
|
--image=alpine:latest --restart=Never --rm --attach \
|
|
--overrides='{
|
|
"spec":{"nodeName":"gandalf.prole.org","tolerations":[{"operator":"Exists"}],
|
|
"volumes":[{"name":"s","hostPath":{"path":"/synology/d005","type":"Directory"}}],
|
|
"containers":[{"name":"gitlab-wipe","image":"alpine:latest",
|
|
"command":["sh","-c","rm -rf /s/gitlab && echo wiped"],
|
|
"volumeMounts":[{"name":"s","mountPath":"/s"}]}]}}' 2>&1 || true
|
|
|
|
echo "==> Verifying gitlab namespace is gone..."
|
|
kubectl get ns gitlab 2>&1 || echo "namespace deleted OK"
|
|
|
|
echo "==> Clean slate complete."
|