From 6ccca3dd2ff4b1a0db153a62aa77b3b5ad07f39d Mon Sep 17 00:00:00 2001 From: WrenIX Date: Sat, 15 Jun 2024 10:49:52 +0200 Subject: [PATCH] fix(infra-monitoring): add hostNetwork support for blackbox (e.g. vpn) --- infra-monitoring/templates/exporter/blackbox/release.yaml | 8 +++++++- infra-monitoring/values.yaml | 1 + 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/infra-monitoring/templates/exporter/blackbox/release.yaml b/infra-monitoring/templates/exporter/blackbox/release.yaml index 6dce996..314d415 100644 --- a/infra-monitoring/templates/exporter/blackbox/release.yaml +++ b/infra-monitoring/templates/exporter/blackbox/release.yaml @@ -21,7 +21,12 @@ spec: {{- toYaml .Values.commons.helm.release.driftDetection | nindent 4 }} interval: 10m values: - + {{- if .Values.prometheus.exporter.blackbox.hostNetwork }} + hostNetwork: true + strategy: + type: Recreate + rollingUpdate: + {{- else }} # to run icmp # Workaround: https://github.com/prometheus-community/helm-charts/issues/2360 podSecurityContext: @@ -31,6 +36,7 @@ spec: # securityContext: # capabilities: # add: ["NET_RAW"] + {{- end }} serviceMonitor: selfMonitor: diff --git a/infra-monitoring/values.yaml b/infra-monitoring/values.yaml index 47ea102..bd1bdd9 100644 --- a/infra-monitoring/values.yaml +++ b/infra-monitoring/values.yaml @@ -152,6 +152,7 @@ prometheus: exporter: blackbox: enabled: true + hostNetwork: false ingress: # -- enable ingress for blackbox-exporter enabled: false