37 lines
1014 B
Bash
Executable File
37 lines
1014 B
Bash
Executable File
#!/bin/bash
|
|
set -e
|
|
|
|
# Bootstrap ArgoCD on the k3s cluster
|
|
# This is a one-time manual step before GitOps takes over
|
|
|
|
KUBECONFIG="/home/mrt0rtikize/infra/k3s/config"
|
|
KCTL="kubectl --kubeconfig ${KUBECONFIG}"
|
|
|
|
echo "=== Installing ArgoCD ==="
|
|
|
|
# Add ArgoCD Helm repo
|
|
helm repo add argo https://argoproj.github.io/argo-helm 2>/dev/null || true
|
|
helm repo update
|
|
|
|
# Install ArgoCD
|
|
helm upgrade --install argocd argo/argo-cd \
|
|
--namespace argocd \
|
|
--create-namespace \
|
|
--set server.extraArgs[0]="--insecure" \
|
|
--set configs.params."server\.insecure"=true \
|
|
--set configs.cm.timeout.reconciliation=180s \
|
|
--wait \
|
|
--timeout 300s
|
|
|
|
echo ""
|
|
echo "=== ArgoCD installed ==="
|
|
echo ""
|
|
echo "To access ArgoCD UI:"
|
|
echo " kubectl --kubeconfig ${KUBECONFIG} port-forward svc/argocd-server -n argocd 8080:80"
|
|
echo ""
|
|
echo "Admin password:"
|
|
kubectl --kubeconfig ${KUBECONFIG} -n argocd get secret argocd-initial-admin-secret -o jsonpath="{.data.password}" | base64 -d
|
|
echo ""
|
|
echo ""
|
|
echo "Login with username: admin"
|