1 {{- if .Values.pushgateway.enabled -}}
2 apiVersion: {{ template "prometheus.deployment.apiVersion" . }}
6 {{- include "prometheus.pushgateway.labels" . | nindent 4 }}
7 name: {{ template "prometheus.pushgateway.fullname" . }}
8 {{ include "prometheus.namespace" . | indent 2 }}
11 {{- if .Values.schedulerName }}
12 schedulerName: "{{ .Values.schedulerName }}"
15 {{- include "prometheus.pushgateway.matchLabels" . | nindent 6 }}
16 replicas: {{ .Values.pushgateway.replicaCount }}
17 {{- if .Values.pushgateway.strategy }}
19 {{ toYaml .Values.pushgateway.strategy | trim | indent 4 }}
20 {{ if eq .Values.pushgateway.strategy.type "Recreate" }}rollingUpdate: null{{ end }}
24 {{- if .Values.pushgateway.podAnnotations }}
26 {{ toYaml .Values.pushgateway.podAnnotations | indent 8 }}
29 {{- include "prometheus.pushgateway.labels" . | nindent 8 }}
31 serviceAccountName: {{ template "prometheus.serviceAccountName.pushgateway" . }}
32 {{- if .Values.pushgateway.extraInitContainers }}
34 {{ toYaml .Values.pushgateway.extraInitContainers | indent 8 }}
36 {{- if .Values.pushgateway.priorityClassName }}
37 priorityClassName: "{{ .Values.pushgateway.priorityClassName }}"
40 - name: {{ template "prometheus.name" . }}-{{ .Values.pushgateway.name }}
41 image: "{{ .Values.pushgateway.image.repository }}:{{ .Values.pushgateway.image.tag }}"
42 imagePullPolicy: "{{ .Values.pushgateway.image.pullPolicy }}"
44 {{- range $key, $value := .Values.pushgateway.extraArgs }}
45 - --{{ $key }}={{ $value }}
51 {{- if (index .Values "pushgateway" "extraArgs" "web.route-prefix") }}
52 path: /{{ index .Values "pushgateway" "extraArgs" "web.route-prefix" }}/-/healthy
57 initialDelaySeconds: 10
61 {{- if (index .Values "pushgateway" "extraArgs" "web.route-prefix") }}
62 path: /{{ index .Values "pushgateway" "extraArgs" "web.route-prefix" }}/-/ready
67 initialDelaySeconds: 10
70 {{ toYaml .Values.pushgateway.resources | indent 12 }}
71 {{- if .Values.pushgateway.persistentVolume.enabled }}
73 - name: storage-volume
74 mountPath: "{{ .Values.pushgateway.persistentVolume.mountPath }}"
75 subPath: "{{ .Values.pushgateway.persistentVolume.subPath }}"
77 {{- if .Values.imagePullSecrets }}
79 {{ toYaml .Values.imagePullSecrets | indent 2 }}
81 {{- if .Values.pushgateway.nodeSelector }}
83 {{ toYaml .Values.pushgateway.nodeSelector | indent 8 }}
85 {{- if .Values.pushgateway.securityContext }}
87 {{ toYaml .Values.pushgateway.securityContext | indent 8 }}
89 {{- if .Values.pushgateway.tolerations }}
91 {{ toYaml .Values.pushgateway.tolerations | indent 8 }}
93 {{- if .Values.pushgateway.affinity }}
95 {{ toYaml .Values.pushgateway.affinity | indent 8 }}
97 {{- if .Values.pushgateway.persistentVolume.enabled }}
99 - name: storage-volume
100 persistentVolumeClaim:
101 claimName: {{ if .Values.pushgateway.persistentVolume.existingClaim }}{{ .Values.pushgateway.persistentVolume.existingClaim }}{{- else }}{{ template "prometheus.pushgateway.fullname" . }}{{- end }}