diff --git a/stable/elasticsearch-exporter/Chart.yaml b/stable/elasticsearch-exporter/Chart.yaml index 9c528ddf63..1ab855075e 100644 --- a/stable/elasticsearch-exporter/Chart.yaml +++ b/stable/elasticsearch-exporter/Chart.yaml @@ -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: diff --git a/stable/elasticsearch-exporter/README.md b/stable/elasticsearch-exporter/README.md index 9513d67ec0..f9a81fb3b9 100644 --- a/stable/elasticsearch-exporter/README.md +++ b/stable/elasticsearch-exporter/README.md @@ -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` diff --git a/stable/elasticsearch-exporter/templates/service.yaml b/stable/elasticsearch-exporter/templates/service.yaml index bf7df3a1ac..167f5509d5 100644 --- a/stable/elasticsearch-exporter/templates/service.yaml +++ b/stable/elasticsearch-exporter/templates/service.yaml @@ -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: diff --git a/stable/elasticsearch-exporter/templates/servicemonitor.yaml b/stable/elasticsearch-exporter/templates/servicemonitor.yaml index 8ea8dff783..69d7e0ace7 100644 --- a/stable/elasticsearch-exporter/templates/servicemonitor.yaml +++ b/stable/elasticsearch-exporter/templates/servicemonitor.yaml @@ -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 }}" diff --git a/stable/elasticsearch-exporter/values.yaml b/stable/elasticsearch-exporter/values.yaml index 310fc60713..0f4cc05288 100644 --- a/stable/elasticsearch-exporter/values.yaml +++ b/stable/elasticsearch-exporter/values.yaml @@ -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.