{{- if not $.Values.crds.exclusive }}
  {{- if eq .Values.manager.kind "DaemonSet" }}
apiVersion: apps/v1
kind: DaemonSet
metadata:
  name: {{ include "capsule.controllerName" . }}
  namespace: {{ $.Release.Namespace }}
  labels:
    {{- include "capsule.labels" . | nindent 4 }}
  {{- with .Values.customAnnotations }}
  annotations:
    {{- toYaml . | nindent 4 }}
  {{- end }}
spec:
  {{- with .Values.manager.daemonsetStrategy }}
  updateStrategy:
    {{- toYaml . | nindent 4 }}
  {{- end }}
  selector:
    matchLabels:
      {{- include "capsule.selectorLabels" . | nindent 6 }}
  template:
    {{- include "capsule.pod" $ | nindent 4 }}
  {{- end }}
{{- end }}
