mirror of
https://github.com/dredx/prole.git
synced 2026-09-23 12:03:59 +00:00
26 lines
1.1 KiB
Bash
26 lines
1.1 KiB
Bash
#!/usr/bin/env bash
|
|
set -euo pipefail
|
|
export KUBECONFIG=/Users/chrisfu/dev/knoe/knoe-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
|