apiVersion: apps/v1
kind: DaemonSet
metadata:
  name: kube-update
  namespace: kube-system
  labels:
    k8s-app: kube-update
spec:
  selector:
    matchLabels:
      name: kube-update
  template:
    metadata:
      labels:
        name: kube-update
    spec:
      containers:
      - name: kube-update
        image: registry.cn-hangzhou.aliyuncs.com/ringtail/kube-update:0.8
        resources:
          limits:
            memory: 200Mi
          requests:
            cpu: 100m
            memory: 200Mi
        env:
        - name: VERSION
          value: "v1.10.4-dirty"
        volumeMounts:
        - name: bin
          mountPath: /usr/bin/
        - name: dbus
          mountPath: /var/run/dbus
        - name: systemd
          mountPath: /run/systemd
        - name: systemctl
          mountPath: /usr/bin/systemctl
        - name: system
          mountPath: /etc/systemd/system
      terminationGracePeriodSeconds: 30
      volumes:
      - name: bin
        hostPath:
          path: /usr/bin
      - name: dbus
        hostPath:
          path: /var/run/dbus
      - name: systemd
        hostPath:
          path: /run/systemd
      - name: systemctl
        hostPath:
          path: /usr/bin/systemctl
      - name: system
        hostPath:
          path: /etc/systemd/system 
