From c660212989c5220bb0f939cea0a7c24e69425719 Mon Sep 17 00:00:00 2001 From: Frank Hamand Date: Mon, 2 Oct 2023 11:21:00 +0100 Subject: [PATCH] Revert "feat: Add kafka rack aware injection on docker-server" (#17710) Revert "feat: Add kafka rack aware injection on docker-server (#17541)" This reverts commit 789bc23c91cef6c4cb4882d4691c8aa50f625a60. --- bin/docker-server | 7 ------- 1 file changed, 7 deletions(-) diff --git a/bin/docker-server b/bin/docker-server index d21a6c85bb362..274df8dd061d1 100755 --- a/bin/docker-server +++ b/bin/docker-server @@ -11,13 +11,6 @@ trap 'rm -rf "$PROMETHEUS_MULTIPROC_DIR"' EXIT export PROMETHEUS_METRICS_EXPORT_PORT=8001 export STATSD_PORT=${STATSD_PORT:-8125} -if [[ -n $INJECT_EC2_CLIENT_RACK ]]; then - # To avoid cross-AZ Kafka traffic, set KAFKA_CLIENT_RACK from the EC2 metadata endpoint. - # TODO: switch to the downwards API when https://github.com/kubernetes/kubernetes/issues/40610 is released - TOKEN=$(curl --max-time 0.1 -X PUT "http://169.254.169.254/latest/api/token" -H "X-aws-ec2-metadata-token-ttl-seconds: 21600") - export KAFKA_CLIENT_RACK=$(curl --max-time 0.1 -H "X-aws-ec2-metadata-token: $TOKEN" -v http://169.254.169.254/latest/meta-data/placement/availability-zone-id) -fi - exec gunicorn posthog.wsgi \ --config gunicorn.config.py \ --bind 0.0.0.0:8000 \