apiVersion: apps/v1
kind: Deployment
metadata:
  name: userprofile
  labels:
    app: userprofile
  namespace: api
spec:
  replicas: 1
  selector:
    matchLabels:
      app: userprofile
  template:
    metadata:
      labels:
        app: userprofile
    spec:
      containers:
      - name: userprofile
        image: registryyel3358.azurecr.io/tripinsights/userprofile:1.0
        resources:
          requests:
            cpu: 500m
            memory: 128Mi
        ports:
        - containerPort: 80
        env:
        - name: SQL_SERVER
          value: "sqlserveryel3358.database.windows.net"
        - name: SQL_DBNAME
          value: "mydrivingDB"
        - name: SQL_USER
          value: "sqladminyEl3358"
        volumeMounts:
        - name: my-az-kv-secrets
          mountPath: "/secrets"
          readOnly: true
      volumes:
      - name: my-az-kv-secrets
        csi:
          driver: secrets-store.csi.k8s.io
          readOnly: true
          volumeAttributes:
            secretProviderClass: "azure-tripinsightskv-env"