apiVersion: apps/v1
kind: Deployment
metadata:
  name: trips-deployment
  namespace: api
  labels: 
    app: trips
spec:
  replicas: 2
  selector:
    matchLabels:
      app: trips
  template:
    metadata:
      labels:
        app: trips
    spec:
      containers:
      - name: trips
        image: registryrnr9881.azurecr.io/trips:v1
        ports:
        - containerPort: 80
        volumeMounts:
        - name: secrets-store01-inline
          mountPath: "/mnt/secrets-store"
          readOnly: true
        env:
          - name: ASPNETCORE_ENVIRONMENT
            value: Development
          - name: SQL_SERVER
            value: sqlserverrnr9881.database.windows.net
      volumes:
        - name: secrets-store01-inline
          csi:
           driver: secrets-store.csi.k8s.io
           readOnly: true
           volumeAttributes:
            secretProviderClass: "azure-kvname-user-msi"
     