prole/tmp/fix_registry_cr.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

26 lines
1.1 KiB
Bash

#!/usr/bin/env bash
set -euo pipefail
export KUBECONFIG=/Users/chrisfu/dev/prole/prole-k3s.kubeconfig
echo "==> Patching CR: registry liveness probe + ARM64 configure fix..."
kubectl -n gitlab patch gitlab gitlab --type=merge -p '{
"spec":{"chart":{"values":{
"registry":{
"livenessProbe":{"initialDelaySeconds":300,"periodSeconds":60,"timeoutSeconds":30,"failureThreshold":10},
"readinessProbe":{"initialDelaySeconds":30,"periodSeconds":30,"timeoutSeconds":30,"failureThreshold":20}
}
}}}}'
echo "==> Waiting 60s for operator to reconcile..."
sleep 60
echo "==> Patching registry Deployment configure init container to ARM64 alpine..."
kubectl -n gitlab patch deployment gitlab-registry --type=json -p '[
{"op":"replace","path":"/spec/template/spec/initContainers/1/image","value":"alpine:latest"},
{"op":"replace","path":"/spec/template/spec/initContainers/1/command","value":["/bin/sh","/templates/configure"]}
]' 2>/dev/null || echo "Deployment not found yet — will retry"
echo "==> Registry pod status (30s wait):"
sleep 30
kubectl -n gitlab get pod -l app=registry --no-headers 2>&1