Skip to content

Commit

Permalink
[prometheus-blackbox-exporter] Support setting extraInitContainers an…
Browse files Browse the repository at this point in the history
…d extraContainers to a string value to enable full templating (prometheus-community#4089)

* Support a string value to enable full templating

Signed-off-by: Jared Tan <[email protected]>

* fix(kube-prometheus-stack): re-enable memory working set rule (prometheus-community#4044)

This rule was accidentally left out while migrating to the
new layout for rules in release 54

Signed-off-by: Jan Jungnickel <[email protected]>
Signed-off-by: Jared Tan <[email protected]>

* Update charts/prometheus-blackbox-exporter/Chart.yaml

Co-authored-by: André Bauer <[email protected]>
Signed-off-by: Jared Tan <[email protected]>

---------

Signed-off-by: Jared Tan <[email protected]>
Signed-off-by: Jan Jungnickel <[email protected]>
Co-authored-by: Jan Jungnickel <[email protected]>
Co-authored-by: MH <[email protected]>
Co-authored-by: André Bauer <[email protected]>
  • Loading branch information
4 people authored and Matiasmct committed Mar 20, 2024
1 parent b5ebf43 commit 71aaa9d
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 4 deletions.
2 changes: 1 addition & 1 deletion charts/prometheus-blackbox-exporter/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apiVersion: v2
description: Prometheus Blackbox Exporter
name: prometheus-blackbox-exporter
version: 8.6.1
version: 8.7.0
appVersion: v0.24.0
home: https://github.com/prometheus/blackbox_exporter
sources:
Expand Down
13 changes: 11 additions & 2 deletions charts/prometheus-blackbox-exporter/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -150,11 +150,20 @@ securityContext:
{{- end }}
{{- with .Values.extraInitContainers }}
initContainers:
{{ toYaml . }}
{{- if kindIs "string" . }}
{{- tpl . $ | nindent 2 }}
{{- else }}
{{- toYaml . | nindent 2 }}
{{- end -}}
{{- end }}

containers:
{{ with .Values.extraContainers }}
{{- toYaml . }}
{{- if kindIs "string" . }}
{{- tpl . $ }}
{{- else }}
{{- toYaml . }}
{{- end -}}
{{- end }}
- name: blackbox-exporter
image: {{ include "prometheus-blackbox-exporter.image" . }}
Expand Down
15 changes: 14 additions & 1 deletion charts/prometheus-blackbox-exporter/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,12 @@ extraVolumeMounts:
# mountPath: /etc/ssl/certs/ca-certificates.crt

## Additional InitContainers to initialize the pod
##
## This supports either a structured array or a templatable string
extraInitContainers: []

## This supports either a structured array or a templatable string

# Array mode
extraContainers: []
# - name: oAuth2-proxy
# args:
Expand All @@ -70,6 +73,16 @@ extraContainers: []
# - mountPath: /etc/prometheus/secrets/blackbox-tls
# name: secret-blackbox-tls

# String mode
# extraContainers: |-
# - name: oAuth2-proxy
# args:
# - -https-address=:9116
# - -upstream=http://localhost:9115
# - -skip-auth-regex=^/metrics
# - -openshift-delegate-urls={"/":{"group":"monitoring.coreos.com","resource":"prometheuses","verb":"get"}}
# image: {{ .Values.global.imageRegistry }}/openshift/oauth-proxy:v1.1.0

## Enable pod security policy
pspEnabled: true

Expand Down

0 comments on commit 71aaa9d

Please sign in to comment.