summaryrefslogtreecommitdiff
path: root/f3s/argocd/Justfile
blob: fc040bd2f544c73e9fc94277270b17fe618e190e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
# ArgoCD deployment automation
# Deploys ArgoCD to the 'cicd' namespace following f3s cluster patterns

NAMESPACE := "cicd"
RELEASE_NAME := "argocd"

install:
    helm repo add argo https://argoproj.github.io/argo-helm || true
    helm repo update
    kubectl create namespace {{NAMESPACE}} || true
    kubectl apply -f persistent-volumes.yaml
    helm install {{RELEASE_NAME}} argo/argo-cd --namespace {{NAMESPACE}} -f values.yaml
    @echo "Waiting for ArgoCD to be ready..."
    @sleep 10
    kubectl apply -f ingress.yaml
    @echo ""
    @echo "ArgoCD deployed successfully!"
    @echo "Access UI at: https://argocd.f3s.buetow.org"
    @echo ""
    @echo "Default admin credentials:"
    @echo "  Username: admin"
    @echo "  Password: argocd-admin-default"
    @echo ""
    @echo "NOTE: Password is fixed in values.yaml (not randomly generated)"
    @echo "      You can change it via UI, but helm upgrade will reset it"

upgrade:
    helm upgrade {{RELEASE_NAME}} argo/argo-cd --namespace {{NAMESPACE}} -f values.yaml
    kubectl apply -f ingress.yaml

uninstall:
    kubectl delete -f ingress.yaml || true
    helm uninstall {{RELEASE_NAME}} --namespace {{NAMESPACE}} || true
    kubectl delete -f persistent-volumes.yaml || true
    @echo ""
    @echo "ArgoCD uninstalled. Secrets and pods removed."
    @echo "PV/PVC deleted (data will be lost on next install unless recreated)"

status:
    kubectl get pods -n {{NAMESPACE}} -l app.kubernetes.io/name=argocd-server
    kubectl get svc -n {{NAMESPACE}} -l app.kubernetes.io/name=argocd-server
    kubectl get ingress -n {{NAMESPACE}} argocd-server-ingress
    kubectl get pvc -n {{NAMESPACE}} argocd-repo-server-pvc

logs:
    kubectl logs -n {{NAMESPACE}} -l app.kubernetes.io/name=argocd-server --tail=100 -f

get-password:
    @kubectl -n {{NAMESPACE}} get secret argocd-initial-admin-secret -o jsonpath="{.data.password}" | base64 -d
    @echo ""