[stabled/elasticsearch-exporter] add custom labels to the service and set service http port name (#14395)

* stable/elasticsearch-exporter: add service labels

Signed-off-by: Hector Fernandez <hfernandez@mesosphere.com>

* stable/elasticsearch-exporter: set custom name for service http port

Signed-off-by: Hector Fernandez <hfernandez@mesosphere.com>
This commit is contained in:
Hector Fernandez
2019-06-03 01:54:15 -07:00
committed by Kubernetes Prow Robot
parent af2af1af66
commit dd0cb418b8
5 changed files with 13 additions and 3 deletions
+1 -1
View File
@@ -1,7 +1,7 @@
apiVersion: v1
description: Elasticsearch stats exporter for Prometheus
name: elasticsearch-exporter
version: 1.2.0
version: 1.3.0
appVersion: 1.0.2
home: https://github.com/justwatchcom/elasticsearch_exporter
sources:
+2
View File
@@ -56,7 +56,9 @@ Parameter | Description | Default
`podAnnotations` | Pod annotations | `{}` |
`service.type` | type of service to create | `ClusterIP`
`service.httpPort` | port for the http service | `9108`
`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 | `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`
@@ -7,6 +7,11 @@ metadata:
app: {{ template "elasticsearch-exporter.name" . }}
release: "{{ .Release.Name }}"
heritage: "{{ .Release.Service }}"
{{- if .Values.service.labels }}
{{- range $key, $value := .Values.service.labels }}
{{ $key }}: {{ $value | quote }}
{{- end }}
{{- end }}
{{- if .Values.service.annotations }}
annotations:
{{ toYaml .Values.service.annotations | indent 4 }}
@@ -14,7 +19,7 @@ metadata:
spec:
type: {{ .Values.service.type }}
ports:
- name: http
- name: {{ .Values.service.metricsPort.name }}
port: {{ .Values.service.httpPort }}
protocol: TCP
selector:
@@ -22,7 +22,7 @@ spec:
scrapeTimeout: {{ .Values.serviceMonitor.scrapeTimeout }}
{{- end }}
honorLabels: true
port: http
port: {{ .Values.service.metricsPort.name }}
path: {{ .Values.web.path }}
scheme: {{ .Values.serviceMonitor.scheme }}
jobLabel: "{{ .Release.Name }}"
@@ -30,7 +30,10 @@ podAnnotations: {}
service:
type: ClusterIP
httpPort: 9108
metricsPort:
name: http
annotations: {}
labels: {}
es:
## Address (host and port) of the Elasticsearch node we should connect to.