mirror of
https://codeberg.org/27/inception-of-things.git
synced 2025-12-31 21:56:41 +01:00
🐛 fix(p3): add wait for metrics-server
Signed-off-by: dyn <oss+dyn@xtrm.me>
This commit is contained in:
@ -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' \
|
kubectl patch deployment metrics-server -n kube-system --type='json' \
|
||||||
-p='[{"op": "add", "path": "/spec/template/spec/containers/0/args/-", "value": "--kubelet-insecure-tls"}]'
|
-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 create namespace argocd
|
||||||
kubectl apply -n argocd -f https://raw.githubusercontent.com/argoproj/argo-cd/stable/manifests/install.yaml
|
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 "> ArgoCD is starting (this takes around ~5 minutes)..."
|
||||||
echo ">"
|
|
||||||
sleep 10
|
sleep 10
|
||||||
echo '> Starting watch...'
|
echo '> Starting watch...'
|
||||||
sleep 5
|
sleep 5
|
||||||
@ -31,19 +32,15 @@ while true; do
|
|||||||
break
|
break
|
||||||
fi
|
fi
|
||||||
|
|
||||||
sleep 5
|
sleep 30
|
||||||
done
|
done
|
||||||
|
|
||||||
echo 'ArgoCD is running'
|
|
||||||
|
|
||||||
SCRIPT_PATH="$(realpath "${BASH_SOURCE[0]}")"
|
SCRIPT_PATH="$(realpath "${BASH_SOURCE[0]}")"
|
||||||
SCRIPT_DIR="$(dirname "$SCRIPT_PATH")"
|
SCRIPT_DIR="$(dirname "$SCRIPT_PATH")"
|
||||||
|
|
||||||
kubectl create namespace dev
|
kubectl create namespace dev
|
||||||
kubectl apply -n argocd -f "$SCRIPT_DIR/../confs/argocd-app.yml"
|
kubectl apply -n argocd -f "$SCRIPT_DIR/../confs/argocd-app.yml"
|
||||||
echo '>'
|
|
||||||
echo '> App is starting (this takes around ~30 seconds)...'
|
echo '> App is starting (this takes around ~30 seconds)...'
|
||||||
echo '>'
|
|
||||||
|
|
||||||
kubectl wait --namespace dev \
|
kubectl wait --namespace dev \
|
||||||
--for=condition=ready pod \
|
--for=condition=ready pod \
|
||||||
|
|||||||
@ -1,5 +1,4 @@
|
|||||||
{
|
{
|
||||||
config,
|
|
||||||
pkgs,
|
pkgs,
|
||||||
modulesPath,
|
modulesPath,
|
||||||
hostname,
|
hostname,
|
||||||
@ -96,6 +95,7 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
environment = {
|
environment = {
|
||||||
|
etc.hosts.mode = "0700";
|
||||||
systemPackages = with pkgs; [
|
systemPackages = with pkgs; [
|
||||||
bindfs
|
bindfs
|
||||||
git
|
git
|
||||||
|
|||||||
Reference in New Issue
Block a user