Skip to content

Commit 4feb56d

Browse files
KorenP1Bitnami Containers
and
Bitnami Containers
authoredJul 2, 2024
postgres exporter monitor all databases (#27586)
* postgres exporter monitor all databases Currently there is no option to monitor all databases with postgres exporter without mentioning the databases names and creating them in the init scripts. (.Values.auth.database). Postgres Exporter does let this feature work if you dont mention any databases in the URI and that is why i think the required statement is not correct so i removed it. Signed-off-by: Koren Peretz <62677694+KorenP1@users.noreply.github.com> * Update Chart.yaml Adding Chart.yaml version bump to pass tests Signed-off-by: Koren Peretz <62677694+KorenP1@users.noreply.github.com> * Update CHANGELOG.md Signed-off-by: Bitnami Containers <bitnami-bot@vmware.com> * Update CHANGELOG.md Signed-off-by: Bitnami Containers <bitnami-bot@vmware.com> * Update statefulset.yaml Looks like there is no usage of the DB NAME part in the DATA_SOURCE_URI environment variable which means there is no need for the $database part, the postgres exporter always monitoring all the dbs, also if created after the initialization and not mentioned in the DATA_SOURCE_URI env var. In conclusion the PR is for two reasons. 1: making DATA_SOURCE_URI env var more "right" and related to what it actually does 2: More importantly, removing the required statement in the $database helm variable assignment in order for users to be able to deploy the postgres exporter although not assigning .Values.auth.database variable for the db creation in the initialization of the postgres Signed-off-by: Koren Peretz <62677694+KorenP1@users.noreply.github.com> * Update statefulset.yaml Signed-off-by: Koren Peretz <62677694+KorenP1@users.noreply.github.com> * Update CHANGELOG.md Signed-off-by: Bitnami Containers <bitnami-bot@vmware.com> --------- Signed-off-by: Koren Peretz <62677694+KorenP1@users.noreply.github.com> Signed-off-by: Bitnami Containers <bitnami-bot@vmware.com> Co-authored-by: Bitnami Containers <bitnami-bot@vmware.com>
1 parent fcf03f8 commit 4feb56d

File tree

4 files changed

+10
-7
lines changed

4 files changed

+10
-7
lines changed
 

‎bitnami/postgresql/CHANGELOG.md

+7-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,13 @@
11
# Changelog
22

3-
## 15.5.11 (2024-06-26)
3+
## 15.5.12 (2024-07-02)
44

5-
* [bitnami/postgresql] Release 15.5.11 ([#27548](https://github.com/bitnami/charts/pull/27548))
5+
* postgres exporter monitor all databases ([#27586](https://github.com/bitnami/charts/pull/27586))
6+
7+
## <small>15.5.11 (2024-06-26)</small>
8+
9+
* [bitnami/*] Update README changing TAC wording (#27530) ([52dfed6](https://github.com/bitnami/charts/commit/52dfed6bac44d791efabfaf06f15daddc4fefb0c)), closes [#27530](https://github.com/bitnami/charts/issues/27530)
10+
* [bitnami/postgresql] Release 15.5.11 (#27548) ([0fe73e3](https://github.com/bitnami/charts/commit/0fe73e31c5dad97c86b9db11af28388d0324aea8)), closes [#27548](https://github.com/bitnami/charts/issues/27548)
611

712
## <small>15.5.10 (2024-06-25)</small>
813

‎bitnami/postgresql/Chart.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,4 +35,4 @@ maintainers:
3535
name: postgresql
3636
sources:
3737
- https://github.com/bitnami/charts/tree/main/bitnami/postgresql
38-
version: 15.5.11
38+
version: 15.5.12

‎bitnami/postgresql/templates/primary/statefulset.yaml

+1-2
Original file line numberDiff line numberDiff line change
@@ -532,9 +532,8 @@ spec:
532532
{{- end }}
533533
{{- end }}
534534
env:
535-
{{- $database := required "In order to enable metrics you need to specify a database (.Values.auth.database or .Values.global.postgresql.auth.database)" (include "postgresql.v1.database" .) }}
536535
- name: DATA_SOURCE_URI
537-
value: {{ printf "127.0.0.1:%d/%s?sslmode=disable" (int (include "postgresql.v1.service.port" .)) $database }}
536+
value: {{ printf "127.0.0.1:%d/?sslmode=disable" (int (include "postgresql.v1.service.port" .)) }}
538537
{{- $pwdKey := ternary (include "postgresql.v1.adminPasswordKey" .) (include "postgresql.v1.userPasswordKey" .) (or (eq $customUser "postgres") (empty $customUser)) }}
539538
{{- if .Values.auth.usePasswordFiles }}
540539
- name: DATA_SOURCE_PASS_FILE

‎bitnami/postgresql/templates/read/statefulset.yaml

+1-2
Original file line numberDiff line numberDiff line change
@@ -432,9 +432,8 @@ spec:
432432
args: [ "--extend.query-path", "/conf/custom-metrics.yaml" ]
433433
{{- end }}
434434
env:
435-
{{- $database := required "In order to enable metrics you need to specify a database (.Values.auth.database or .Values.global.postgresql.auth.database)" (include "postgresql.v1.database" .) }}
436435
- name: DATA_SOURCE_URI
437-
value: {{ printf "127.0.0.1:%d/%s?sslmode=disable" (int (include "postgresql.v1.service.port" .)) $database }}
436+
value: {{ printf "127.0.0.1:%d/?sslmode=disable" (int (include "postgresql.v1.service.port" .)) }}
438437
{{- if .Values.auth.usePasswordFiles }}
439438
- name: DATA_SOURCE_PASS_FILE
440439
value: {{ printf "/opt/bitnami/postgresql/secrets/%s" (include "postgresql.v1.userPasswordKey" .) }}

0 commit comments

Comments
 (0)