apiVersion: apps/v1
kind: Deployment
metadata:
  name: dcs-app-uat
spec:
  replicas: 2
  template:
    metadata:
      labels:
        app: dcs-app-uat
    spec:
      containers:
        - name: data-capture-service
          image: 754256621582.dkr.ecr.eu-west-2.amazonaws.com/cica/cica-repo-uat:latest
          imagePullPolicy: Always
          ports:
            - containerPort: 3100
          env:
            - name: DCS_JWT_SECRET
              valueFrom:
                secretKeyRef:
                  name: data-capture-service-secrets
                  key: dcs_jwt_secret
            - name: DATABASE_URL_WITH_CREDENTIALS
              valueFrom:
                secretKeyRef:
                  name: shared-secrets
                  key: database_url_with_credentials
            - name: DCS_LOG_LEVEL
              value: info
            - name: MESSAGE_BUS_URL
              valueFrom:
                secretKeyRef:
                  name: shared-secrets
                  key: message_bus_url
            - name: MESSAGE_BUS_CREDENTIALS
              valueFrom:
                secretKeyRef:
                  name: shared-secrets
                  key: message_bus_credentials
            - name: NOTIFY_API_KEY
              valueFrom:
                secretKeyRef:
                  name: shared-secrets
                  key: notify_api_key
            - name: DCS_URL
              value: https://data-capture-service.uat.claim-criminal-injuries-compensation.service.justice.gov.uk
            - name: APP_ENV
              value: uat
            - name: WEBHOOK_TEAM_REPORTER_SLACK
              valueFrom:
                secretKeyRef:
                  name: shared-secrets
                  key: webhook_team_reporter_slack
            - name: WEBHOOK_DEV_REPORTER_SLACK
              valueFrom:
                secretKeyRef:
                  name: shared-secrets
                  key: webhook_dev_reporter_slack
            - name: WEBHOOK_SUPPORTTEAM_REPORTER_SLACK
              valueFrom:
                secretKeyRef:
                  name: shared-secrets
                  key: webhook_supportteam_reporter_slack
  selector:
    matchLabels:
      app: dcs-app-uat
