From 75d10bdfbe13cc25bc53b8aa03526a116fe09b29 Mon Sep 17 00:00:00 2001 From: John Stewart <32647598+jstewart612@users.noreply.github.com> Date: Tue, 8 Sep 2020 04:54:23 -0400 Subject: [PATCH] [prometheus-blackbox-exporter] allow configurable DNS settings (#42) * [prometheus-blackbox-exporter] allow configurable dnsPolicy and dnsConfig Signed-off-by: John Stewart * [prometheus-blackbox-exporter] allow configurable DNS settings - nindent fixes Signed-off-by: John Stewart * [prometheus-blackbox-exporter] allow configurable DNS settings - defaults and version fixes Signed-off-by: John Stewart --- charts/prometheus-blackbox-exporter/Chart.yaml | 2 +- .../prometheus-blackbox-exporter/templates/daemonset.yaml | 7 +++++++ .../prometheus-blackbox-exporter/templates/deployment.yaml | 7 +++++++ charts/prometheus-blackbox-exporter/values.yaml | 5 +++++ 4 files changed, 20 insertions(+), 1 deletion(-) diff --git a/charts/prometheus-blackbox-exporter/Chart.yaml b/charts/prometheus-blackbox-exporter/Chart.yaml index 5f5477500251..e95c04382e4b 100644 --- a/charts/prometheus-blackbox-exporter/Chart.yaml +++ b/charts/prometheus-blackbox-exporter/Chart.yaml @@ -1,7 +1,7 @@ apiVersion: v1 description: Prometheus Blackbox Exporter name: prometheus-blackbox-exporter -version: 4.3.2 +version: 4.4.0 appVersion: 0.16.0 home: https://github.com/prometheus/blackbox_exporter sources: diff --git a/charts/prometheus-blackbox-exporter/templates/daemonset.yaml b/charts/prometheus-blackbox-exporter/templates/daemonset.yaml index f6770e06719c..d69d9c129119 100644 --- a/charts/prometheus-blackbox-exporter/templates/daemonset.yaml +++ b/charts/prometheus-blackbox-exporter/templates/daemonset.yaml @@ -92,6 +92,13 @@ spec: subPath: {{ .subPath }} readOnly: {{ .readOnly }} {{- end }} +{{- if .Values.dnsPolicy }} + dnsPolicy: {{ .Values.dnsPolicy | toString }} +{{- end }} +{{- if .Values.dnsConfig }} + dnsConfig: + {{- toYaml .Values.dnsConfig | nindent 8 }} +{{- end }} volumes: - name: config {{- if .Values.secretConfig }} diff --git a/charts/prometheus-blackbox-exporter/templates/deployment.yaml b/charts/prometheus-blackbox-exporter/templates/deployment.yaml index 1814a0afa9d1..56e8779e58e7 100644 --- a/charts/prometheus-blackbox-exporter/templates/deployment.yaml +++ b/charts/prometheus-blackbox-exporter/templates/deployment.yaml @@ -100,6 +100,13 @@ spec: subPath: {{ .subPath }} readOnly: {{ .readOnly }} {{- end }} +{{- if .Values.dnsPolicy }} + dnsPolicy: {{ .Values.dnsPolicy | toString }} +{{- end }} +{{- if .Values.dnsConfig }} + dnsConfig: + {{- toYaml .Values.dnsConfig | nindent 8 }} +{{- end }} volumes: - name: config {{- if .Values.secretConfig }} diff --git a/charts/prometheus-blackbox-exporter/values.yaml b/charts/prometheus-blackbox-exporter/values.yaml index 5797022091ca..e6e8f1e33341 100644 --- a/charts/prometheus-blackbox-exporter/values.yaml +++ b/charts/prometheus-blackbox-exporter/values.yaml @@ -156,3 +156,8 @@ networkPolicy: enabled: false # Limit access only from monitoring namespace allowMonitoringNamespace: false + +## dnsPolicy and dnsConfig for Deployments and Daemonsets if you want non-default settings. +## These will be passed directly to the PodSpec of same. +dnsPolicy: +dnsConfig: