[stable/elasticsearch-exporter] Add envs to deployment template (#13981)

* Add ability to specify environment variables in deployment template

Signed-off-by: David Ashford <david.ashford@distilled.ie>

* Increase version

Signed-off-by: David Ashford <david.ashford@distilled.ie>

* bump version

Signed-off-by: David Ashford <david.ashford@distilled.ie>

* add guard when no envs specified

Signed-off-by: David Ashford <david.ashford@distilled.ie>

* add example and clean up env output

Signed-off-by: David Ashford <david.ashford@distilled.ie>
This commit is contained in:
David Ashford
2019-07-12 01:17:06 -07:00
committed by Kubernetes Prow Robot
parent 2ef3c959dd
commit 28b6ba536c
4 changed files with 17 additions and 2 deletions
+1 -1
View File
@@ -1,7 +1,7 @@
apiVersion: v1
description: Elasticsearch stats exporter for Prometheus
name: elasticsearch-exporter
version: 1.5.0
version: 1.6.0
appVersion: 1.0.2
home: https://github.com/justwatchcom/elasticsearch_exporter
sources:
+2 -1
View File
@@ -60,7 +60,8 @@ Parameter | Description | Default
`service.metricsPort.name` | name for the http service | `http`
`service.annotations` | Annotations on the http service | `{}`
`service.labels` | Additional labels for the service definition | `{}`
`es.uri` | address of the Elasticsearch node to connect to | `http://localhost:9200`
`env` | Extra environment variables passed to pod | `{}`
`es.uri` | address of the Elasticsearch node to connect to | `localhost:9200`
`es.all` | if `true`, query stats for all nodes in the cluster, rather than just the node we connect to | `true`
`es.indices` | if true, query stats for all indices in the cluster | `true`
`es.timeout` | timeout for trying to get stats from Elasticsearch | `30s`
@@ -43,6 +43,13 @@ spec:
{{- end }}
containers:
- name: {{ .Chart.Name }}
{{- if .Values.env }}
env:
{{- range $key, $value := .Values.env }}
- name: {{ $key }}
value: "{{ $value }}"
{{- end }}
{{- end }}
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
command: ["elasticsearch_exporter",
@@ -44,6 +44,13 @@ service:
annotations: {}
labels: {}
## Extra environment variables that will be passed into the exporter pod
## example:
## env:
## KEY_1: value1
## KEY_2: value2
# env:
es:
## Address (host and port) of the Elasticsearch node we should connect to.
## This could be a local node (localhost:9200, for instance), or the address