apiVersion: apps/v1
kind: Deployment
metadata:
  labels:
    app: locations-consumer
  name: locations-consumer
spec:
  replicas: 1
  selector:
    matchLabels:
      app: locations-consumer
  template:
    metadata:
      labels:
        app: locations-consumer
    spec:
      containers:
      - image: vykhvan/udaconnect-locations-consumer:latest
        name: locations-consumer
        imagePullPolicy: Always
        env:
        - name: KAFKA_SERVER
          valueFrom:
            configMapKeyRef:
              name: kafka
              key: KAFKA_SERVER
        - name: DB_USERNAME
          valueFrom:
            configMapKeyRef:
              name: db-locations
              key: DB_USERNAME
        - name: DB_PASSWORD
          valueFrom:
            secretKeyRef:
              name: db-secret
              key: DB_PASSWORD
        - name: DB_NAME
          valueFrom:
            configMapKeyRef:
              name: db-locations
              key: DB_NAME
        - name: DB_HOST
          valueFrom:
            configMapKeyRef:
              name: db-locations
              key: DB_HOST
        - name: DB_PORT
          valueFrom:
            configMapKeyRef:
              name: db-locations
              key: DB_PORT
        