# ArgoCD installation - NOT managed by ArgoCD itself (bootstrap only).
# Install via: kubectl apply -k k8s/bootstrap-local/
# Or manually: kubectl create namespace argocd
#              kubectl apply -n argocd -f https://raw.githubusercontent.com/argoproj/argo-cd/stable/manifests/install.yaml
---
apiVersion: v1
kind: ConfigMap
metadata:
  name: argocd-cm
  namespace: argocd
  labels:
    app.kubernetes.io/name: argocd-cm
    app.kubernetes.io/part-of: argocd
data:
  # Point at Forgejo (will be available after 04-forgejo.yaml completes)
  repositories: |
    - url: https://forgejo.riotpiao.com/riotpiao.com/homelab.git
      name: homelab
      type: git
  
  # Reconciliation timeout (default 180s)
  timeout.reconciliation: "300"
  
  # Resource exclusions (prevent ArgoCD from managing certain resources)
  resource.exclusions: |
    - apiGroups:
      - cilium.io
      kinds:
      - CiliumIdentity
      clusters:
      - "*"
---
apiVersion: v1
kind: ConfigMap
metadata:
  name: argocd-rbac-cm
  namespace: argocd
data:
  # Admin policy (adjust as needed)
  policy.default: role:readonly
  policy.csv: |
    g, admin, role:admin
---
# NOTE: ArgoCD installation itself not included here - apply it separately:
# kubectl apply -n argocd -f https://raw.githubusercontent.com/argoproj/argo-cd/stable/manifests/install.yaml
# Or use Helm chart (recommended for production):
# helm install argocd argo/argo-cd -n argocd --version 7.x.x
