apiVersion: apps/v1
kind: DaemonSet
metadata:
  name: kptureds
  labels:
    kpture: kptureDs
spec:
  selector:
    matchLabels:
      name: kptureDs
  template:
    metadata:
      labels:
        name: kptureDs
    spec:
      tolerations:
      # this toleration is to have the daemonset runnable on master nodes
      # remove it if your masters can't run pods
      - key: node-role.kubernetes.io/master
        operator: Exists
        effect: NoSchedule
      containers:
      - name: kpture-server
        image: gmtstephane/kpture-server:v0.2.0
        env:
        - name: CTRNAMEPSACE
          value: "moby"
        ports:
        - containerPort: 8080
        volumeMounts:
         - name: ctrsock
           mountPath: /var/snap/microk8s/common/run/containerd.sock
         - name: proc
           mountPath: /proc/
        securityContext:
          privileged: true
      volumes:
      - name: ctrsock
        hostPath:
          path: /run/containerd/containerd.sock
      - name: proc 
        hostPath:
          path: /proc/
