🔨 chore: fix gitlab + helm

Signed-off-by: dyn <oss+dyn@xtrm.me>
This commit is contained in:
dyn
2025-12-18 10:22:04 +01:00
parent 8715501fd8
commit af6278f414
4 changed files with 36 additions and 12 deletions

View File

@ -1,5 +1,10 @@
#!/usr/bin/env sh
if [ -z "$KUBECONFIG" ]; then
echo "KUBECONFIG is not set"
exit 1
fi
set -x
k3d cluster create inception-of-things
@ -45,7 +50,7 @@ kubectl apply -n argocd -f "$SCRIPT_DIR/../confs/argocd-app.yml"
echo '>'
echo '> App is starting (this takes around ~30 seconds)...'
echo '>'
sleep 2 # THIS SLEEP IS REQUIRED, IT BREAKS WITHOUT IT, TRUST -kiroussa
sleep 5 # THIS SLEEP IS REQUIRED, IT BREAKS WITHOUT IT, TRUST -kiroussa
kubectl wait --namespace dev \
--for=condition=ready pod \
--selector=app=app-p3 \
@ -64,16 +69,32 @@ helm upgrade --install gitlab gitlab/gitlab \
--timeout 1200s \
--set global.hosts.domain=gitlab-app.com \
--set global.hosts.externalIP=0.0.0.0 \
--set global.hosts.https=false
--set global.hosts.https=false \
--disable-openapi-validation
echo '>'
echo '> GitLab is starting (this takes around ~10 minutes)...'
echo '>'
sleep 10
echo '> Starting watch...'
sleep 5
kubectl wait --namespace gitlab \
--for=condition=available \
--timeout=1200s \
deployment/gitlab-webservice-default
# So we have a progress-ish indicator visual
while true; do
ready=$(kubectl get pods -n gitlab --no-headers 2>/dev/null | grep -E "([0-9]+)/\1" | wc -l)
total=$(kubectl get pods -n gitlab --no-headers 2>/dev/null | wc -l)
clear
kubectl get pods -n gitlab
if [ "$ready" -eq "$total" ] && [ "$total" -gt 0 ]; then
echo "All GitLab pods are ready!"
sleep 5
break
fi
sleep 30
done
# kubectl port-forward -n gitlab svc/gitlab-webservice-default 8081:8181 1>/dev/null 2>/dev/null &