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