🐛 fix(p3): add wait for metrics-server

Signed-off-by: dyn <oss+dyn@xtrm.me>
This commit is contained in:
dyn
2025-12-17 14:05:12 +01:00
parent f910ecde81
commit 97a2ef7e46
2 changed files with 5 additions and 8 deletions

View File

@ -7,12 +7,13 @@ kubectl apply -f https://github.com/kubernetes-sigs/metrics-server/releases/late
kubectl patch deployment metrics-server -n kube-system --type='json' \
-p='[{"op": "add", "path": "/spec/template/spec/containers/0/args/-", "value": "--kubelet-insecure-tls"}]'
echo '> Waiting for metrics-server to be ready...'
kubectl wait --for=condition=available deployment/metrics-server -n kube-system --timeout=300s
kubectl create namespace argocd
kubectl apply -n argocd -f https://raw.githubusercontent.com/argoproj/argo-cd/stable/manifests/install.yaml
echo ">"
echo "> ArgoCD is starting (this takes around ~5 minutes)..."
echo ">"
sleep 10
echo '> Starting watch...'
sleep 5
@ -31,19 +32,15 @@ while true; do
break
fi
sleep 5
sleep 30
done
echo 'ArgoCD is running'
SCRIPT_PATH="$(realpath "${BASH_SOURCE[0]}")"
SCRIPT_DIR="$(dirname "$SCRIPT_PATH")"
kubectl create namespace dev
kubectl apply -n argocd -f "$SCRIPT_DIR/../confs/argocd-app.yml"
echo '>'
echo '> App is starting (this takes around ~30 seconds)...'
echo '>'
kubectl wait --namespace dev \
--for=condition=ready pod \

View File

@ -1,5 +1,4 @@
{
config,
pkgs,
modulesPath,
hostname,
@ -96,6 +95,7 @@
};
environment = {
etc.hosts.mode = "0700";
systemPackages = with pkgs; [
bindfs
git