---
apiVersion: apps/v1
kind: StatefulSet
metadata:
  name: app-busybox
  labels:
    lkey: lvalue
spec:
  selector:
    matchLabels:
      lkey: lvalue
  template:
    metadata:
      labels:
        lkey: lvalue
    spec:
      containers:
      - name: app-busybox
        image: gcr.io/google-containers/busybox
        imagePullPolicy: IfNotPresent
        command:
           - sh
           - -c
           - 'date > /busybox/date.txt; sync; sleep 5; sync; tail -f /dev/null;'
        volumeMounts:
        - name: testclaim
          mountPath: /busybox
  volumeClaimTemplates:
  - metadata:
      name: testclaim
    spec:
      accessModes: [ "ReadWriteOnce" ]
      storageClassName: testclass
      resources:
        requests:
          storage: teststorage