apiVersion: apps/v1
kind: Deployment
metadata:
  name: cortex
  namespace: thehive
  labels:
    app.kubernetes.io/name: cortex
    app.kubernetes.io/part-of: thehive
spec:
  replicas: 1
  selector:
    matchLabels:
      app.kubernetes.io/name: cortex
      app.kubernetes.io/part-of: thehive
  strategy:
    rollingUpdate:
      maxSurge: 1
      maxUnavailable: 1
    type: RollingUpdate
  template:
    metadata:
      labels:
        app.kubernetes.io/name: cortex
        app.kubernetes.io/part-of: thehive
    spec:
      serviceAccountName: cortex
      containers:
      - name: cortex
        image: jonpulsifer/cortex
        imagePullPolicy: Always
        ports:
        - containerPort: 9001
          protocol: TCP
        volumeMounts:
          - name: dockersock
            mountPath: "/var/run/docker.sock"
          - name: host-tmp
            mountPath: "/tmp"
        securityContext:
          runAsUser: 0
      volumes:
      - name: dockersock
        hostPath:
          path: /var/run/docker.sock
      - name: host-tmp
        hostPath:
          path: /tmp
