apiVersion: apps/v1
kind: Deployment
metadata:
  name: poi-deployment
  namespace: api
  labels:
    deploy: poi
spec:
  replicas: 2
  selector:
    matchLabels:
      app: poi
  template:
    metadata:
      labels:
        app: poi
    spec:
      containers:
      - image: "registrybyd5320.azurecr.io/tripinsights/poi:1.0"
        imagePullPolicy: Always
        name: poi
        ports:
        - containerPort: 80
          name: http
          protocol: TCP
        - containerPort: 443
          name: https
          protocol: TCP
        env:
        - name: WEB_PORT
          value: '80'
        - name: WEB_SERVER_BASE_URI
          value: 'http://0.0.0.0'
        - name: ASPNETCORE_ENVIRONMENT
          value: 'Local'
        - name: CONFIG_FILES_PATH
          value: '/mnt/secrets-store'
        volumeMounts:
        - name: secrets-store01-inline
          mountPath: "/mnt/secrets-store"
          readOnly: true
      volumes:
        - name: secrets-store01-inline
          csi:
            driver: secrets-store.csi.k8s.io
            readOnly: true
            volumeAttributes:
              secretProviderClass: "azure-kvtrips"