apiVersion: apps/v1
kind: Deployment
metadata:
  labels:
    app: poi
    env: dev
    owner: team3
    version: v1
  name: po-deployment
spec:
  replicas: 1
  selector:
    matchLabels:
      app: poi
      env: dev
      owner: team3
      version: v1
  template:
    metadata:
      labels:
        app: poi
        env: dev
        owner: ymallipe
        version: v1
    spec:
      containers:
      - image: "registryajv1184.azurecr.io/tripinsights/poi:1.0"
        imagePullPolicy: Always
        name: poi
        env:
        - name: SQL_SERVER
          valueFrom:
            secretKeyRef:
              name: mysql
              key: server
        - name: SQL_USER
          valueFrom:
            secretKeyRef:
              name: mysql
              key: username
        - name: SQL_PASSWORD
          valueFrom:
            secretKeyRef:
              name: mysql
              key: password
        ports:
          - name: http
            containerPort: 8084
            protocol: TCP