Skip to content

Commit db00155

Browse files
bobanjzeritti
andauthored
[prometheus-elasticsearch-exporter] Deployment volumes volumeMounts fix (#5493)
Signed-off-by: Boban Jovanoski <[email protected]> Signed-off-by: zeritti <[email protected]> Co-authored-by: zeritti <[email protected]>
1 parent b1867c2 commit db00155

12 files changed

+73
-1
lines changed

Diff for: charts/prometheus-elasticsearch-exporter/.helmignore

+2
Original file line numberDiff line numberDiff line change
@@ -22,3 +22,5 @@ OWNERS
2222
.idea/
2323
*.tmproj
2424
.vscode/
25+
26+
ci/

Diff for: charts/prometheus-elasticsearch-exporter/Chart.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
apiVersion: v2
22
description: Elasticsearch stats exporter for Prometheus
33
name: prometheus-elasticsearch-exporter
4-
version: 6.7.1
4+
version: 6.7.2
55
kubeVersion: ">=1.19.0-0"
66
appVersion: "v1.9.0"
77
home: https://github.com/prometheus-community/elasticsearch_exporter
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
---
2+
commonLabels:
3+
foo: bar
4+
baz: qux
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
deployment:
3+
labels:
4+
foo: bar
5+
baz: qux
6+
annotations:
7+
foo.io/bar: baz
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
---
2+
env:
3+
FOO: bar
4+
BAZ: qux
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
---
2+
extraVolumes:
3+
- name: cache
4+
emptyDir:
5+
sizeLimit: 100Mi
6+
7+
extraVolumeMounts:
8+
- name: cache
9+
mountPath: /cache
10+
readOnly: false
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
podLabels:
3+
foo: bar
4+
baz: qux
5+
6+
podAnnotations:
7+
foo.io/bar: baz
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
podMonitor:
3+
enabled: true
4+
labels:
5+
foo: bar
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
---
2+
secretMounts:
3+
- name: secret
4+
path: /etc/secret
5+
secretName: mysecret
6+
7+
extraManifests:
8+
- |
9+
apiVersion: v1
10+
kind: Secret
11+
metadata:
12+
name: mysecret
13+
labels: {{ include "elasticsearch-exporter.labels" . | nindent 4 }}
14+
type: Opaque
15+
data:
16+
foo: YmFy
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
service:
3+
labels:
4+
foo: bar
5+
baz: qux
6+
annotations:
7+
foo.io/bar: baz
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
serviceMonitor:
3+
enabled: true
4+
labels:
5+
foo: bar
6+
jobLabel: app.kubernetes.io/name

Diff for: charts/prometheus-elasticsearch-exporter/templates/deployment.yaml

+4
Original file line numberDiff line numberDiff line change
@@ -160,6 +160,7 @@ spec:
160160
preStop:
161161
exec:
162162
command: ["/bin/sleep", "20"]
163+
{{- if or (and .Values.es.ssl.enabled (eq .Values.es.ssl.useExistingSecrets false)) (not (empty .Values.secretMounts)) (not (empty .Values.extraVolumeMounts)) }}
163164
volumeMounts:
164165
{{- if and .Values.es.ssl.enabled (eq .Values.es.ssl.useExistingSecrets false) }}
165166
- mountPath: /ssl
@@ -175,6 +176,7 @@ spec:
175176
{{- with .Values.extraVolumeMounts }}
176177
{{- toYaml . | nindent 12 }}
177178
{{- end }}
179+
{{- end }}
178180
{{- with .Values.initContainers }}
179181
initContainers:
180182
{{- toYaml . | nindent 8 }}
@@ -195,6 +197,7 @@ spec:
195197
topologySpreadConstraints:
196198
{{- toYaml . | nindent 8 }}
197199
{{- end }}
200+
{{- if or (and .Values.es.ssl.enabled (eq .Values.es.ssl.useExistingSecrets false)) (not (empty .Values.secretMounts)) (not (empty .Values.extraVolumes)) }}
198201
volumes:
199202
{{- if and .Values.es.ssl.enabled (eq .Values.es.ssl.useExistingSecrets false) }}
200203
- name: ssl
@@ -209,3 +212,4 @@ spec:
209212
{{- with .Values.extraVolumes }}
210213
{{- toYaml . | nindent 8 }}
211214
{{- end }}
215+
{{- end }}

0 commit comments

Comments
 (0)