# Wave 8 — end-user workloads: Temporal, Portainer, and the two network
# helpers (cloudflared tunnel, duckdns updater) that are already running.
# Experimental dirs (llm, forge, dev-tools, shadowsocks) are intentionally
# NOT included yet — add them here once they're production-ready.
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
  name: temporal
  namespace: argocd
  annotations:
    argocd.argoproj.io/sync-wave: "8"
spec:
  project: homelab
  sources:
    - repoURL: https://go.temporal.io/helm-charts
      chart: temporal
      targetRevision: "0.74.0"
      helm:
        valueFiles:
          - $values/k8s/applications/temporal/temporal-values.yaml
    - repoURL: http://forgejo.riotpiao.com:3000/riotpiao.com/homelab.git
      targetRevision: main
      ref: values
  destination:
    server: https://kubernetes.default.svc
    namespace: temporal
  syncPolicy:
    automated:
      prune: true
      selfHeal: true
    syncOptions:
      - CreateNamespace=true
---
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
  name: portainer
  namespace: argocd
  annotations:
    argocd.argoproj.io/sync-wave: "8"
spec:
  project: homelab
  sources:
    - repoURL: https://portainer.github.io/k8s/
      chart: portainer
      targetRevision: "*"
      helm:
        valueFiles:
          - $values/k8s/applications/portainer/portainer-values.yaml
    - repoURL: http://forgejo.riotpiao.com:3000/riotpiao.com/homelab.git
      targetRevision: main
      ref: values
  destination:
    server: https://kubernetes.default.svc
    namespace: dashboard
  syncPolicy:
    automated:
      prune: true
      selfHeal: true
    syncOptions:
      - CreateNamespace=true
---
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
  name: cloudflared
  namespace: argocd
  annotations:
    argocd.argoproj.io/sync-wave: "8"
spec:
  project: homelab
  source:
    repoURL: http://forgejo.riotpiao.com:3000/riotpiao.com/homelab.git
    targetRevision: main
    path: k8s/applications/cloudflared
  destination:
    server: https://kubernetes.default.svc
    namespace: cloudflared
  syncPolicy:
    automated:
      prune: true
      selfHeal: true
    syncOptions:
      - CreateNamespace=true
---
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
  name: duckdns
  namespace: argocd
  annotations:
    argocd.argoproj.io/sync-wave: "8"
spec:
  project: homelab
  source:
    repoURL: http://forgejo.riotpiao.com:3000/riotpiao.com/homelab.git
    targetRevision: main
    path: k8s/applications/duckdns
  destination:
    server: https://kubernetes.default.svc
    namespace: duckdns
  syncPolicy:
    automated:
      prune: true
      selfHeal: true
    syncOptions:
      - CreateNamespace=true
