kind: Deployment
apiVersion: apps/v1
metadata:
  name: dealer-funding-service-cav
  namespace: dealer-qa
  labels:
    aadpodidbinding: dealer-funding-service
    app.kubernetes.io/component: service
    app.kubernetes.io/name: dealer-funding-service
    app.kubernetes.io/part-of: dealer-funding-service
spec:
  replicas: 1
  selector:
    matchLabels:
      app: dealer-funding-service-cavtest
  template:
    metadata:
      labels:
        aadpodidbinding: dealer-funding-service
        app: dealer-funding-service-cavtest
        app.kubernetes.io/component: service
        app.kubernetes.io/name: dealer-funding-service
        app.kubernetes.io/part-of: dealer-funding-service
        azure.workload.identity/use: 'true'
        component: dealer-funding-service
    spec:
      volumes:
        - name: tmp-writable
          emptyDir: {}
      containers:
        - name: dealer-funding-service
          image: gmfdevtestmyaccountacr.azurecr.io/dealer-funding-service:2127669
          ports:
            - containerPort: 8080
              protocol: TCP
          volumeMounts:
            - name: tmp-writable
              mountPath: /tmp
          env:
            - name: COVERAGE_BASE_PATH
              value: "/tmp"
            - name: ASPNETCORE_ENVIRONMENT
              valueFrom:
                configMapKeyRef:
                  name: dealer-shared
                  key: aspnetcore.environment
            - name: azureKeyVault__name
              valueFrom:
                configMapKeyRef:
                  name: dealer-shared
                  key: azureKeyVault.name
            - name: ai__connectionstring
              valueFrom:
                configMapKeyRef:
                  name: dealer-shared
                  key: ai.connectionString
            - name: ai__enabled
              value: 'true'
            - name: serilog__MinimumLevel__Default
              valueFrom:
                configMapKeyRef:
                  name: dealer-funding
                  key: serilog.MinimumLevel.Default
            - name: logging__LogLevel__Default
              valueFrom:
                configMapKeyRef:
                  name: dealer-funding
                  key: logging.LogLevel.Default
          resources:
            limits:
              cpu: 500m
              memory: 512Mi
            requests:
              cpu: 100m
              memory: 256Mi
          livenessProbe:
            httpGet:
              path: /health
              port: 8080
              scheme: HTTP
            initialDelaySeconds: 15
            timeoutSeconds: 60
            periodSeconds: 1200
            successThreshold: 1
            failureThreshold: 10
          readinessProbe:
            httpGet:
              path: /health
              port: 8080
              scheme: HTTP
            initialDelaySeconds: 15
            timeoutSeconds: 2
            periodSeconds: 5
            successThreshold: 2
            failureThreshold: 4
          terminationMessagePath: /dev/termination-log
          terminationMessagePolicy: File
          imagePullPolicy: Always
          securityContext:
            runAsNonRoot: true
            readOnlyRootFilesystem: true
            allowPrivilegeEscalation: false
            appArmorProfile:
              type: Localhost
              localhostProfile: cri-containerd.apparmor.d
      restartPolicy: Always
      terminationGracePeriodSeconds: 30
      dnsPolicy: ClusterFirst
      serviceAccountName: azure-msi
      serviceAccount: azure-msi
      automountServiceAccountToken: false
      securityContext: {}
      schedulerName: default-scheduler
  strategy:
    type: RollingUpdate
    rollingUpdate:
      maxUnavailable: 25%
      maxSurge: 25%
  revisionHistoryLimit: 10
  progressDeadlineSeconds: 600