apiVersion: apps/v1
kind: Deployment
metadata:
  name: ws-tracker
spec:
  selector:
    matchLabels:
      app: tracker-service
  replicas: 1
  template:
    metadata:
      labels:
        app: tracker-service
    spec:
      containers:
      - name: service
        image: alexmilowski/tracker-service:0.9.3.0006
        resources:
          limits:
            cpu: 1
            memory: 1Gi
        ports:
        - containerPort: 8888
        env:
        - name: MY_NAMESPACE
          valueFrom:
            fieldRef:
              fieldPath: metadata.namespace
        - name: GUNICORN_WORKERS
          valueFrom:
            configMapKeyRef:
              name: tracker-gunicorn
              key: workers
        - name: GUNICORN_TIMEOUT
          valueFrom:
            configMapKeyRef:
              name: tracker-gunicorn
              key: timeout
        volumeMounts:
        - mountPath: /conf
          name: config
        - mountPath: /logs
          name: logs
      volumes:
        - name: logs
          emptyDir: {}
        - name: config
          configMap:
            name: tracker-config
            items:
            - key: service
              path: service.json
