prole/tmp/diagnose_host_error.sh

17 lines
770 B
Bash

#!/usr/bin/env bash
export KUBECONFIG=/Users/chrisfu/dev/knoe/knoe-k3s.kubeconfig
POD="gitlab-webservice-default-675ccb7b99-gxgs8"
echo "==> Configure init logs (look for host rendering):"
kubectl -n gitea logs "$POD" -c configure 2>&1 \
| grep -iE "host|gitlab_host|url|allowed" | head -15 || true
echo "==> Full CR global values (python parse):"
kubectl -n gitea get gitlab gitlab -o jsonpath='{.spec.chart.values.global}' 2>&1 \
| python3 -c "import sys,json; v=json.load(sys.stdin); print(json.dumps(v,indent=2))" \
| grep -A8 '"hosts"'
echo "==> Exec into running webservice — check generated gitlab.yml host line:"
kubectl -n gitea exec "$POD" -c webservice -- \
grep -E "host:|url:|allowed_host" /srv/gitlab/config/gitlab.yml 2>&1 | head -10 || true