Mohammed Naser | 8a2c8fb | 2023-02-19 17:23:55 +0000 | [diff] [blame] | 1 | {{- if (eq .Values.role "Agent") -}} |
| 2 | apiVersion: apps/v1 |
| 3 | kind: DaemonSet |
| 4 | metadata: |
| 5 | name: {{ include "vector.fullname" . }} |
| 6 | labels: |
| 7 | {{- include "vector.labels" . | nindent 4 }} |
Giovanni Tirloni | 52306ad | 2024-04-12 15:35:05 -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: |
| 11 | selector: |
| 12 | matchLabels: |
| 13 | {{- include "vector.selectorLabels" . | nindent 6 }} |
Giovanni Tirloni | 52306ad | 2024-04-12 15:35:05 -0300 | [diff] [blame] | 14 | minReadySeconds: {{ .Values.minReadySeconds }} |
Mohammed Naser | 8a2c8fb | 2023-02-19 17:23:55 +0000 | [diff] [blame] | 15 | {{- with .Values.updateStrategy }} |
| 16 | updateStrategy: |
| 17 | {{- toYaml . | nindent 4 }} |
| 18 | {{- end }} |
| 19 | template: |
| 20 | metadata: |
| 21 | annotations: |
| 22 | {{- if .Values.rollWorkload }} |
| 23 | {{- if .Values.existingConfigMaps }} |
| 24 | {{- range .Values.existingConfigMaps }} |
| 25 | {{- range $file, $contents := (lookup "v1" "ConfigMap" (print $.Release.Namespace) (print .)).data }} |
| 26 | checksum/{{ $file }}: {{ $contents | sha256sum }} |
| 27 | {{- end }} |
| 28 | {{- end }} |
| 29 | {{- else }} |
| 30 | checksum/config: {{ include (print $.Template.BasePath "/configmap.yaml") . | sha256sum }} |
| 31 | {{- end }} |
| 32 | {{- end }} |
| 33 | {{- with .Values.podAnnotations }} |
| 34 | {{- toYaml . | nindent 8 }} |
| 35 | {{- end }} |
| 36 | labels: |
| 37 | {{- include "vector.selectorLabels" . | nindent 8 }} |
| 38 | {{- with .Values.podLabels }} |
| 39 | {{- toYaml . | nindent 8 }} |
| 40 | {{- end }} |
| 41 | spec: |
| 42 | {{- include "vector.pod" . | nindent 6 }} |
| 43 | {{- end }} |