apiVersion: apps/v1
kind: Deployment
metadata:
  name: poi
spec:
  replicas: 1
  selector:
    matchLabels:
      app: poi
  template:
    metadata:
      labels:
        app: poi
    spec:
      containers:
      - name: poi
        image: registryzyo9157.azurecr.io/poi:latest
        ports:
        - containerPort: 80
          name: http
        env:
          - name: SQL_DBNAME
            value: mydrivingDB
          - name: SQL_SERVER
            value: sqlserverzyo9157.database.windows.net
          - name: ASPNETCORE_ENVIRONMENT
            value: Local         
        resources:
          requests:
            cpu: 250m
            memory: 64Mi
          limits:
            cpu: 500m
            memory: 256Mi
        volumeMounts:
        - name: secrets-store-inline
          mountPath: "/secrets"
          readOnly: true
      volumes:
      - name: secrets-store-inline
        csi:
          driver: secrets-store.csi.k8s.io
          readOnly: true
          volumeAttributes:
            secretProviderClass: "azure-kvname"
            namespace: api
          nodePublishSecretRef:              
            name: secrets-store-creds 