diff --git a/charts/prometheus-consul-exporter/Chart.yaml b/charts/prometheus-consul-exporter/Chart.yaml index b1ff95f95da2..dae0a008a458 100644 --- a/charts/prometheus-consul-exporter/Chart.yaml +++ b/charts/prometheus-consul-exporter/Chart.yaml @@ -3,7 +3,7 @@ apiVersion: v2 appVersion: "v0.13.0" description: A Helm chart for the Prometheus Consul Exporter name: prometheus-consul-exporter -version: 1.1.1 +version: 1.2.0 keywords: - metrics - consul diff --git a/charts/prometheus-consul-exporter/templates/deployment.yaml b/charts/prometheus-consul-exporter/templates/deployment.yaml index 334f69e5bb35..410f18daa2f2 100644 --- a/charts/prometheus-consul-exporter/templates/deployment.yaml +++ b/charts/prometheus-consul-exporter/templates/deployment.yaml @@ -31,9 +31,16 @@ spec: - name: {{ .Chart.Name }} image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}" imagePullPolicy: {{ .Values.image.pullPolicy }} + {{- if .Values.invokeViaShell }} + command: ["/bin/sh"] + args: + - "-c" + - "consul_exporter --consul.server={{ .Values.consulServer }}" + {{- else }} command: ["consul_exporter"] args: - "--consul.server={{ .Values.consulServer }}" + {{ end }} {{- range $key, $value := .Values.options }} - "--{{ $key }}{{ if $value }}={{ $value }}{{ end }}" {{- end }} diff --git a/charts/prometheus-consul-exporter/values.yaml b/charts/prometheus-consul-exporter/values.yaml index 21bbac8de01b..1584151f5ebd 100644 --- a/charts/prometheus-consul-exporter/values.yaml +++ b/charts/prometheus-consul-exporter/values.yaml @@ -33,6 +33,12 @@ options: {} # no-consul.health-summary: # kv.filter=foobar +# By default, consul_exporter is run directly. +# If you want to use environment variables in `options` or `consulServer`, +# enable this option to have a shell interpret the command string before +# `consul_exporter` is executed. +invokeViaShell: false + service: type: ClusterIP port: 9107