apiVersion: apps/v1
kind: Deployment
metadata:
  name: trips-deployment
  namespace: api
  labels:
    app: trips
spec:
  replicas: 1
  selector:
    matchLabels:
      app: trips
  template:
    metadata:
      labels:
        app: trips
    spec:
      containers:
        - name: trips
          image: registryvpg9012.azurecr.io/tripinsights/trips:1.0
          volumeMounts:
            - mountPath: "/secrets"
              name: dbsecrets
              readOnly: true
          ports:
            - containerPort: 80
      volumes:
        - name: dbsecrets
          csi:
            driver: secrets-store.csi.k8s.io
            readOnly: true
            volumeAttributes:
              secretProviderClass: "azure-team3kv-user-msi"
