From 590339855909800473575a7a27671fc0c7c3679b Mon Sep 17 00:00:00 2001 From: Marcus Aspin Date: Sat, 28 Oct 2023 09:44:27 +0000 Subject: [PATCH] PI-1513 Disable event publishers in read-only mode This prevents endless polling of the standby database, as we cannot delete from the offender_delta or domain_event tables --- .github/workflows/readonly.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.github/workflows/readonly.yml b/.github/workflows/readonly.yml index 96c6bdcf3f..d08774f297 100644 --- a/.github/workflows/readonly.yml +++ b/.github/workflows/readonly.yml @@ -61,3 +61,10 @@ jobs: '.spec.template.spec.containers[0].env |= map(if .name == $name then .valueFrom.secretKeyRef.key = $value else . end)' \ | kubectl apply -f - done + + - name: Stop/start event publishers + env: + replicas: ${{ inputs.action == 'enable' && '0' || '1' }} + run: | + kubectl scale deploy domain-events-and-delius --replicas "$replicas" + kubectl scale deploy offender-events-and-delius --replicas "$replicas"