From 6e706cf8869ecfe52f18e1b53089bd47b9956712 Mon Sep 17 00:00:00 2001 From: Alexis Sellier <3765063+alexissellier@users.noreply.github.com> Date: Thu, 8 Aug 2024 03:21:46 +0200 Subject: [PATCH] [prometheus-redis-exporter] Introduce extraManifests value (#4761) * [prometheus-redis-exporter] 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 files for testing Signed-off-by: Alexis Sellier <3765063+alexissellier@users.noreply.github.com> * change k7s objects used for testing Signed-off-by: Alexis Sellier <3765063+alexissellier@users.noreply.github.com> --------- Signed-off-by: Alexis Sellier <3765063+alexissellier@users.noreply.github.com> Co-authored-by: MH --- charts/prometheus-redis-exporter/Chart.yaml | 2 +- .../ci/extramanifests-values.yaml | 13 +++++++++++++ .../templates/extra-manifests.yaml | 4 ++++ charts/prometheus-redis-exporter/values.yaml | 10 ++++++++++ 4 files changed, 28 insertions(+), 1 deletion(-) create mode 100644 charts/prometheus-redis-exporter/ci/extramanifests-values.yaml create mode 100644 charts/prometheus-redis-exporter/templates/extra-manifests.yaml diff --git a/charts/prometheus-redis-exporter/Chart.yaml b/charts/prometheus-redis-exporter/Chart.yaml index be6927dd2909..f86b441c1f9c 100644 --- a/charts/prometheus-redis-exporter/Chart.yaml +++ b/charts/prometheus-redis-exporter/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v2 appVersion: v1.61.0 description: Prometheus exporter for Redis metrics name: prometheus-redis-exporter -version: 6.3.0 +version: 6.4.0 home: https://github.com/oliver006/redis_exporter sources: - https://github.com/oliver006/redis_exporter diff --git a/charts/prometheus-redis-exporter/ci/extramanifests-values.yaml b/charts/prometheus-redis-exporter/ci/extramanifests-values.yaml new file mode 100644 index 000000000000..a7ed38c96310 --- /dev/null +++ b/charts/prometheus-redis-exporter/ci/extramanifests-values.yaml @@ -0,0 +1,13 @@ +extraManifests: +- apiVersion: v1 + kind: ConfigMap + metadata: + name: '{{ include "prometheus-redis-exporter.fullname" . }}-extra-cm1' + data: + extra-data: "value1" +- apiVersion: v1 + kind: Secret + metadata: + name: '{{ include "prometheus-redis-exporter.fullname" . }}-extra-secret1' + stringData: + secret: "value" diff --git a/charts/prometheus-redis-exporter/templates/extra-manifests.yaml b/charts/prometheus-redis-exporter/templates/extra-manifests.yaml new file mode 100644 index 000000000000..567f7bf32971 --- /dev/null +++ b/charts/prometheus-redis-exporter/templates/extra-manifests.yaml @@ -0,0 +1,4 @@ +{{ range .Values.extraManifests }} +--- +{{ tpl (toYaml .) $ }} +{{ end }} diff --git a/charts/prometheus-redis-exporter/values.yaml b/charts/prometheus-redis-exporter/values.yaml index d113dcc15ad9..0a03f635d202 100644 --- a/charts/prometheus-redis-exporter/values.yaml +++ b/charts/prometheus-redis-exporter/values.yaml @@ -50,6 +50,16 @@ tolerations: [] affinity: {} +## Extra manifests to deploy as an array +extraManifests: [] + # - apiVersion: v1 + # kind: ConfigMap + # metadata: + # labels: + # name: redis-exporter-extra + # data: + # extra-data: "value" + # If serviceMonitor.multipleTarget is enabled, this configuration is actually not used redisAddress: redis://myredis:6379