From 7541c21486672819aa74b2ce4101185a1b4acf9b Mon Sep 17 00:00:00 2001 From: Jennifer Richards Date: Fri, 14 Jun 2024 17:51:21 -0300 Subject: [PATCH] chore: scoutapm shutdown fix (#7538) --- k8s/celery.yaml | 9 +++++++++ k8s/datatracker.yaml | 9 +++++++++ 2 files changed, 18 insertions(+) diff --git a/k8s/celery.yaml b/k8s/celery.yaml index 132e71761..e0e506269 100644 --- a/k8s/celery.yaml +++ b/k8s/celery.yaml @@ -26,6 +26,15 @@ spec: - name: scoutapm image: "scoutapp/scoutapm:version-1.4.0" imagePullPolicy: IfNotPresent + # Replace command with one that will shut down on a TERM signal + # The ./core-agent start command line is from the scoutapm docker image + command: + - "sh" + - "-c" + - >- + trap './core-agent shutdown --tcp 0.0.0.0:6590' TERM; + ./core-agent start --daemonize false --log-level debug --tcp 0.0.0.0:6590 & + wait $! livenessProbe: exec: command: diff --git a/k8s/datatracker.yaml b/k8s/datatracker.yaml index 977162313..ee8248927 100644 --- a/k8s/datatracker.yaml +++ b/k8s/datatracker.yaml @@ -24,6 +24,15 @@ spec: - name: scoutapm image: "scoutapp/scoutapm:version-1.4.0" imagePullPolicy: IfNotPresent + # Replace command with one that will shut down on a TERM signal + # The ./core-agent start command line is from the scoutapm docker image + command: + - "sh" + - "-c" + - >- + trap './core-agent shutdown --tcp 0.0.0.0:6590' TERM; + ./core-agent start --daemonize false --log-level debug --tcp 0.0.0.0:6590 & + wait $! livenessProbe: exec: command: