From df53644c98812112881b4e7ce7766576c953b18e Mon Sep 17 00:00:00 2001 From: Tom Walker Date: Sat, 3 Feb 2024 13:04:57 +0000 Subject: [PATCH] Remove toYaml function call in blackbox exporter extra manifests template Signed-off-by: Tom Walker --- .../prometheus-blackbox-exporter/Chart.yaml | 2 +- charts/prometheus-blackbox-exporter/README.md | 27 +++++++++++++++++++ .../templates/extra-manifests.yaml | 2 +- .../prometheus-blackbox-exporter/values.yaml | 4 +-- 4 files changed, 31 insertions(+), 4 deletions(-) diff --git a/charts/prometheus-blackbox-exporter/Chart.yaml b/charts/prometheus-blackbox-exporter/Chart.yaml index 94a22523a63d..c582bb652fe1 100644 --- a/charts/prometheus-blackbox-exporter/Chart.yaml +++ b/charts/prometheus-blackbox-exporter/Chart.yaml @@ -1,7 +1,7 @@ apiVersion: v2 description: Prometheus Blackbox Exporter name: prometheus-blackbox-exporter -version: 8.15.1 +version: 9.0.0 appVersion: v0.25.0 home: https://github.com/prometheus/blackbox_exporter sources: diff --git a/charts/prometheus-blackbox-exporter/README.md b/charts/prometheus-blackbox-exporter/README.md index c7e2b5c27465..e850f339d6ea 100644 --- a/charts/prometheus-blackbox-exporter/README.md +++ b/charts/prometheus-blackbox-exporter/README.md @@ -48,6 +48,33 @@ helm upgrade [RELEASE_NAME] [CHART] --install _See [helm upgrade](https://helm.sh/docs/helm/helm_upgrade/) for command documentation._ +### To 9.0.0 + +This version changes how the value `extraManifests` is used within the [template](./templates/extra-manifests.yaml). It no longer applies the `toYaml` function to each element in the `extraManifests` array. Previously if you used the value to create an extra resource such as: + +```yaml +extraManifests: +- apiVersion: v1 + kind: ConfigMap + metadata: + name: prometheus-extra + data: + extra-data: "value" +``` + +This would now need to be a multiline YAML string instead of its own block of YAML: + +```yaml +extraManifests: +- | + apiVersion: v1 + kind: ConfigMap + metadata: + name: prometheus-extra + data: + extra-data: "value" +``` + ### To 8.0.0 - The default image is set to `quay.io/prometheus/blackbox-exporter` instead `prom/blackbox-exporter` diff --git a/charts/prometheus-blackbox-exporter/templates/extra-manifests.yaml b/charts/prometheus-blackbox-exporter/templates/extra-manifests.yaml index 567f7bf32971..2b21b710621f 100644 --- a/charts/prometheus-blackbox-exporter/templates/extra-manifests.yaml +++ b/charts/prometheus-blackbox-exporter/templates/extra-manifests.yaml @@ -1,4 +1,4 @@ {{ range .Values.extraManifests }} --- -{{ tpl (toYaml .) $ }} +{{ tpl . $ }} {{ end }} diff --git a/charts/prometheus-blackbox-exporter/values.yaml b/charts/prometheus-blackbox-exporter/values.yaml index bf8b7beb0f73..af81c1cf1d4e 100644 --- a/charts/prometheus-blackbox-exporter/values.yaml +++ b/charts/prometheus-blackbox-exporter/values.yaml @@ -385,10 +385,10 @@ dnsConfig: # Extra manifests to deploy as an array extraManifests: [] - # - apiVersion: v1 + # - | + # apiVersion: v1 # kind: ConfigMap # metadata: - # labels: # name: prometheus-extra # data: # extra-data: "value"