diff --git a/apps/backup/postgresql/grafana/kustomization.yaml b/apps/backup/postgresql/grafana/kustomization.yaml index 8f40c9e..479c087 100644 --- a/apps/backup/postgresql/grafana/kustomization.yaml +++ b/apps/backup/postgresql/grafana/kustomization.yaml @@ -20,7 +20,7 @@ patches: env: - {name: BACKUP_TARGET, value: grafana} - {name: BACKUP_MODE, value: database} - - {name: PGHOST, value: postgresql} + - {name: PGHOST, value: grafana-postgresql-rw} - name: PGUSER valueFrom: {secretKeyRef: {name: grafana-postgresql, key: USERDB_USER}} - name: PGDATABASE diff --git a/apps/grafana-postgresql/values.yaml b/apps/grafana-postgresql/values.yaml deleted file mode 100644 index 12d351d..0000000 --- a/apps/grafana-postgresql/values.yaml +++ /dev/null @@ -1,27 +0,0 @@ -settings: - existingSecret: grafana-postgresql - superuser: - secretKey: POSTGRES_USER - superuserPassword: - secretKey: POSTGRES_PASSWORD - -userDatabase: - existingSecret: grafana-postgresql - name: - secretKey: USERDB_NAME - user: - secretKey: USERDB_USER - password: - secretKey: USERDB_PASSWORD - -storage: - requestedSize: 5Gi - className: rook-ceph-block - persistentVolumeClaimRetentionPolicy: - whenDeleted: Retain - whenScaled: Retain - -resources: - requests: - cpu: 100m - memory: 512Mi diff --git a/apps/grafana/values.yaml b/apps/grafana/values.yaml index 3b71355..76ec919 100644 --- a/apps/grafana/values.yaml +++ b/apps/grafana/values.yaml @@ -58,7 +58,7 @@ grafana.ini: startTLS_policy: MandatoryStartTLS database: type: postgres - host: postgresql.grafana.svc.cluster.local + host: grafana-postgresql-rw.grafana.svc.cluster.local name: grafana user: grafana auth: diff --git a/bootstrap/grafana-postgresql.yaml b/bootstrap/grafana-postgresql.yaml index 3c742e6..980cba1 100644 --- a/bootstrap/grafana-postgresql.yaml +++ b/bootstrap/grafana-postgresql.yaml @@ -5,18 +5,8 @@ metadata: namespace: argocd spec: project: grafana - sources: - - repoURL: https://groundhog2k.github.io/helm-charts/ - chart: postgres - targetRevision: 1.5.14 - helm: - releaseName: postgresql - valueFiles: - - $values/apps/grafana-postgresql/values.yaml - - repoURL: https://code.brunner.ninja/feedc0de/homelab-gitops.git - targetRevision: main - ref: values - - repoURL: https://code.brunner.ninja/feedc0de/homelab-gitops.git + source: + repoURL: https://code.brunner.ninja/feedc0de/homelab-gitops.git targetRevision: main path: apps/grafana-postgresql/cluster destination: @@ -25,7 +15,7 @@ spec: syncPolicy: automated: enabled: true - prune: false + prune: true selfHeal: true syncOptions: - CreateNamespace=true diff --git a/bootstrap/grafana-project.yaml b/bootstrap/grafana-project.yaml index 659cfc3..b0b2f05 100644 --- a/bootstrap/grafana-project.yaml +++ b/bootstrap/grafana-project.yaml @@ -7,7 +7,6 @@ spec: description: Grafana and its cluster-specific dashboards sourceRepos: - https://grafana-community.github.io/helm-charts - - https://groundhog2k.github.io/helm-charts/ - https://code.brunner.ninja/feedc0de/homelab-gitops.git destinations: - namespace: default @@ -30,8 +29,6 @@ spec: kind: PersistentVolumeClaim - group: apps kind: Deployment - - group: apps - kind: StatefulSet - group: postgresql.cnpg.io kind: Cluster - group: networking.k8s.io