From 34a62129954c26cf9b29a8f832e8bc75665b93cf Mon Sep 17 00:00:00 2001 From: Alexis Sellier <3765063+alexissellier@users.noreply.github.com> Date: Mon, 5 Aug 2024 20:29:42 +0200 Subject: [PATCH] [prometheus-postgres-exporter] Introduce extraManifests value (#4765) * Introduce extraManifests value Signed-off-by: Alexis Sellier <3765063+alexissellier@users.noreply.github.com> * Increase minor version Signed-off-by: Alexis Sellier <3765063+alexissellier@users.noreply.github.com> * add ci values for testing purpose Signed-off-by: Alexis Sellier <3765063+alexissellier@users.noreply.github.com> * fix naming Signed-off-by: Alexis Sellier <3765063+alexissellier@users.noreply.github.com> * Change k8s objects use for testing Signed-off-by: Alexis Sellier <3765063+alexissellier@users.noreply.github.com> * Add CI test case with default values Signed-off-by: zeritti <47476160+zeritti@users.noreply.github.com> --------- Signed-off-by: Alexis Sellier <3765063+alexissellier@users.noreply.github.com> Signed-off-by: zeritti <47476160+zeritti@users.noreply.github.com> Co-authored-by: zeritti <47476160+zeritti@users.noreply.github.com> --- charts/prometheus-postgres-exporter/Chart.yaml | 2 +- .../ci/default-values.yaml | 1 + .../ci/extramanifests-values.yaml | 13 +++++++++++++ .../templates/extra-manifests.yaml | 4 ++++ charts/prometheus-postgres-exporter/values.yaml | 10 ++++++++++ 5 files changed, 29 insertions(+), 1 deletion(-) create mode 100644 charts/prometheus-postgres-exporter/ci/default-values.yaml create mode 100644 charts/prometheus-postgres-exporter/ci/extramanifests-values.yaml create mode 100644 charts/prometheus-postgres-exporter/templates/extra-manifests.yaml diff --git a/charts/prometheus-postgres-exporter/Chart.yaml b/charts/prometheus-postgres-exporter/Chart.yaml index 1f26d4c17558..98b24c802e21 100644 --- a/charts/prometheus-postgres-exporter/Chart.yaml +++ b/charts/prometheus-postgres-exporter/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v2 appVersion: "v0.15.0" description: A Helm chart for prometheus postgres-exporter name: prometheus-postgres-exporter -version: 6.1.0 +version: 6.2.0 home: https://github.com/prometheus-community/postgres_exporter sources: - https://github.com/prometheus-community/postgres_exporter diff --git a/charts/prometheus-postgres-exporter/ci/default-values.yaml b/charts/prometheus-postgres-exporter/ci/default-values.yaml new file mode 100644 index 000000000000..bde82e85d1cf --- /dev/null +++ b/charts/prometheus-postgres-exporter/ci/default-values.yaml @@ -0,0 +1 @@ +# Default chart values diff --git a/charts/prometheus-postgres-exporter/ci/extramanifests-values.yaml b/charts/prometheus-postgres-exporter/ci/extramanifests-values.yaml new file mode 100644 index 000000000000..e381cf301bb3 --- /dev/null +++ b/charts/prometheus-postgres-exporter/ci/extramanifests-values.yaml @@ -0,0 +1,13 @@ +extraManifests: +- apiVersion: v1 + kind: ConfigMap + metadata: + name: '{{ include "prometheus-postgres-exporter.fullname" . }}-extra-cm1' + data: + extra-data: "value1" +- apiVersion: v1 + kind: Secret + metadata: + name: '{{ include "prometheus-postgres-exporter.fullname" . }}-extra-secret1' + stringData: + secret: "value" diff --git a/charts/prometheus-postgres-exporter/templates/extra-manifests.yaml b/charts/prometheus-postgres-exporter/templates/extra-manifests.yaml new file mode 100644 index 000000000000..567f7bf32971 --- /dev/null +++ b/charts/prometheus-postgres-exporter/templates/extra-manifests.yaml @@ -0,0 +1,4 @@ +{{ range .Values.extraManifests }} +--- +{{ tpl (toYaml .) $ }} +{{ end }} diff --git a/charts/prometheus-postgres-exporter/values.yaml b/charts/prometheus-postgres-exporter/values.yaml index 9243ea888fec..80c229dc24c7 100644 --- a/charts/prometheus-postgres-exporter/values.yaml +++ b/charts/prometheus-postgres-exporter/values.yaml @@ -247,6 +247,16 @@ extraVolumeMounts: [] # mountPath: /etc/ssl/certs/ca-certificates.crt # subPath: ca-certificates.crt +## Extra manifests to deploy as an array +extraManifests: [] + # - apiVersion: v1 + # kind: ConfigMap + # metadata: + # labels: + # name: postgres-exporter-extra + # data: + # extra-data: "value" + podDisruptionBudget: enabled: false maxUnavailable: 1