---
apiVersion: apps/v1
kind: Deployment
metadata:
  namespace: default
  name: phantserver
  labels:
    app: phant

spec:
  replicas: 1
  selector:
    matchLabels:
      app: phant
  strategy:
    type: Recreate
  template:
    metadata:
      labels:
        app: phant
        version: v0.1.3
    spec:
      # nodeSelector:
      #   kubernetes.io/arch: arm
      containers:
        - name: phant
          image: dpcrook/phant_server-docker:0.1.3-arm32v7
          #imagePullPolicy: Always
          #resources:
          #  requests:
          #    cpu: 100m
          #    memory: 500Mi
          #  limits:
          #    cpu: 100m
          #    memory: 500Mi
          env:
            - name: PHANT_PORT
              value: "8888"
            - name: PHANT_TELNET_PORT
              value: "8889"
          args: [ "./.bin/serve" ]
          ports:
            - containerPort: 8888
              name: phant-http
          volumeMounts:
            - mountPath: /app/phant_streams/
              name: phantserver-persistent-storage
          workingDir: /app
      restartPolicy: Always
      volumes:
        - name: phantserver-persistent-storage
          persistentVolumeClaim:
            claimName: phantserver-persistent-claim
