apiVersion: apps/v1
kind: Deployment
metadata:
  labels:
    run:  iot-connected-vehicle-dashboard
  name:  iot-connected-vehicle-dashboard
spec:
  replicas: 2
  selector:
    matchLabels:
      run:  iot-connected-vehicle-dashboard
  template:
    metadata:
      labels:
        run:  iot-connected-vehicle-dashboard
        name:  iot-connected-vehicle-dashboard
    spec:
      containers:
        - env:
            - name: spring.rabbitmq.host
              value: rabbitmq
            - name: spring_rabbitmq_username
              valueFrom:
                secretKeyRef:
                  name: vehicle-secrets
                  key: spring_rabbitmq_username
            - name: spring_rabbitmq_password
              valueFrom:
                secretKeyRef:
                  name: vehicle-secrets
                  key: spring_rabbitmq_password
            - name: spring.data.gemfire.pool.locators
              valueFrom:
                configMapKeyRef:
                  name: vehicle-configmap
                  key: spring.data.gemfire.pool.locators
          image: nyla/iot-connected-vehicle-dashboard:0.0.2-SNAPSHOT
          imagePullPolicy: Always
          name: iot-connected-vehicle-dashboard
