prometheus-community / helm-charts

Prometheus community Helm charts
Apache License 2.0
4.99k stars 4.99k forks source link

[prometheus-blackbox-exporter] `_helpers.tpl` produces invalid yaml #4011

Open cruwe opened 10 months ago

cruwe commented 10 months ago

https://github.com/prometheus-community/helm-charts/blob/1ff5e72a287484ae817c234ab2623cb2b2f91eb5/charts/prometheus-blackbox-exporter/templates/_helpers.tpl#L153

First, thanks for developing these helm-charts and providing them to the community.

When rendering initContainers, the deployment gets templated as in

      initContainers:  - args:
          - -c
          - cat /etc/ssl/certs/ca-certificates.crt /tls/ca.crt > /tls-processed/ca.crt
          command:
          - /bin/bash
      ....

Changing _helpers.tpl to

{{- with .Values.extraInitContainers }}
initContainers:
{{ toYaml . | indent 2 }}
{{- end }}

fixes the problem.

I'd submit a PR, but somehow I fear I am missing the original intent, so I do not want to contribute to any hassle.

Thanks for your consideration.

zeritti commented 10 months ago

Ref. PR #3850

stale[bot] commented 9 months ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Any further update will cause the issue/pull request to no longer be considered stale. Thank you for your contributions.