blob: 2c77a800b2e4a3e5cd2d0fab092941cdeeee6029 [file] [log] [blame]
Mohammed Naser8a2c8fb2023-02-19 17:23:55 +00001{{- if (eq .Values.role "Stateless-Aggregator") -}}
2apiVersion: apps/v1
3kind: Deployment
4metadata:
5 name: {{ include "vector.fullname" . }}
6 labels:
7 {{- include "vector.labels" . | nindent 4 }}
Giovanni Tirloni59219b62024-04-09 14:50:25 -03008 annotations:
9 {{- toYaml .Values.workloadResourceAnnotations | nindent 4 }}
Mohammed Naser8a2c8fb2023-02-19 17:23:55 +000010spec:
Mohammed Naser7d1623e2024-06-17 09:12:39 -040011 {{- if not (or .Values.autoscaling.enabled .Values.autoscaling.external) }}
Mohammed Naser8a2c8fb2023-02-19 17:23:55 +000012 replicas: {{ .Values.replicas }}
13 {{- end }}
14 selector:
15 matchLabels:
16 {{- include "vector.selectorLabels" . | nindent 6 }}
Giovanni Tirloni59219b62024-04-09 14:50:25 -030017 minReadySeconds: {{ .Values.minReadySeconds }}
Mohammed Naser8a2c8fb2023-02-19 17:23:55 +000018 {{- with .Values.updateStrategy }}
19 strategy:
20 {{- toYaml . | nindent 4 }}
21 {{- end }}
22 template:
23 metadata:
24 annotations:
25 {{- if .Values.rollWorkload }}
26 {{- if .Values.existingConfigMaps }}
27 {{- range .Values.existingConfigMaps }}
28 {{- range $file, $contents := (lookup "v1" "ConfigMap" (print $.Release.Namespace) (print .)).data }}
29 checksum/{{ $file }}: {{ $contents | sha256sum }}
30 {{- end }}
31 {{- end }}
32 {{- else }}
33 checksum/config: {{ include (print $.Template.BasePath "/configmap.yaml") . | sha256sum }}
34 {{- end }}
35 {{- end }}
36 {{- with .Values.podAnnotations }}
37 {{- toYaml . | nindent 8 }}
38 {{- end }}
39 labels:
40 {{- include "vector.selectorLabels" . | nindent 8 }}
41 {{- with .Values.podLabels }}
42 {{- toYaml . | nindent 8 }}
43 {{- end }}
44 spec:
45 {{- include "vector.pod" . | nindent 6 }}
46{{- end }}