---
apiVersion: apps/v1
kind: Deployment
metadata:
  name: poi
  labels:
    app: poi
spec:
  replicas: 1
  selector:
    matchLabels:
      app: poi
  template:
    metadata:
      labels:
        app: poi
    spec:
      containers:
      - name: poi
        image: registryzxc7268.azurecr.io/poi:latest
        ports:
        - containerPort: 80
          name: http
          protocol: TCP
        env:
        - name: SQL_SERVER
          valueFrom:
            secretKeyRef:
              name: db-connection
              key: SQL_HOST
        - name: SQL_USER
          valueFrom:
            secretKeyRef:
              name: db-connection
              key: SQL_USERNAME
        - name: SQL_PASSWORD
          valueFrom:
            secretKeyRef:
              name: db-connection
              key: SQL_PASSWORD
        - name: SQL_DBNAME
          valueFrom:
            secretKeyRef:
              name: db-connection
              key: SQL_DATABASE