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