K8s Migration Phase 1: Infrastructure Setup #29
3 changed files with 85 additions and 0 deletions
Add CloudNativePG operator via ArgoCD (Phase 1 Step 6)
- Add CloudNativePG Application using multi-source Helm pattern - Helm chart from upstream cloudnative-pg repo - Values file from our git repo for customization - Manual sync policy consistent with other workload apps Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
commit
1bdfca0f22
29
argocd/apps/cloudnative-pg.yaml
Normal file
29
argocd/apps/cloudnative-pg.yaml
Normal file
|
|
@ -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
|
||||
52
argocd/manifests/cloudnative-pg/README.md
Normal file
52
argocd/manifests/cloudnative-pg/README.md
Normal file
|
|
@ -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
|
||||
4
argocd/manifests/cloudnative-pg/values.yaml
Normal file
4
argocd/manifests/cloudnative-pg/values.yaml
Normal file
|
|
@ -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
|
||||
Loading…
Add table
Add a link
Reference in a new issue