kind: DaemonSet
apiVersion: apps/v1
metadata:
  name: csi-chdfslauncher
  namespace: kube-system
spec:
  selector:
    matchLabels:
      app: csi-chdfslauncher
  template:
    metadata:
      labels:
        app: csi-chdfslauncher
    spec:
      hostNetwork: true
      containers:
        - name: chdfs-launcher
          securityContext:
            privileged: true
            capabilities:
              add: ["SYS_ADMIN"]
            allowPrivilegeEscalation: true
          image: ccr.ccs.tencentyun.com/ccs-dev/csi-launcher:v1.0.0
          imagePullPolicy: "Always"
          volumeMounts:
            - name: launcher-socket-dir
              mountPath: /tmp
            - name: pods-mount-dir
              mountPath: /var/lib/kubelet/pods
              mountPropagation: "Bidirectional"
            - mountPath: /dev
              name: host-dev
            - mountPath: /sys
              name: host-sys
            - mountPath: /lib/modules
              name: lib-modules
              readOnly: true
      volumes:
        - name: launcher-socket-dir
          hostPath:
            path: /etc/csi-chdfs
            type: DirectoryOrCreate
        - name: pods-mount-dir
          hostPath:
            path: /var/lib/kubelet/pods
            type: Directory
        - name: host-dev
          hostPath:
            path: /dev
        - name: host-sys
          hostPath:
            path: /sys
        - name: lib-modules
          hostPath:
            path: /lib/modules