apiVersion: apps/v1
kind: Deployment
metadata:
  name: usage-report
  namespace: namespace-usage-report
spec:
  replicas: 1
  selector:
    matchLabels:
      app: usage-report-app
  template:
    metadata:
      labels:
        app: usage-report-app
    spec:
      containers:
        - name: usage-report
          image: ministryofjustice/cloud-platform-namespace-usage-report:1.9
          env:
            - name: RACK_ENV
              value: "production"
            - name: API_KEY
              valueFrom:
                secretKeyRef:
                  name: usage-report-api-key
                  key: token
          ports:
          - containerPort: 4567
