From 0d4cd3fc20ab71dd2b71c235399ae317bd629b80 Mon Sep 17 00:00:00 2001 From: Arthur Legrand Date: Fri, 5 Aug 2022 20:22:12 -0400 Subject: [PATCH] [prometheus-postgres-exporter] Add possibility to have hostAliases defined in deployment spec Signed-off-by: Arthur Legrand --- charts/prometheus-postgres-exporter/Chart.yaml | 2 +- .../prometheus-postgres-exporter/templates/deployment.yaml | 4 ++++ charts/prometheus-postgres-exporter/values.yaml | 7 +++++++ 3 files changed, 12 insertions(+), 1 deletion(-) diff --git a/charts/prometheus-postgres-exporter/Chart.yaml b/charts/prometheus-postgres-exporter/Chart.yaml index 6e551d929ab..f021de909d7 100644 --- a/charts/prometheus-postgres-exporter/Chart.yaml +++ b/charts/prometheus-postgres-exporter/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v2 appVersion: "0.10.1" description: A Helm chart for prometheus postgres-exporter name: prometheus-postgres-exporter -version: 3.0.3 +version: 3.1.0 home: https://github.com/prometheus-community/postgres_exporter sources: - https://github.com/prometheus-community/postgres_exporter diff --git a/charts/prometheus-postgres-exporter/templates/deployment.yaml b/charts/prometheus-postgres-exporter/templates/deployment.yaml index 2ba95c8756e..e3b4be0bc81 100644 --- a/charts/prometheus-postgres-exporter/templates/deployment.yaml +++ b/charts/prometheus-postgres-exporter/templates/deployment.yaml @@ -134,6 +134,10 @@ spec: {{- end }} securityContext: {{ toYaml .Values.securityContext | indent 8 }} +{{- if .Values.hostAliases }} + hostAliases: +{{ toYaml .Values.hostAliases | indent 8 }} +{{- end }} {{- with .Values.nodeSelector }} nodeSelector: {{ toYaml . | indent 8 }} diff --git a/charts/prometheus-postgres-exporter/values.yaml b/charts/prometheus-postgres-exporter/values.yaml index a2ab8ff306d..27e14c028d8 100644 --- a/charts/prometheus-postgres-exporter/values.yaml +++ b/charts/prometheus-postgres-exporter/values.yaml @@ -98,6 +98,13 @@ securityContext: {} # The securityContext this Pod should use. See https://kubernetes.io/docs/concepts/policy/security-context/ for more. # runAsUser: 65534 +hostAliases: [] + # Set Host Aliases as per https://kubernetes.io/docs/tasks/network/customize-hosts-file-for-pods/ + # - ip: "127.0.0.1" + # hostnames: + # - "foo.local" + # - "bar.local" + config: datasource: # Specify one of both datasource or datasourceSecret