From 700fc7307c91c23cd40fa49b4fc8158be17b7d52 Mon Sep 17 00:00:00 2001 From: SeanOMik Date: Wed, 16 Oct 2024 19:52:14 -0400 Subject: [PATCH] fix(cloudnative-pg): add namespaces to cluster resources --- .../main/apps/database/postgresql/cluster/prometheusrule.yaml | 4 +--- .../apps/database/postgresql/cluster/scheduledbackup.yaml | 1 + kubernetes/main/apps/database/postgresql/ks.yaml | 1 + 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/kubernetes/main/apps/database/postgresql/cluster/prometheusrule.yaml b/kubernetes/main/apps/database/postgresql/cluster/prometheusrule.yaml index 1c8d93c..d250b6e 100644 --- a/kubernetes/main/apps/database/postgresql/cluster/prometheusrule.yaml +++ b/kubernetes/main/apps/database/postgresql/cluster/prometheusrule.yaml @@ -4,9 +4,7 @@ apiVersion: monitoring.coreos.com/v1 kind: PrometheusRule metadata: name: cloudnative-pg-rules - labels: - prometheus: k8s - role: alert-rules + namespace: database spec: groups: - name: cloudnative-pg.rules diff --git a/kubernetes/main/apps/database/postgresql/cluster/scheduledbackup.yaml b/kubernetes/main/apps/database/postgresql/cluster/scheduledbackup.yaml index 67525d0..78a55a4 100644 --- a/kubernetes/main/apps/database/postgresql/cluster/scheduledbackup.yaml +++ b/kubernetes/main/apps/database/postgresql/cluster/scheduledbackup.yaml @@ -4,6 +4,7 @@ apiVersion: postgresql.cnpg.io/v1 kind: ScheduledBackup metadata: name: postgres + namespace: database spec: schedule: "@daily" immediate: true diff --git a/kubernetes/main/apps/database/postgresql/ks.yaml b/kubernetes/main/apps/database/postgresql/ks.yaml index d2c49db..a5f2e14 100644 --- a/kubernetes/main/apps/database/postgresql/ks.yaml +++ b/kubernetes/main/apps/database/postgresql/ks.yaml @@ -37,6 +37,7 @@ spec: interval: 10m path: ./kubernetes/main/apps/database/postgresql/cluster prune: true + targetNamespace: database sourceRef: kind: GitRepository name: home-cluster