apiVersion: apps/v1
kind: DaemonSet
metadata:
  name: cadvisor
  namespace: micado-worker
  labels:
    app.kubernetes.io/name: cadvisor
    app.kubernetes.io/managed-by: micado
    app.kubernetes.io/version: v0.33.0
spec:
  selector:
    matchLabels:
      app.kubernetes.io/name: cadvisor
      app.kubernetes.io/managed-by: micado
      app.kubernetes.io/version: v0.33.0
  template:
    metadata:
      labels:
        app.kubernetes.io/name: cadvisor
        app.kubernetes.io/managed-by: micado
        app.kubernetes.io/version: v0.33.0
    spec:
      containers:
      - name: cadvisor
        image: google/cadvisor:v0.33.0
        args:
        - --docker_only=true
        - --housekeeping_interval=5s
        - --disable_metrics=tcp,udp,disk
        - --max_housekeeping_interval=15s
        ports:
        - containerPort: 8080
        resources:
          requests:
            cpu: 25m
        volumeMounts:
        - name: cadvisor-root
          mountPath: /rootfs
          readOnly: true
        - name: cadvisor-run
          mountPath: /var/run
        - name: cadvisor-sys
          mountPath: /sys
          readOnly: true
        - name: cadvisor-docker
          mountPath: /var/lib/docker
          readOnly: true
        - name: cadvisor-disk
          mountPath: /dev/disk
      priorityClassName: micado-priority
      volumes:
      - name: cadvisor-root
        hostPath:
          path: /
      - name: cadvisor-run
        hostPath:
          path: /var/run
      - name: cadvisor-sys
        hostPath:
          path: /sys
      - name: cadvisor-docker
        hostPath:
          path: /var/lib/docker
      - name: cadvisor-disk
        hostPath:
          path: /dev/disk