apiVersion: apps/v1 kind: Deployment metadata: name: {{ include "promexporter.fullname" . }} labels: {{- include "promexporter.labels" . | nindent 4 }} spec: replicas: {{ .Values.replicaCount }} strategy: type: Recreate selector: matchLabels: {{- include "promexporter.selectorLabels" . | nindent 6 }} template: metadata: annotations: checksum/config: {{ include (print $.Template.BasePath "/configmap.yaml") . | sha256sum }} {{- with .Values.podAnnotations }} {{- toYaml . | nindent 8 }} {{- end }} labels: {{- include "promexporter.selectorLabels" . | nindent 8 }} spec: {{- with .Values.imagePullSecrets }} imagePullSecrets: {{- toYaml . | nindent 8 }} {{- end }} serviceAccountName: {{ include "promexporter.serviceAccountName" . }} securityContext: {{- toYaml .Values.podSecurityContext | nindent 8 }} containers: - name: {{ .Chart.Name }} securityContext: {{- toYaml .Values.securityContext | nindent 12 }} image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}" imagePullPolicy: {{ .Values.image.pullPolicy }} command: {{- toYaml .Values.command | nindent 12 }} args: {{- toYaml .Values.args | nindent 12 }} env: {{- toYaml .Values.env | nindent 12 }} ports: {{- range .Values.service.ports }} - containerPort: {{ .containerPort }} name: {{ .name }} {{- end }} # livenessProbe: # httpGet: # path: / # port: http # readinessProbe: # httpGet: # path: / # port: http resources: {{- toYaml .Values.resources | nindent 12 }} volumeMounts: - name: config mountPath: /config/config.yaml subPath: config.yaml {{- with .Values.nodeSelector }} nodeSelector: {{- toYaml . | nindent 8 }} {{- end }} {{- with .Values.affinity }} affinity: {{- toYaml . | nindent 8 }} {{- end }} {{- with .Values.tolerations }} tolerations: {{- toYaml . | nindent 8 }} {{- end }} volumes: - name: config configMap: name: {{ include "promexporter.fullname" . }} items: - key: config.yaml path: config.yaml