commit 490c95a7a5696c67aea2cadb9dd2803987a800c2
parent 4887dff2bc2f41d1defd5e98c80fdf8aa2780772
Author: MTRNord <mtrnord1@gmail.com>
Date: Fri, 15 Nov 2024 15:27:09 +0100
Deploy cnpg operator
Diffstat:
4 files changed, 43 insertions(+), 0 deletions(-)
diff --git a/infrastructure/controllers/cloudnative-pg-operator/kustomization.yaml b/infrastructure/controllers/cloudnative-pg-operator/kustomization.yaml
@@ -0,0 +1,5 @@
+apiVersion: kustomize.config.k8s.io/v1beta1
+kind: Kustomization
+namespace: postgres-cluster
+resources:
+ - repository.yaml
diff --git a/infrastructure/controllers/cloudnative-pg-operator/operator.yaml b/infrastructure/controllers/cloudnative-pg-operator/operator.yaml
@@ -0,0 +1,24 @@
+apiVersion: helm.toolkit.fluxcd.io/v2beta2
+kind: HelmRelease
+metadata:
+ name: cloudnative-pg-operator
+ namespace: postgres-cluster
+spec:
+ releaseName: cloudnative-pg-operator
+ chart:
+ spec:
+ chart: cloudnative-pg
+ sourceRef:
+ kind: HelmRepository
+ name: cnpg
+ interval: 60m
+ timeout: 5m
+ install:
+ timeout: 5m
+ remediation:
+ retries: 3
+ values:
+ monitoring:
+ podMonitorEnabled: true
+ grafanaDashboard:
+ create: true
diff --git a/infrastructure/controllers/cloudnative-pg-operator/respository.yaml b/infrastructure/controllers/cloudnative-pg-operator/respository.yaml
@@ -0,0 +1,13 @@
+apiVersion: v1
+kind: Namespace
+metadata:
+ name: postgres-cluster
+---
+apiVersion: source.toolkit.fluxcd.io/v1beta2
+kind: HelmRepository
+metadata:
+ name: cnpg
+ namespace: postgres-cluster
+spec:
+ interval: 60m
+ url: https://cloudnative-pg.github.io/charts
diff --git a/infrastructure/controllers/kustomization.yaml b/infrastructure/controllers/kustomization.yaml
@@ -7,3 +7,4 @@ resources:
- capacitor.yaml
- rook.yaml
- csi-driver-smb.yaml
+ - ./cloudnative-pg-operator