VictoriaMetrics/deployment/k8s/helm/victoria-metrics/templates/vminsert-deployment.yaml
2019-05-23 00:25:38 +03:00

65 lines
2.2 KiB
YAML

{{- if .Values.vminsert.enabled -}}
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
labels:
{{- include "victoria-metrics.vminsert.labels" . | nindent 4 }}
name: {{ template "victoria-metrics.vminsert.fullname" . }}
spec:
selector:
matchLabels:
{{- include "victoria-metrics.vminsert.matchLabels" . | nindent 6 }}
replicas: {{ .Values.vminsert.replicaCount }}
template:
metadata:
{{- if .Values.vminsert.podAnnotations }}
annotations:
{{ toYaml .Values.vminsert.podAnnotations | indent 8 }}
{{- end }}
labels:
{{- include "victoria-metrics.vminsert.labels" . | nindent 8 }}
spec:
{{- if .Values.vminsert.priorityClassName }}
priorityClassName: "{{ .Values.vminsert.priorityClassName }}"
{{- end }}
containers:
- name: {{ template "victoria-metrics.name" . }}-{{ .Values.vminsert.name }}
image: "{{ .Values.vminsert.image.repository }}:{{ .Values.vminsert.image.tag }}"
imagePullPolicy: "{{ .Values.vminsert.image.pullPolicy }}"
args:
{{- include "victoria-metrics.vminsert.vmstorage-pod-fqdn" . | nindent 12 }}
{{- range $key, $value := .Values.vminsert.extraArgs }}
- --{{ $key }}={{ $value }}
{{- end }}
ports:
- name: http
containerPort: 8480
readinessProbe:
httpGet:
path: /health
port: http
initialDelaySeconds: 5
periodSeconds: 15
resources:
{{ toYaml .Values.vminsert.resources | indent 12 }}
{{- if .Values.imagePullSecrets }}
imagePullSecrets:
{{ toYaml .Values.imagePullSecrets | indent 2 }}
{{- end }}
{{- if .Values.vminsert.nodeSelector }}
nodeSelector:
{{ toYaml .Values.vminsert.nodeSelector | indent 8 }}
{{- end }}
{{- if .Values.vminsert.securityContext }}
securityContext:
{{ toYaml .Values.vminsert.securityContext | indent 8 }}
{{- end }}
{{- if .Values.vminsert.tolerations }}
tolerations:
{{ toYaml .Values.vminsert.tolerations | indent 8 }}
{{- end }}
{{- if .Values.vminsert.affinity }}
affinity:
{{ toYaml .Values.vminsert.affinity | indent 8 }}
{{- end }}
{{- end }}