🔨 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 &

View File

@ -111,9 +111,12 @@
vagrant
k3d
kubectl
kubernetes-helm
];
shellInit = ''
export KUBECONFIG=$HOME/.kube/config
'';
};
system.stateVersion = "24.11";

8
vm/flake.lock generated
View File

@ -38,16 +38,16 @@
},
"nixpkgs": {
"locked": {
"lastModified": 1765779637,
"narHash": "sha256-KJ2wa/BLSrTqDjbfyNx70ov/HdgNBCBBSQP3BIzKnv4=",
"lastModified": 1765934234,
"narHash": "sha256-pJjWUzNnjbIAMIc5gRFUuKCDQ9S1cuh3b2hKgA7Mc4A=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "1306659b587dc277866c7b69eb97e5f07864d8c4",
"rev": "af84f9d270d404c17699522fab95bbf928a2d92f",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixos-unstable",
"ref": "nixpkgs-unstable",
"repo": "nixpkgs",
"type": "github"
}

View File

@ -2,7 +2,7 @@
description = "A NixOS configuration for the Inception of Things";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable";
nixpkgs.url = "github:nixos/nixpkgs?ref=nixpkgs-unstable";
systems.url = "github:nix-systems/x86_64-linux";
nixos-generators = {
url = "github:nix-community/nixos-generators";