blob: 2c77a800b2e4a3e5cd2d0fab092941cdeeee6029 [file] [log] [blame] [edit]
{{- if (eq .Values.role "Stateless-Aggregator") -}}
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ include "vector.fullname" . }}
labels:
{{- include "vector.labels" . | nindent 4 }}
annotations:
{{- toYaml .Values.workloadResourceAnnotations | nindent 4 }}
spec:
{{- if not (or .Values.autoscaling.enabled .Values.autoscaling.external) }}
replicas: {{ .Values.replicas }}
{{- end }}
selector:
matchLabels:
{{- include "vector.selectorLabels" . | nindent 6 }}
minReadySeconds: {{ .Values.minReadySeconds }}
{{- with .Values.updateStrategy }}
strategy:
{{- toYaml . | nindent 4 }}
{{- end }}
template:
metadata:
annotations:
{{- if .Values.rollWorkload }}
{{- if .Values.existingConfigMaps }}
{{- range .Values.existingConfigMaps }}
{{- range $file, $contents := (lookup "v1" "ConfigMap" (print $.Release.Namespace) (print .)).data }}
checksum/{{ $file }}: {{ $contents | sha256sum }}
{{- end }}
{{- end }}
{{- else }}
checksum/config: {{ include (print $.Template.BasePath "/configmap.yaml") . | sha256sum }}
{{- end }}
{{- end }}
{{- with .Values.podAnnotations }}
{{- toYaml . | nindent 8 }}
{{- end }}
labels:
{{- include "vector.selectorLabels" . | nindent 8 }}
{{- with .Values.podLabels }}
{{- toYaml . | nindent 8 }}
{{- end }}
spec:
{{- include "vector.pod" . | nindent 6 }}
{{- end }}