apiVersion: apps/v1
kind: DaemonSet
metadata:
  name: lxcfs
  namespace: lxcfs
  labels:
    name: lxcfs
spec:
  selector:
    matchLabels:
      name: lxcfs
  template:
    metadata:
      labels:
        name: lxcfs
    spec:
      priorityClassName: system-node-critical
      hostPID: true
      hostNetwork: true
      tolerations:
        - operator: Exists
      containers:
        - image: csighub.tencentyun.com/mulin/lxcfs:4.0.7
          imagePullPolicy: Always
          command: ["/start.sh"]
          args: ["5", "/var/lib/lxc"]
          name: lxcfs
          resources:
            limits:
              cpu: 100m
              memory: 100Mi
          securityContext:
            privileged: true
          volumeMounts:
            - name: lxcfs
              mountPath: /var/lib/lxc/lxcfs
              mountPropagation: Bidirectional
      affinity:
        nodeAffinity:
          requiredDuringSchedulingIgnoredDuringExecution:
            nodeSelectorTerms:
              - matchExpressions:
                  - key: kubernetes.io/hostname
                    operator: In
                    values:
                      - 9.219.9.91
                      - 9.219.9.92
                      - 9.219.9.93
                      - 9.219.9.95
      volumes:
        - name: lxcfs
          hostPath:
            path: /var/lib/lxc/lxcfs
            type: DirectoryOrCreate
  updateStrategy:
    type: OnDelete
