apiVersion: apps/v1
kind: Deployment
metadata:
  name: poi-deployment
  namespace: trip
  labels:
    app: poi
spec:
  replicas: 3
  selector:
    matchLabels:
      app: poipod
  template:
    metadata:
      labels:
        app: poipod
    spec:
      containers:
      - name: poi
        image: registryupn5885.azurecr.io/poi:1.0
        ports:
        - containerPort: 80
        env:
        - name: SQL_USER
          valueFrom:
            secretKeyRef:
              name: sql-secret
              key: SQL_USERNAME
        - name: SQL_PASSWORD
          valueFrom:
            secretKeyRef:
              name: sql-secret
              key: SQL_PASSWORD
        - name: SQL_SERVER
          valueFrom:
            secretKeyRef:
              name: sql-secret
              key: SQL_SERVER
        - name: SQL_DBNAME
          valueFrom:
            secretKeyRef:
              name: sql-secret
              key: SQL_DBNAME
        resources:
          requests:
            cpu: 100m
            memory: 200Mi
          limits:
            cpu: 100m
            memory: 200Mi

        