apiVersion: apps/v1
kind: Deployment
metadata:
  name: userprofile
  namespace: api
  labels:
    app: userprofile
spec:
  replicas: 1
  selector:
    matchLabels:
      app: userprofile
  template:
    metadata:
      labels:
        app: userprofile
    spec:
      containers:
        - name: userprofile
          image: registryahg5580.azurecr.io/tripinsights/userprofile:1.0
          volumeMounts:
            - name: secrets-store-inline
              mountPath: "/secrets"
              readOnly: true
          env:
            - name: PORT
              value: "80"
          resources:
            requests:
              cpu: 100m
              memory: 256Mi
            limits:
              cpu: 250m
              memory: 512Mi
          ports:
            - containerPort: 80
              name: userprofile
      volumes:
        - name: secrets-store-inline
          csi:
            driver: secrets-store.csi.k8s.io
            readOnly: true
            volumeAttributes:
              secretProviderClass: "secret-provider"
