From 97a2ef7e4699b5e5fbef285304bc43dd5c8ac2fc Mon Sep 17 00:00:00 2001 From: dyn Date: Wed, 17 Dec 2025 14:05:12 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20fix(p3):=20add=20wait=20for=20me?= =?UTF-8?q?trics-server?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: dyn --- p3/scripts/argo-install.sh | 11 ++++------- vm/configuration.nix | 2 +- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/p3/scripts/argo-install.sh b/p3/scripts/argo-install.sh index 0747eb9..9f3ac29 100755 --- a/p3/scripts/argo-install.sh +++ b/p3/scripts/argo-install.sh @@ -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 \ diff --git a/vm/configuration.nix b/vm/configuration.nix index 173e921..3adeb79 100644 --- a/vm/configuration.nix +++ b/vm/configuration.nix @@ -1,5 +1,4 @@ { - config, pkgs, modulesPath, hostname, @@ -96,6 +95,7 @@ }; environment = { + etc.hosts.mode = "0700"; systemPackages = with pkgs; [ bindfs git