mirror of
https://github.com/helm/charts.git
synced 2026-09-05 12:27:30 +00:00
Signed-off-by: Andrew Aadland <aa23@protonmail.com> Allows one to mount any number of volumes into the pod. This is useful, for example, when sending email to an SMTP relay that requires authentication (and thus the `smtp_auth_file` config parameter to point to a path on the file system). An example for this is commented
80 lines
2.5 KiB
YAML
80 lines
2.5 KiB
YAML
{{ if .Values.elasticsearch.host }}
|
|
apiVersion: apps/v1beta1
|
|
kind: Deployment
|
|
metadata:
|
|
name: {{ template "elastalert.fullname" . }}
|
|
labels:
|
|
app: {{ template "elastalert.name" . }}
|
|
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
|
|
release: {{ .Release.Name }}
|
|
heritage: {{ .Release.Service }}
|
|
spec:
|
|
replicas: {{ .Values.replicaCount }}
|
|
revisionHistoryLimit: {{ .Values.revisionHistoryLimit }}
|
|
template:
|
|
metadata:
|
|
annotations:
|
|
checksum/config: {{ include (print $.Template.BasePath "/config.yaml") . | sha256sum }}
|
|
checksum/rules: {{ include (print $.Template.BasePath "/rules.yaml") . | sha256sum }}
|
|
labels:
|
|
name: {{ template "elastalert.fullname" . }}-elastalert
|
|
app: {{ template "elastalert.name" . }}
|
|
release: {{ .Release.Name }}
|
|
spec:
|
|
containers:
|
|
- name: elastalert
|
|
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
|
|
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
|
{{- if .Values.command }}
|
|
command:
|
|
{{ toYaml .Values.command | indent 10 }}
|
|
{{- end }}
|
|
{{- if .Values.args }}
|
|
args:
|
|
{{ toYaml .Values.args | indent 10 }}
|
|
{{- end }}
|
|
volumeMounts:
|
|
- name: config
|
|
mountPath: '/opt/config'
|
|
- name: rules
|
|
mountPath: '/opt/rules'
|
|
{{- if .Values.elasticsearch.certsVolumeMounts }}
|
|
{{ toYaml .Values.elasticsearch.certsVolumeMounts | indent 10 }}
|
|
{{- end }}
|
|
{{- if .Values.extraVolumeMounts }}
|
|
{{ toYaml .Values.extraVolumeMounts | indent 10 }}
|
|
{{- end }}
|
|
resources:
|
|
{{ toYaml .Values.resources | indent 12 }}
|
|
restartPolicy: Always
|
|
{{- if .Values.tolerations }}
|
|
tolerations:
|
|
{{ toYaml .Values.tolerations | indent 8 }}
|
|
{{- end }}
|
|
{{- if .Values.nodeSelector }}
|
|
nodeSelector:
|
|
{{ toYaml .Values.nodeSelector | indent 8 }}
|
|
{{- end }}
|
|
volumes:
|
|
- name: rules
|
|
configMap:
|
|
name: {{ template "elastalert.fullname" . }}-rules
|
|
items:
|
|
{{- range $key, $value := .Values.rules }}
|
|
- key: {{ $key }}
|
|
path: {{ $key}}.yaml
|
|
{{- end }}
|
|
- name: config
|
|
configMap:
|
|
name: {{ template "elastalert.fullname" . }}-config
|
|
items:
|
|
- key: elastalert_config
|
|
path: elastalert_config.yaml
|
|
{{- if .Values.elasticsearch.certsVolumes }}
|
|
{{ toYaml .Values.elasticsearch.certsVolumes | indent 8 }}
|
|
{{- end }}
|
|
{{- if .Values.extraVolumes }}
|
|
{{ toYaml .Values.extraVolumes | indent 8 }}
|
|
{{- end }}
|
|
{{- end }}
|