This commit is contained in:
parent
5d8e1f5517
commit
73f51f4094
8 changed files with 75 additions and 2 deletions
1
cnpg/.gitattributes
vendored
Normal file
1
cnpg/.gitattributes
vendored
Normal file
|
@ -0,0 +1 @@
|
||||||
|
**/secrets/*.y*ml filter=age diff=age merge=age -text
|
|
@ -1,3 +1,5 @@
|
||||||
|
replicaCount: 2
|
||||||
|
|
||||||
monitoring:
|
monitoring:
|
||||||
podMonitorEnabled: true
|
podMonitorEnabled: true
|
||||||
grafanaDashboard:
|
grafanaDashboard:
|
3
cnpg/config/values.ext-pgo.yaml
Normal file
3
cnpg/config/values.ext-pgo.yaml
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
replicaCount: 2
|
||||||
|
|
||||||
|
existingSecret: ext-postgres-operator
|
|
@ -1,12 +1,23 @@
|
||||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||||
kind: Kustomization
|
kind: Kustomization
|
||||||
|
|
||||||
namespace: postgres-system
|
resources:
|
||||||
|
- resources/secrets/ext-pgo-creds.yaml
|
||||||
|
- resources/secrets/ext-pgo-admin.yaml
|
||||||
|
- resources/secrets/cnpg-backup-creds.yaml
|
||||||
|
- resources/cluster.yaml
|
||||||
|
|
||||||
helmCharts:
|
helmCharts:
|
||||||
- releaseName: cnpg
|
- releaseName: cnpg
|
||||||
name: cloudnative-pg
|
name: cloudnative-pg
|
||||||
repo: https://cloudnative-pg.github.io/charts
|
repo: https://cloudnative-pg.github.io/charts
|
||||||
version: 0.21.5
|
version: 0.21.5
|
||||||
valuesFile: config/values.yaml
|
valuesFile: config/values.cnpg.yaml
|
||||||
namespace: postgres-system
|
namespace: postgres-system
|
||||||
|
|
||||||
|
- releaseName: ext-pgo
|
||||||
|
name: ext-postgres-operator
|
||||||
|
repo: https://movetokube.github.io/postgres-operator/
|
||||||
|
version: 1.2.6
|
||||||
|
valuesFile: config/values.ext-pgo.yaml
|
||||||
|
namespace: postgres
|
||||||
|
|
48
cnpg/resources/cluster.yaml
Normal file
48
cnpg/resources/cluster.yaml
Normal file
|
@ -0,0 +1,48 @@
|
||||||
|
apiVersion: postgresql.cnpg.io/v1
|
||||||
|
kind: Cluster
|
||||||
|
metadata:
|
||||||
|
name: app-cluster
|
||||||
|
namespace: postgres
|
||||||
|
spec:
|
||||||
|
instances: 2
|
||||||
|
|
||||||
|
managed:
|
||||||
|
roles:
|
||||||
|
- name: ext_pgo_admin
|
||||||
|
ensure: present
|
||||||
|
superuser: true
|
||||||
|
createrole: true
|
||||||
|
createdb: true
|
||||||
|
|
||||||
|
storage:
|
||||||
|
size: 10Gi
|
||||||
|
storageClass: hcloud-volumes
|
||||||
|
|
||||||
|
backup:
|
||||||
|
barmanObjectStore:
|
||||||
|
destinationPath: cnpg
|
||||||
|
s3Credentials:
|
||||||
|
accessKeyId:
|
||||||
|
name: cnpg-backup-creds
|
||||||
|
key: ACCESS_KEY_ID
|
||||||
|
secretAccessKey:
|
||||||
|
name: cnpg-backup-creds
|
||||||
|
key: ACCESS_SECRET_KEY
|
||||||
|
retentionPolicy: "30d"
|
||||||
|
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
cpu: 100m
|
||||||
|
memory: 400Mi
|
||||||
|
limits:
|
||||||
|
cpu: 500m
|
||||||
|
memory: 800Mi
|
||||||
|
|
||||||
|
affinity:
|
||||||
|
enablePodAntiAffinity: true
|
||||||
|
topologyKey: kubernetes.io/hostname
|
||||||
|
podAntiAffinityType: preferred
|
||||||
|
|
||||||
|
enablePDB: true
|
||||||
|
monitoring:
|
||||||
|
enablePodMonitor: true
|
BIN
cnpg/resources/secrets/cnpg-backup-creds.yaml
Normal file
BIN
cnpg/resources/secrets/cnpg-backup-creds.yaml
Normal file
Binary file not shown.
8
cnpg/resources/secrets/ext-pgo-admin.yaml
Normal file
8
cnpg/resources/secrets/ext-pgo-admin.yaml
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
age-encryption.org/v1
|
||||||
|
-> X25519 SQkKLcgCsGBZ6FM800HldDftkLV/u53xliCGnGU6Gz0
|
||||||
|
TvQkvxIdoIydgUshJXYai2pJjo/GsEklyGfba/zj31Y
|
||||||
|
-> X25519 V60zpoLahYcT/dGVnixvv471qCE8xAOP+LoAdq04ryM
|
||||||
|
q7iTcIfP6xgpJaQZJuW0kpY9dEwbwsleyyorsFK4atA
|
||||||
|
--- W40yHxyT9ZMPvnQ0WYg7K1sG0qd4loHmyW6HYZL5zBM
|
||||||
|
#Wøü5+D`é‚H‹UŠdNSÆ<53>f.vC]uÎö•ù"¼ègÙÝüfp:¬<C2AC>ϬNB”æ<E2809D>vúõè¢ O%3cÖòQü9m(ÓEäùØKµ×4ÞÌùgÜžo&€vztëPÞˆþñ2 ºª––
<02>æð>&Z{Î'<27>§QôÉj<C389>Ä:ƒ¡¶ø܈‡ ƒæ"Céœk‹¤£ÚÄ)Þ‰V1åÎÏV]
|
||||||
|
¥å·õñÄ'°s¨w±~ÊoEƒûæ•F¾hÍS 7¤‘}'&[–ÞlÍÝÖUM×îÃ=ÿwŽ
|
BIN
cnpg/resources/secrets/ext-pgo-creds.yaml
Normal file
BIN
cnpg/resources/secrets/ext-pgo-creds.yaml
Normal file
Binary file not shown.
Loading…
Reference in a new issue