Mohammed Naser | 8a2c8fb | 2023-02-19 17:23:55 +0000 | [diff] [blame] | 1 | {{- if (eq .Values.role "Stateless-Aggregator") -}} |
| 2 | apiVersion: apps/v1 |
| 3 | kind: Deployment |
| 4 | metadata: |
| 5 | name: {{ include "vector.fullname" . }} |
| 6 | labels: |
| 7 | {{- include "vector.labels" . | nindent 4 }} |
Giovanni Tirloni | 59219b6 | 2024-04-09 14:50:25 -0300 | [diff] [blame] | 8 | annotations: |
| 9 | {{- toYaml .Values.workloadResourceAnnotations | nindent 4 }} |
Mohammed Naser | 8a2c8fb | 2023-02-19 17:23:55 +0000 | [diff] [blame] | 10 | spec: |
Mohammed Naser | 7d1623e | 2024-06-17 09:12:39 -0400 | [diff] [blame] | 11 | {{- if not (or .Values.autoscaling.enabled .Values.autoscaling.external) }} |
Mohammed Naser | 8a2c8fb | 2023-02-19 17:23:55 +0000 | [diff] [blame] | 12 | replicas: {{ .Values.replicas }} |
| 13 | {{- end }} |
| 14 | selector: |
| 15 | matchLabels: |
| 16 | {{- include "vector.selectorLabels" . | nindent 6 }} |
Giovanni Tirloni | 59219b6 | 2024-04-09 14:50:25 -0300 | [diff] [blame] | 17 | minReadySeconds: {{ .Values.minReadySeconds }} |
Mohammed Naser | 8a2c8fb | 2023-02-19 17:23:55 +0000 | [diff] [blame] | 18 | {{- 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 }} |