---
kind: DaemonSet
apiVersion: apps/v1
metadata:
  name: daemonset-qumulo-ephemeral
spec:
  selector:
    matchLabels:
      app: daemonset-qumulo-ephemeral
  template:
    metadata:
      labels:
        app: daemonset-qumulo-ephemeral
    spec:
      nodeSelector:
        kubernetes.io/os: linux
      containers:
        - name: nginx
          image: mcr.microsoft.com/oss/nginx/nginx:1.19.5
          command:
            - "/bin/bash"
            - "-c"
            - set -euo pipefail; while true; do echo $(date) >> /mnt/nfs/outfile; sleep 1; done
          volumeMounts:
            - name: nfs
              mountPath: "/mnt/nfs"
              readOnly: false
      volumes:
        - name: nfs
          ephemeral:
            volumeClaimTemplate:
              spec:
                accessModes:
                  - ReadWriteOnce
                resources:
                  requests:
                    storage: 10Gi
                storageClassName: qumulo-csi
