apiVersion: apps/v1
kind: DaemonSet
metadata:
  name: {{ cachekey }}
  labels:
    k8s-app: {{ cachekey }}
spec:
  selector:
    matchLabels:
      k8s-app: {{ cachekey }}
  updateStrategy:
    type: RollingUpdate
  template:
    metadata:
      labels:
        name: {{ cachekey }}
        k8s-app: {{ cachekey }}
    spec:
      affinity:
        nodeAffinity:
          requiredDuringSchedulingIgnoredDuringExecution:
            nodeSelectorTerms:
            - matchExpressions:
              - key: {{ nodeSelectorKey }}
                operator: Exists
      tolerations:
      - operator: "Exists"
      containers:
      - image: {{ image_name }}
        name: {{ cachekey }}
        command: [ "sleep", "inf" ]
