apiVersion: apps/v1
kind: Deployment
metadata:
  name: poi
  namespace: api
spec:
  replicas: 3
  selector:
    matchLabels:
      app: poi
  template:
    metadata:
      labels:
        app: poi
    spec:
      containers:
      - name: poi
        image: registrydoy6068.azurecr.io/tripinsights/poi:1.0
        ports:
        - containerPort: 80
          name: poi
        env:
        - name: SQL_PASSWORD
          valueFrom:
            secretKeyRef:
              name: sqlserver
              key: password
        - name: SQL_SERVER
          valueFrom:
            configMapKeyRef:
              name: sqlserver-configmap
              key: sql_server
        - name: SQL_USER
          valueFrom:
            configMapKeyRef:
              name: sqlserver-configmap
              key: sql_user
        - name: SQL_DBNAME
          valueFrom:
            configMapKeyRef:
              name: sqlserver-configmap
              key: sql_dbname
