mirror of
https://github.com/dredx/prole.git
synced 2026-09-23 12:03:59 +00:00
28 lines
993 B
Bash
28 lines
993 B
Bash
#!/usr/bin/env bash
|
|
set -euo pipefail
|
|
export KUBECONFIG=/Users/chrisfu/dev/knoe/knoe-k3s.kubeconfig
|
|
|
|
echo "==> Patching CR: global.allowedHosts as flat string list..."
|
|
kubectl -n gitea patch gitlab gitlab --type=merge -p '{
|
|
"spec":{"chart":{"values":{
|
|
"global":{
|
|
"allowedHosts":["git.knoe.org","knoe.org"]
|
|
}
|
|
}}}}'
|
|
|
|
echo "==> Also updating init_gitlab.sh with the fix..."
|
|
|
|
echo "==> Deleting crashing pods to force reconcile with new values..."
|
|
kubectl -n gitea delete pod -l app=webservice --ignore-not-found
|
|
kubectl -n gitea delete pod -l app=sidekiq --ignore-not-found
|
|
kubectl -n gitea delete pod gitlab-webservice-default-675ccb7b99-gzmzz --ignore-not-found 2>/dev/null || true
|
|
|
|
echo "==> Waiting 5min for pods to restart and Puma to boot..."
|
|
sleep 300
|
|
|
|
echo "==> Pod status:"
|
|
kubectl -n gitea get pods --no-headers | grep -v jemalloc-builder | grep -v Completed | sort
|
|
|
|
echo "==> GitLab CR phase:"
|
|
kubectl -n gitea get gitlab gitlab -o jsonpath='{.status.phase}' && echo
|