apiVersion: apps/v1
kind: DaemonSet
metadata:
  name: kured        # Must match `--ds-name`
  namespace: kube-system # Must match `--ds-namespace`
spec:
  updateStrategy:
    rollingUpdate:
      maxUnavailable: 1
    type: RollingUpdate
  selector:
    matchLabels:
      name: kured
  template:
    metadata:
      labels:
        name: kured
    spec:
      containers:
        - name: kured
          image: quay.io/weaveworks/kured:support-k8s-1.10-5731b98
          imagePullPolicy: IfNotPresent
          command:
            - /usr/bin/kured
          args:
            - --ds-name=kured
            - --ds-namespace=kube-system
            - --lock-annotation=weave.works/kured-node-lock
            - --period=1h
            - --reboot-sentinel=/var/run/reboot-required
          env:
            - name: KURED_NODE_ID
              valueFrom:
                fieldRef:
                  fieldPath: spec.nodeName
          volumeMounts:
            - name: hostrun
              mountPath: /var/run
      restartPolicy: Always
      volumes:
        - name: hostrun
          hostPath:
            path: /var/run
