File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1717 imageName : " {{ .Values.postgres.image.repository }}:{{ .Values.postgres.image.tag }}"
1818 enablePDB : {{ .Values.postgres.enablePDB }}
1919 enableSuperuserAccess : {{ .Values.postgres.enableSuperuserAccess }}
20- monitoring :
21- enablePodMonitor : {{ .Values.postgres.enablePodMonitor }}
2220 {{- with .Values.postgres.resources }}
2321 resources :
2422 {{- toYaml . | nindent 4 }}
Original file line number Diff line number Diff line change 1+ {{- if .Values.podMonitor.enabled }}
2+ # yaml-language-server: $schema=https://raw.githubusercontent.com/datreeio/CRDs-catalog/refs/heads/main/monitoring.coreos.com/podmonitor_v1.json
3+ apiVersion : monitoring.coreos.com/v1
4+ kind : PodMonitor
5+ metadata :
6+ name : {{ include "cnpg-database.fullname" . }}
7+ spec :
8+ selector :
9+ matchLabels :
10+ cnpg.io/cluster : {{ include "cnpg-database.fullname" . }}
11+ podMetricsEndpoints :
12+ - port : metrics
13+ {{- end }}
Original file line number Diff line number Diff line change 1212 encryptedData :
1313 S3_ACCESS_KEY : {{.Values.backup.s3.accessKey }}
1414 S3_SECRET_KEY : {{.Values.backup.s3.secretKey }}
15+ template :
16+ metadata :
17+ annotations :
18+ cnpg.io/reload : " true"
1519{{- end }}
Original file line number Diff line number Diff line change 1313 password : {{ .password | quote }}
1414 template :
1515 metadata :
16- name : {{ printf "%s-creds-%s" (include "cnpg-database.fullname" $) .username | replace "." "-" | trunc 63 | quote }}
16+ annotations :
17+ cnpg.io/reload : " true"
1718 type : kubernetes.io/basic-auth
1819 data :
1920 username : {{ .username | quote }}
Original file line number Diff line number Diff line change @@ -9,7 +9,6 @@ postgres:
99
1010 enablePDB : true
1111 enableSuperuserAccess : true
12- enablePodMonitor : true
1312
1413 resources :
1514 requests :
@@ -19,7 +18,7 @@ postgres:
1918 memory : " 512Mi"
2019 cpu : " 50m"
2120
22- # Storage configuration, see https://cloudnative-pg.io/documentation /current/storage/
21+ # Storage configuration, see https://cloudnative-pg.io/docs /current/storage/
2322 storage :
2423 class : standard
2524 data :
@@ -29,7 +28,7 @@ postgres:
2928 resizeInUseVolume : true
3029 size : 10Gi
3130
32- # Bootstrap the PostgreSQL: https://cloudnative-pg.io/documentation /current/bootstrap/
31+ # Bootstrap the PostgreSQL: https://cloudnative-pg.io/docs /current/bootstrap/
3332 bootstrap :
3433 database : db
3534 owner : user
@@ -38,7 +37,7 @@ postgres:
3837 # Name of the S3 backup to recover from. Uses S3 settings from backup section.
3938 name : " "
4039
41- # Parameters passed to PostgreSQL: https://cloudnative-pg.io/documentation /current/postgresql_conf/
40+ # Parameters passed to PostgreSQL: https://cloudnative-pg.io/docs /current/postgresql_conf/
4241 parameters : {}
4342
4443 groups : []
@@ -89,6 +88,10 @@ backup:
8988 maxParallel : 8
9089 encryption : AES256
9190
91+ # See https://cloudnative-pg.io/docs/current/monitoring/#monitoring-with-the-prometheus-operator
92+ podMonitor :
93+ enabled : true
94+
9295# CNPG deploys services for the database by default. This is just here if you require an extra service.
9396additionalService :
9497 enabled : false
You can’t perform that action at this time.
0 commit comments