apiVersion: apps/v1
kind: Deployment
metadata:
  name: loclinkvis
  namespace: production
spec:
  selector:
    matchLabels:
      app: loclinkvis
  strategy:
    type: Recreate
  replicas: 1
  template:
    metadata:
      labels:
        app: loclinkvis
    spec:
      containers:
      - image: openstatefoundation/loclinkvis:0.2019.2
        name: loclinkvis
        ports:
        - containerPort: 8080
        env:
        - name: MONGODB_HOST
          value: localhost
        resources:
          requests:
            memory: 50M
            cpu: 10m
      - image: mongo:3.6
        name: mongodb
        ports:
        - containerPort: 27017
        volumeMounts:
        - mountPath: /data/db
          name: mongodata
        resources:
          requests:
            memory: 500M
            cpu: 20m
      volumes:
      - name: mongodata
        persistentVolumeClaim:
          claimName: mongodata
      nodeSelector:
        cloud.google.com/gke-preemptible: "true"
