diff --git a/kubernetes/apps/database/crunchy-postgres-operator/cluster/kustomization.yaml b/kubernetes/apps/database/crunchy-postgres-operator/cluster/kustomization.yaml index 94e4d001..1e2a8341 100644 --- a/kubernetes/apps/database/crunchy-postgres-operator/cluster/kustomization.yaml +++ b/kubernetes/apps/database/crunchy-postgres-operator/cluster/kustomization.yaml @@ -4,4 +4,5 @@ apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization resources: - ./externalsecret.yaml - - ./postgrescluster.yaml \ No newline at end of file + - ./postgrescluster.yaml + - ./pushsecret.yaml \ No newline at end of file diff --git a/kubernetes/apps/observability/grafana/app/pushsecret.yaml b/kubernetes/apps/database/crunchy-postgres-operator/cluster/pushsecret.yaml similarity index 95% rename from kubernetes/apps/observability/grafana/app/pushsecret.yaml rename to kubernetes/apps/database/crunchy-postgres-operator/cluster/pushsecret.yaml index 7e33dca1..c717afb3 100644 --- a/kubernetes/apps/observability/grafana/app/pushsecret.yaml +++ b/kubernetes/apps/database/crunchy-postgres-operator/cluster/pushsecret.yaml @@ -11,7 +11,7 @@ spec: kind: ClusterSecretStore selector: secret: - name: grafana-pguser-grafana + name: postgres-pguser-grafana data: - match: secretKey: dbname diff --git a/kubernetes/apps/observability/grafana/app/externalsecret.yaml b/kubernetes/apps/observability/grafana/app/externalsecret.yaml index a6afd1a4..772cc2c1 100644 --- a/kubernetes/apps/observability/grafana/app/externalsecret.yaml +++ b/kubernetes/apps/observability/grafana/app/externalsecret.yaml @@ -19,7 +19,7 @@ spec: GF_DATE_FORMATS_USE_BROWSER_LOCALE: "true" GF_SERVER_ROOT_URL: https://grafana.hsn.dev GF_DATABASE_NAME: "{{ .grafana_GF_DATABASE_NAME }}" - GF_DATABASE_HOST: "grafana-primary-real.observability.svc:5432" + GF_DATABASE_HOST: "{{ .grafana_GF_DATABASE_HOST }}" GF_DATABASE_USER: "{{ .grafana_GF_DATABASE_USER }}" GF_DATABASE_PASSWORD: "{{ .grafana_GF_DATABASE_PASSWORD }}" GF_DATABASE_SSL_MODE: "require" diff --git a/kubernetes/apps/observability/grafana/app/kustomization.yaml b/kubernetes/apps/observability/grafana/app/kustomization.yaml index fc7bc093..7c9498fd 100644 --- a/kubernetes/apps/observability/grafana/app/kustomization.yaml +++ b/kubernetes/apps/observability/grafana/app/kustomization.yaml @@ -4,6 +4,4 @@ apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization resources: - ./externalsecret.yaml - - ./helmrelease.yaml - - ./postgresCluster.yaml - - ./pushsecret.yaml \ No newline at end of file + - ./helmrelease.yaml \ No newline at end of file diff --git a/kubernetes/apps/observability/grafana/app/postgresCluster.yaml b/kubernetes/apps/observability/grafana/app/postgresCluster.yaml deleted file mode 100644 index eb2aedd3..00000000 --- a/kubernetes/apps/observability/grafana/app/postgresCluster.yaml +++ /dev/null @@ -1,86 +0,0 @@ ---- -# yaml-language-server: $schema=https://ks.hsn.dev/postgres-operator.crunchydata.com/postgrescluster_v1beta1.json -apiVersion: postgres-operator.crunchydata.com/v1beta1 -kind: PostgresCluster -metadata: - name: "${APP}" -spec: - postgresVersion: 16 - dataSource: - pgbackrest: - stanza: db - configuration: - - secret: - name: pgo-s3-creds - global: - repo1-path: "/${APP}/repo1" - repo1-s3-uri-style: path - repo: - name: repo1 - s3: - bucket: "crunchy-postgres" - endpoint: "s3.hsn.dev" - region: "us-east-1" - patroni: - dynamicConfiguration: - synchronous_mode: true - postgresql: - synchronous_commit: "on" - pg_hba: - - hostnossl all all 10.244.0.0/16 md5 - - hostssl all all all md5 - instances: - - name: postgres - metadata: - labels: - app.kubernetes.io/name: pgo-${APP} - replicas: 2 - dataVolumeClaimSpec: - storageClassName: openebs-hostpath - accessModes: - - ReadWriteOnce - resources: - requests: - storage: 5Gi - topologySpreadConstraints: - - maxSkew: 1 - topologyKey: "kubernetes.io/hostname" - whenUnsatisfiable: "DoNotSchedule" - labelSelector: - matchLabels: - postgres-operator.crunchydata.com/cluster: ${APP} - postgres-operator.crunchydata.com/data: postgres - users: - - name: "grafana" - databases: - - "${DB_NAME}" - options: "SUPERUSER" - password: - type: AlphaNumeric - backups: - pgbackrest: - configuration: - - secret: - name: pgo-s3-creds - global: - archive-push-queue-max: 4GiB - repo1-retention-full: "14" - repo1-retention-full-type: time - repo1-path: "/${APP}/repo1" - repo1-s3-uri-style: path - manual: - repoName: repo1 - options: - - --type=full - metadata: - labels: - app.kubernetes.io/name: pgo-${APP}-backup - repos: - - name: repo1 - schedules: - full: "0 1 * * 0" - differential: "0 1 * * 1-6" - s3: - bucket: "crunchy-postgres" - endpoint: "s3.hsn.dev" - region: "us-east-1"