apiVersion: apps/v1 
kind: Deployment 
metadata: 
  name: poi 
  namespace: api-dev
spec: 
  selector: 
    matchLabels: 
      run: poi-label 
  replicas: 2 
  template: 
    metadata: 
      labels: 
        run: poi-label 
    spec: 
      containers: 
        - name: poi 
          image: registryzuh9724.azurecr.io/martha4splitthoff/poi:0.0.1
          volumeMounts:
          - name: poikv
            mountPath: /secrets
            readOnly: true
          ports: 
            - containerPort: 8080
              protocol: TCP
          env:
              - name: SQLPASSWORD
                value: rX0gc3Lz8
              - name: SQLSERVER
                value: sqlserverzuh9724.database.windows.net
              - name: SQLDBNAME
                value: mydrivingDB
      volumes:
      - name: poikv
        flexVolume:
          driver: "azure/kv"
          secretRef:
            name: kvcreds                  # [OPTIONAL] not required if using Pod Identity
          options:
            usepodidentity: "false"        # [OPTIONAL] if not provided, will default to "false"
            keyvaultname: "keyvault19"               # the name of the KeyVault
            keyvaultobjectnames: SQLUSER    # list of KeyVault object names (semi-colon separated)
            keyvaultobjecttypes: secret  # list of KeyVault object types: secret, key or cert (semi-colon separated)
            resourcegroup: "teamResources"              # [REQUIRED FOR < v0.0.14] the resource group of the KeyVault
            subscriptionid: "e9ebdd32-b7fa-4f0a-a24f-84f0abd95900"             # [REQUIRED FOR < v0.0.14] the subscription ID of the KeyVault
            tenantid: "d6135023-56cd-4f8d-9e4b-bdf44a027d79"                   # the tenant ID of the KeyVault
            keyvaultobjectaliases: "SQL_USER"
        

