From 4c3ef67430070fa2b4304794483ad8e173a20147 Mon Sep 17 00:00:00 2001 From: Namonay Date: Thu, 18 Dec 2025 15:16:46 +0100 Subject: [PATCH] feat(bonus) : added new yml and "fixed" .sh --- bonus/confs/argocd-app.yml | 2 +- bonus/scripts/argo-install.sh | 13 +++++++++---- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/bonus/confs/argocd-app.yml b/bonus/confs/argocd-app.yml index 9716a20..bab33cb 100644 --- a/bonus/confs/argocd-app.yml +++ b/bonus/confs/argocd-app.yml @@ -6,7 +6,7 @@ metadata: spec: project: default source: - repoURL: https://github.com/Namonay/vvaas42.git + repoURL: http://gitlab-webservice-default.gitlab.svc.cluster.local:8080/root/vvaas42.git targetRevision: HEAD path: '.' destination: diff --git a/bonus/scripts/argo-install.sh b/bonus/scripts/argo-install.sh index 2fdf673..7ed3faa 100755 --- a/bonus/scripts/argo-install.sh +++ b/bonus/scripts/argo-install.sh @@ -8,7 +8,7 @@ if [ -z "$KUBECONFIG" ]; then exit 1 fi -set -x +# set -x ### === Initial K3D Setup === k3d cluster create inception-of-things @@ -25,7 +25,11 @@ kubectl create namespace argocd kubectl apply -n argocd -f https://raw.githubusercontent.com/argoproj/argo-cd/stable/manifests/install.yaml echo "> ArgoCD is starting (this takes around ~6 minutes)..." -sleep 10 +kubectl wait --namespace argocd \ + --for=condition=ready pod \ + --selector=app.kubernetes.io/name=argocd-server \ + --timeout=300s \ + 1>/dev/null 2>/dev/null echo '> Starting watch...' sleep 5 @@ -47,6 +51,7 @@ done echo "ArgoCD is ready!" echo '> To setup port-forwarding, run:' echo '> kubectl port-forward -n argocd svc/argocd-server 8080:443' +kubectl port-forward -n argocd svc/argocd-server 8080:443 1>/dev/null 2>/dev/null & #TODO: The app will be imported via Gitlab, don't import it here # so we don't have 2 of the same deployment. @@ -100,7 +105,7 @@ echo echo '> To setup port-forwarding, run:' echo '> kubectl port-forward -n gitlab svc/gitlab-webservice-default 8081:8181' - +kubectl port-forward -n gitlab svc/gitlab-webservice-default 8081:8181 1>/dev/null 2>/dev/null & ### === Setup /etc/hosts === function add_host() { local ip=$1 @@ -130,7 +135,7 @@ echo echo "===============================" echo echo "=== Login into Gitlab with: ===" -echo Username: admin +echo Username: root echo -n "Password: " kubectl -n gitlab get secret gitlab-gitlab-initial-root-password -o jsonpath='{.data.password}' | base64 -d echo