ad28e68440
This change updates the Elasticsearch chart for compatibility with the latest version of the Elasticsearch exporter. There are some breaking changes between v1.0.1 and v1.1.0 - mainly with how arguments are handled by the program. All of the configuration options currently available are now exposed in values.yaml Change-Id: I8c71d5f6ed4a8360ad886338adb8ad63471eefd1
109 lines
5.7 KiB
YAML
109 lines
5.7 KiB
YAML
{{/*
|
|
Licensed under the Apache License, Version 2.0 (the "License");
|
|
you may not use this file except in compliance with the License.
|
|
You may obtain a copy of the License at
|
|
|
|
http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
Unless required by applicable law or agreed to in writing, software
|
|
distributed under the License is distributed on an "AS IS" BASIS,
|
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
See the License for the specific language governing permissions and
|
|
limitations under the License.
|
|
*/}}
|
|
|
|
{{- if and .Values.manifests.monitoring.prometheus.deployment_exporter .Values.monitoring.prometheus.enabled }}
|
|
{{- $envAll := . }}
|
|
|
|
{{- $esUserSecret := .Values.secrets.elasticsearch.user }}
|
|
|
|
{{- $serviceAccountName := "prometheus-elasticsearch-exporter" }}
|
|
{{ tuple $envAll "prometheus_elasticsearch_exporter" $serviceAccountName | include "helm-toolkit.snippets.kubernetes_pod_rbac_serviceaccount" }}
|
|
---
|
|
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: prometheus-elasticsearch-exporter
|
|
labels:
|
|
{{ tuple $envAll "prometheus-elasticsearch-exporter" "exporter" | include "helm-toolkit.snippets.kubernetes_metadata_labels" | indent 4 }}
|
|
spec:
|
|
replicas: {{ .Values.pod.replicas.prometheus_elasticsearch_exporter }}
|
|
selector:
|
|
matchLabels:
|
|
{{ tuple $envAll "prometheus-elasticsearch-exporter" "exporter" | include "helm-toolkit.snippets.kubernetes_metadata_labels" | indent 6 }}
|
|
{{ tuple $envAll | include "helm-toolkit.snippets.kubernetes_upgrades_deployment" | indent 2 }}
|
|
template:
|
|
metadata:
|
|
labels:
|
|
{{ tuple $envAll "prometheus-elasticsearch-exporter" "exporter" | include "helm-toolkit.snippets.kubernetes_metadata_labels" | indent 8 }}
|
|
annotations:
|
|
{{ tuple $envAll | include "helm-toolkit.snippets.release_uuid" | indent 8 }}
|
|
{{ dict "envAll" $envAll "podName" "prometheus-elasticsearch-exporter" "containerNames" (list "elasticsearch-exporter" "init" ) | include "helm-toolkit.snippets.kubernetes_mandatory_access_control_annotation" | indent 8 }}
|
|
spec:
|
|
{{ dict "envAll" $envAll "application" "exporter" | include "helm-toolkit.snippets.kubernetes_pod_security_context" | indent 6 }}
|
|
serviceAccountName: {{ $serviceAccountName }}
|
|
nodeSelector:
|
|
{{ .Values.labels.exporter.node_selector_key }}: {{ .Values.labels.exporter.node_selector_value | quote }}
|
|
terminationGracePeriodSeconds: {{ .Values.pod.lifecycle.termination_grace_period.prometheus_elasticsearch_exporter.timeout | default "30" }}
|
|
initContainers:
|
|
{{ tuple $envAll "prometheus_elasticsearch_exporter" list | include "helm-toolkit.snippets.kubernetes_entrypoint_init_container" | indent 8 }}
|
|
containers:
|
|
- name: elasticsearch-exporter
|
|
{{ tuple $envAll "prometheus_elasticsearch_exporter" | include "helm-toolkit.snippets.image" | indent 10 }}
|
|
{{ tuple $envAll $envAll.Values.pod.resources.exporter | include "helm-toolkit.snippets.kubernetes_resources" | indent 10 }}
|
|
{{ dict "envAll" $envAll "application" "exporter" "container" "elasticsearch_exporter" | include "helm-toolkit.snippets.kubernetes_container_security_context" | indent 10 }}
|
|
command:
|
|
- "elasticsearch_exporter"
|
|
- '--es.uri=$(ELASTICSEARCH_URI)'
|
|
- '--web.telemetry-path={{ .Values.endpoints.prometheus_elasticsearch_exporter.path.default }}'
|
|
- '--web.listen-address=:{{ .Values.endpoints.prometheus_elasticsearch_exporter.port.metrics.default }}'
|
|
- '--es.timeout={{ .Values.conf.prometheus_elasticsearch_exporter.es.timeout }}'
|
|
{{- if .Values.conf.prometheus_elasticsearch_exporter.es.all }}
|
|
- '--es.all'
|
|
{{- end }}
|
|
{{- if .Values.conf.prometheus_elasticsearch_exporter.es.indices }}
|
|
- '--es.indices'
|
|
{{- end }}
|
|
{{- if .Values.conf.prometheus_elasticsearch_exporter.es.indices_settings }}
|
|
- '--es.indices_settings'
|
|
{{- end }}
|
|
{{- if .Values.conf.prometheus_elasticsearch_exporter.es.shards }}
|
|
- '--es.shards'
|
|
{{- end }}
|
|
{{- if .Values.conf.prometheus_elasticsearch_exporter.es.snapshots }}
|
|
- '--es.snapshots'
|
|
{{- end }}
|
|
{{- if .Values.conf.prometheus_elasticsearch_exporter.es.ssl_skip_verify }}
|
|
- '--es.ssl-skip-verify'
|
|
{{- end }}
|
|
{{- if .Values.conf.prometheus_elasticsearch_exporter.es.ca }}
|
|
- '--es.ca={{ .Values.conf.prometheus_elasticsearch_exporter.es.ca }}'
|
|
{{- end }}
|
|
{{- if .Values.conf.prometheus_elasticsearch_exporter.es.client_private_key }}
|
|
- '--es.client-private-key={{ .Values.conf.prometheus_elasticsearch_exporter.es.client_private_key }}'
|
|
{{- end }}
|
|
{{- if .Values.conf.prometheus_elasticsearch_exporter.es.client_cert }}
|
|
- '--es.client-cert={{ .Values.conf.prometheus_elasticsearch_exporter.es.client_cert }}'
|
|
{{- end }}
|
|
env:
|
|
- name: ELASTICSEARCH_URI
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: {{ $esUserSecret }}
|
|
key: ELASTICSEARCH_URI
|
|
ports:
|
|
- name: metrics
|
|
containerPort: {{ tuple "prometheus_elasticsearch_exporter" "internal" "metrics" . | include "helm-toolkit.endpoints.endpoint_port_lookup" }}
|
|
readinessProbe:
|
|
tcpSocket:
|
|
port: {{ tuple "prometheus_elasticsearch_exporter" "internal" "metrics" . | include "helm-toolkit.endpoints.endpoint_port_lookup" }}
|
|
initialDelaySeconds: 20
|
|
periodSeconds: 10
|
|
volumeMounts:
|
|
- name: pod-tmp
|
|
mountPath: /tmp
|
|
volumes:
|
|
- name: pod-tmp
|
|
emptyDir: {}
|
|
{{- end }}
|