diff --git a/argocd/apps/cloudnative-pg.yaml b/argocd/apps/cloudnative-pg.yaml new file mode 100644 index 0000000..641d0e1 --- /dev/null +++ b/argocd/apps/cloudnative-pg.yaml @@ -0,0 +1,29 @@ +# CloudNativePG Operator - PostgreSQL for Kubernetes +# Deploys the operator only; PostgreSQL clusters are created separately +apiVersion: argoproj.io/v1alpha1 +kind: Application +metadata: + name: cloudnative-pg + namespace: argocd +spec: + project: default + sources: + # Helm chart from upstream + - repoURL: https://cloudnative-pg.github.io/charts + chart: cloudnative-pg + targetRevision: "0.23.0" + helm: + releaseName: cloudnative-pg + valueFiles: + - $values/argocd/manifests/cloudnative-pg/values.yaml + # Values from our git repo + - repoURL: ssh://forgejo@indri.tail8d86e.ts.net:2200/eblume/blumeops.git + targetRevision: feature/k8s-phase1-kickoff + ref: values + destination: + server: https://kubernetes.default.svc + namespace: cnpg-system + syncPolicy: + syncOptions: + - CreateNamespace=true + # Manual sync only - no automated sync on git push diff --git a/argocd/manifests/cloudnative-pg/README.md b/argocd/manifests/cloudnative-pg/README.md new file mode 100644 index 0000000..c6c1fb1 --- /dev/null +++ b/argocd/manifests/cloudnative-pg/README.md @@ -0,0 +1,52 @@ +# CloudNativePG Operator + +Kubernetes operator for managing PostgreSQL clusters with high availability. + +## Source + +- Helm chart: `cloudnative-pg` from https://cloudnative-pg.github.io/charts +- Documentation: https://cloudnative-pg.io/documentation/ + +## Deployment + +Managed via ArgoCD Application using Helm source (not kustomize). +The Application points directly to the upstream Helm repository. + +## ArgoCD CLI Commands + +```bash +# Check application status +argocd app get cloudnative-pg + +# Trigger a sync +argocd app sync cloudnative-pg + +# View deployment history +argocd app history cloudnative-pg +``` + +## Verification + +```bash +# Check operator pod is running +kubectl get pods -n cnpg-system + +# Check operator logs +kubectl logs -n cnpg-system -l app.kubernetes.io/name=cloudnative-pg + +# Check CRDs are installed +kubectl get crd | grep cnpg +``` + +## Files + +| File | Description | +|------|-------------| +| `values.yaml` | Helm values for customization | +| `README.md` | This file | + +## Notes + +- The operator is deployed to `cnpg-system` namespace +- PostgreSQL clusters are created separately using the `Cluster` CRD (see Step 7) +- No secrets required for the operator itself diff --git a/argocd/manifests/cloudnative-pg/values.yaml b/argocd/manifests/cloudnative-pg/values.yaml new file mode 100644 index 0000000..607895e --- /dev/null +++ b/argocd/manifests/cloudnative-pg/values.yaml @@ -0,0 +1,4 @@ +# CloudNativePG Helm values +# See: https://github.com/cloudnative-pg/charts/tree/main/charts/cloudnative-pg + +# Using defaults for now - customize as needed