# The deployment for cstor-pool and cstor-pool-mgmt.

apiVersion: apps/v1
kind: Deployment
metadata:
  name: cstor-pool-deploy
  labels:
    app: cstor-pool
spec:
  replicas: 1
  selector:
    matchLabels:
      app: cstor-pool
  template:
    metadata:
      labels:
        app: cstor-pool
    spec:
      containers:
      - name: cstor-pool
        image: openebs/cstor-main:ci
        ports:
        - containerPort: 80
        securityContext: 
          privileged: true

        volumeMounts:
        - name: device
          mountPath: /dev     
        - name: tmp
          mountPath: /tmp
          mountPropagation: Bidirectional

      - name:    cstor-pool-mgmt
        image: openebs/cstor-pool-mgmt:ci
        ports:
        - containerPort: 80
        securityContext: 
          privileged: true
        volumeMounts:
        - name: device
          mountPath: /dev
        - name: tmp
          mountPath: /tmp
          mountPropagation: Bidirectional

      volumes:
      - name: device
        hostPath:
          # directory location on host
          path: /dev
          # this field is optional
          type: Directory
      - name: tmp
        hostPath:
          path: /tmp
          type: Directory
