apiVersion: apps/v1
kind: Deployment
metadata:
  name: nlp-deployment
spec:
  replicas: 1
  selector:
    matchLabels:
      component: nlp
  template:
    metadata:
      labels:
        component: nlp
    spec:
      volumes:
        - name: google-cloud-key
          secret:
            secretName: nlp-key
      containers:
        - name: nlp
          image: ${DOCKER_USER}/nlp:${BUILD_VERSION}
          volumeMounts:
            - name: google-cloud-key
              mountPath: /var/secrets/google
          env:
            - name: BROKER_HOST
              value: broker
            - name: BROKER_PORT
              value: '15674'
            - name: GOOGLE_APPLICATION_CREDENTIALS
              value: /var/secrets/google/key.json
          resources:
            requests:
              memory: "100M"
              cpu: "10m"
