apiVersion: apps/v1
kind: DaemonSet
metadata:
  name: lxcfs
  namespace: lxcfs
  labels:
    name: lxcfs
spec:
  selector:
    matchLabels:
      name: lxcfs
  template:
    metadata:
      labels:
        name: lxcfs
    spec:
      hostPID: true
      hostNetwork: true
      tolerations:
        - operator: Exists
      containers:
        - image: ccr.ccs.tencentyun.com/tkeimages/lxcfs:4.0
          imagePullPolicy: Always
          command: ["/start.sh"]
          args: ["5", "/var/lib/lxc"]
          name: lxcfs
          resources:
            limits:
              memory: 500Mi
              cpu: 500m
          securityContext:
            privileged: true
          volumeMounts:
            - name: lxcfs
              mountPath: /var/lib/lxc/lxcfs
              mountPropagation: Bidirectional
      volumes:
        - name: lxcfs
          hostPath:
            path: /var/lib/lxc/lxcfs
            type: DirectoryOrCreate
  updateStrategy:
    type: OnDelete
