diff --git a/deploy/deployment.yaml b/deploy/deployment.yaml index 572da41..b9fbb86 100644 --- a/deploy/deployment.yaml +++ b/deploy/deployment.yaml @@ -20,6 +20,24 @@ spec: labels: app: allocation-api spec: + - name: allocation-api-metrics + image: 926803513772.dkr.ecr.eu-west-1.amazonaws.com/offender-management/offender-management-allocation-api:latest + imagePullPolicy: Always + command: ['sh', '-c', "bundle exec puma prometheus_exporter --pidfile /tmp/server.pid"] + ports: + - containerPort: 9394 + livenessProbe: + httpGet: + path: /metrics + port: 9394 + initialDelaySeconds: 10 + periodSeconds: 60 + readinessProbe: + httpGet: + path: /metrics + port: 9394 + initialDelaySeconds: 10 + periodSeconds: 60 containers: - name: allocation-api image: 926803513772.dkr.ecr.eu-west-1.amazonaws.com/offender-management/offender-management-allocation-api:latest @@ -89,43 +107,3 @@ spec: secretKeyRef: name: allocation-api-secrets key: nomis_oauth_pub_key - ---- - -apiVersion: extensions/v1beta1 -kind: Deployment -metadata: - name: allocation-api-metrics - labels: - app: allocation-api-metrics -spec: - replicas: 1 - revisionHistoryLimit: 1 - minReadySeconds: 10 - selector: - matchLabels: - app: allocation-api-metrics - template: - metadata: - labels: - app: allocation-api-metrics - spec: - containers: - - name: allocation-api-metrics - image: 926803513772.dkr.ecr.eu-west-1.amazonaws.com/offender-management/offender-management-allocation-api:latest - imagePullPolicy: Always - command: ['sh', '-c', "bundle exec puma prometheus_exporter --pidfile /tmp/server.pid"] - ports: - - containerPort: 9394 - livenessProbe: - httpGet: - path: /metrics - port: 9394 - initialDelaySeconds: 10 - periodSeconds: 60 - readinessProbe: - httpGet: - path: /metrics - port: 9394 - initialDelaySeconds: 10 - periodSeconds: 60