blob: 7c6bbf6ef32ad05d3f4c7376eb2881bd6a1e249f [file] [log] [blame]
Mohammed Naser8a2c8fb2023-02-19 17:23:55 +00001{{- if (eq .Values.role "Agent") -}}
2apiVersion: apps/v1
3kind: DaemonSet
4metadata:
5 name: {{ include "vector.fullname" . }}
6 labels:
7 {{- include "vector.labels" . | nindent 4 }}
Giovanni Tirloni52306ad2024-04-12 15:35:05 -03008 annotations:
9 {{- toYaml .Values.workloadResourceAnnotations | nindent 4 }}
Mohammed Naser8a2c8fb2023-02-19 17:23:55 +000010spec:
11 selector:
12 matchLabels:
13 {{- include "vector.selectorLabels" . | nindent 6 }}
Giovanni Tirloni52306ad2024-04-12 15:35:05 -030014 minReadySeconds: {{ .Values.minReadySeconds }}
Mohammed Naser8a2c8fb2023-02-19 17:23:55 +000015 {{- 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 }}