From f76b7ef2bd763c0652c5e74e798663442331cba9 Mon Sep 17 00:00:00 2001 From: Namonay Date: Mon, 15 Dec 2025 16:17:30 +0100 Subject: [PATCH] add: argocd installer & port forwarding --- p3/argo-install.sh | 4 ---- p3/confs/ingress.yml | 24 ++++++++++++++++++++++++ p3/scripts/argo-install.sh | 14 ++++++++++++++ p3/scripts/uninstall.sh | 3 +++ 4 files changed, 41 insertions(+), 4 deletions(-) delete mode 100644 p3/argo-install.sh create mode 100644 p3/confs/ingress.yml create mode 100755 p3/scripts/argo-install.sh create mode 100755 p3/scripts/uninstall.sh diff --git a/p3/argo-install.sh b/p3/argo-install.sh deleted file mode 100644 index 0299093..0000000 --- a/p3/argo-install.sh +++ /dev/null @@ -1,4 +0,0 @@ -#!/usr/bin/env sh - -kubectl create namespace argocd -kubectl apply -n argocd -f https://raw.githubusercontent.com/argoproj/argo-cd/stable/manifests/install.yaml diff --git a/p3/confs/ingress.yml b/p3/confs/ingress.yml new file mode 100644 index 0000000..355c895 --- /dev/null +++ b/p3/confs/ingress.yml @@ -0,0 +1,24 @@ +apiVersion: networking.k8s.io/v1 +kind: Ingress +metadata: + name: argocd-ingress + namespace: argocd + annotations: + nginx.ingress.kubernetes.io/backend-protocol: "HTTPS" + nginx.ingress.kubernetes.io/ssl-passthrough: "true" + nginx.ingress.kubernetes.io/force-ssl-redirect: "true" + nginx.ingress.kubernetes.io/ssl-verify: "off" + nginx.ingress.kubernetes.io/ssl-verify-depth: "1" +spec: + ingressClassName: nginx + rules: + - host: argocd.localhost + http: + paths: + - path: / + pathType: Prefix + backend: + service: + name: argocd-server + port: + name: https diff --git a/p3/scripts/argo-install.sh b/p3/scripts/argo-install.sh new file mode 100755 index 0000000..51d54d8 --- /dev/null +++ b/p3/scripts/argo-install.sh @@ -0,0 +1,14 @@ +#!/usr/bin/env sh + +k3d cluster create inception-of-things +kubectl create namespace argocd +kubectl apply -n argocd -f https://raw.githubusercontent.com/argoproj/argo-cd/stable/manifests/install.yaml +echo ArgoCD is starting... +kubectl wait --namespace argocd \ + --for=condition=ready pod \ + --selector=app.kubernetes.io/name=argocd-server \ + --timeout=300s \ + 1>/dev/null 2>/dev/null +kubectl port-forward svc/argocd-server -n argocd 8080:443 1>/dev/null & +echo 'ArgoCD is running (http://127.0.0.1:8080)' +echo login=admin password=\'$(kubectl -n argocd get secret argocd-initial-admin-secret -o jsonpath="{.data.password}" | base64 -d)\' diff --git a/p3/scripts/uninstall.sh b/p3/scripts/uninstall.sh new file mode 100755 index 0000000..1daeb53 --- /dev/null +++ b/p3/scripts/uninstall.sh @@ -0,0 +1,3 @@ +kubectl delete -n argocd -f https://raw.githubusercontent.com/argoproj/argo-cd/stable/manifests/install.yaml +kubectl delete namespace argocd +k3d cluster delete inception-of-things \ No newline at end of file