apiVersion: apps/v1
kind: DaemonSet
metadata:
  name: lvm-clean
  namespace: rook-ceph
  labels:
    app: lvm-clean
spec:
  selector:
    matchLabels:
      app: lvm-clean
  template:
    metadata:
      labels:
        app: lvm-clean
    spec:
      hostNetwork: true
      hostPID: true
      initContainers:
      - name: iscsi-installation
        command:
          - nsenter
          - --mount=/proc/1/ns/mnt
          - --
          - bash
          - -c
          - sudo rm -R /var/lib/rook|true  && ls -al && echo "DONE"
        image: alpine:3.12
        securityContext:
          privileged: true
      containers:
      - name: sleep
        image: k8s.gcr.io/pause:3.1
  updateStrategy:
    type: RollingUpdate

