prole/tmp/fix_gitlab_sa.sh
chrisfu b4fc5641db checkpoint: sanitize prole config for host portability
- 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
2026-04-10 05:58:40 -07:00

27 lines
755 B
Bash

#!/usr/bin/env bash
set -euo pipefail
KUBECONFIG=/Users/chrisfu/dev/prole/prole-k3s.kubeconfig
export KUBECONFIG
echo "==> Creating gitlab-app-nonroot ServiceAccount..."
kubectl -n gitlab apply -f - <<'SAYAML'
apiVersion: v1
kind: ServiceAccount
metadata:
name: gitlab-app-nonroot
namespace: gitlab
SAYAML
echo "==> Patching GitLab CR to set serviceAccount.create=false..."
kubectl -n gitlab patch gitlab gitlab --type=merge \
-p '{"spec":{"chart":{"values":{"global":{"serviceAccount":{"create":false}}}}}}'
echo "==> Waiting 15s for operator to reconcile..."
sleep 15
echo "==> GitLab CR status:"
kubectl -n gitlab get gitlab gitlab
echo "==> Operator last 20 log lines:"
kubectl logs -n gitlab deployment/gitlab-controller-manager --tail=20