43 lines
1.1 KiB
YAML
43 lines
1.1 KiB
YAML
apiVersion: argoproj.io/v1alpha1
|
|
kind: Application
|
|
metadata:
|
|
name: postgresql # Ensure name is "postgres" to match Helm release
|
|
namespace: argocd
|
|
spec:
|
|
project: default
|
|
source:
|
|
repoURL: "https://charts.bitnami.com/bitnami"
|
|
chart: "postgresql"
|
|
targetRevision: "16.0.0"
|
|
helm:
|
|
releaseName: "postgresql"
|
|
valueObject:
|
|
global:
|
|
storageClass: longhorn
|
|
primary:
|
|
persistence:
|
|
enabled: true
|
|
storageClass: longhorn
|
|
size: 20Gi
|
|
readReplicas:
|
|
persistence:
|
|
enabled: true
|
|
storageClass: longhorn
|
|
size: 20Gi
|
|
auth:
|
|
existingSecret: "postgresql"
|
|
username: "postgres"
|
|
secretKeys:
|
|
adminPasswordKey: "postgres-password"
|
|
destination:
|
|
server: "https://kubernetes.default.svc"
|
|
namespace: postgres
|
|
syncPolicy:
|
|
automated:
|
|
prune: true
|
|
selfHeal: true
|
|
syncOptions:
|
|
- CreateNamespace=true
|
|
- ApplyOutOfSyncOnly=true # Prevents ArgoCD from pruning itself
|
|
- ServerSideApply=true # Ensures Helm is managed correctly
|