# CloudNativePG operator - deployed as Helm chart via kubectl/ArgoCD.
# This file is a placeholder - actual install via Helm:
#   helm repo add cnpg https://cloudnative-pg.github.io/charts
#   helm install cnpg cnpg/cloudnative-pg -n ddb --create-namespace --version ~0.20
#
# Or create an ArgoCD Application (recommended):
---
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
  name: cnpg-operator
  namespace: argocd
  annotations:
    argocd.argoproj.io/sync-wave: "-1"  # Bootstrap wave (before everything)
spec:
  project: homelab
  source:
    repoURL: https://cloudnative-pg.github.io/charts
    chart: cloudnative-pg
    targetRevision: "~0.20"
  destination:
    server: https://kubernetes.default.svc
    namespace: ddb
  syncPolicy:
    automated:
      prune: true
      selfHeal: true
    syncOptions:
      - CreateNamespace=true
      - ServerSideApply=true
