blob: 7c6bbf6ef32ad05d3f4c7376eb2881bd6a1e249f [file] [log] [blame] [edit]
{{- if (eq .Values.role "Agent") -}}
apiVersion: apps/v1
kind: DaemonSet
metadata:
name: {{ include "vector.fullname" . }}
labels:
{{- include "vector.labels" . | nindent 4 }}
annotations:
{{- toYaml .Values.workloadResourceAnnotations | nindent 4 }}
spec:
selector:
matchLabels:
{{- include "vector.selectorLabels" . | nindent 6 }}
minReadySeconds: {{ .Values.minReadySeconds }}
{{- with .Values.updateStrategy }}
updateStrategy:
{{- 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 }}