apiVersion: v1
kind: Pod
metadata:
  name: test-pod
  labels:
    app: test-pod
spec:
  initContainers:
  - name: storageos-init
    image: storageos/init:test
    env:
      - name: NODE_IMAGE
        value: storageos/node:1.4.0
    volumeMounts:
      - name: kernel-modules
        mountPath: /lib/modules
        readOnly: true
      - name: sys
        mountPath: /sys
        mountPropagation: Bidirectional
      - name: state
        mountPath: /var/lib/storageos
        mountPropagation: Bidirectional
    securityContext:
      privileged: true
      capabilities:
        add:
        - SYS_ADMIN
  containers:
  - name: test-app
    image: busybox
    command: ['sh', '-c', 'echo Hello Kubernetes! && sleep 3600']
  volumes:
    - name: kernel-modules
      hostPath:
        path: /lib/modules
    - name: sys
      hostPath:
        path: /sys
    - name: state
      hostPath:
        path: /var/lib/storageos
