:hedgehog: PostHog is the leading platform for building self-driving products. Our developer tools – AI observability, analytics, session replay, flags, experiments, error tracking, logs, and more – capture all the context agents need to diagnose problems, uncover opportunities, and ship fixes. Steer it all from Slack, web, desktop, or the MCP.
Python ab-testingai-analyticsanalyticscdpdata-warehouseexperimentsfeature-flagsjavascriptproduct-analyticspythonreactsession-replaysurveystypescriptweb-analytics
#!/usr/bin/env bash
#
# Claim a flags-cache-jumphost pod from the dev pool, drop into bash, and
# auto-delete the pod on exit. Thin shim that delegates to
# tools/infra-scripts/clitools/toolbox.py with --pool flags-cache-jumphost
# and --auto-delete; all the orphan-relabel-claim logic lives there.
#
# The pool runs on the posthog-app golden chart, in namespace
# `flags-cache-jumphost`, in every environment. KUBE_NAMESPACE overrides it.
#
# Prerequisites:
# - kubectl context pointing at the target cluster, or pass
# KUBE_CONTEXT=… (e.g. KUBE_CONTEXT=dev-eks).
#
# Usage:
# bin/rust-jumphost # claim + connect
# KUBE_CONTEXT=dev-eks bin/rust-jumphost
# KUBE_NAMESPACE=<namespace> bin/rust-jumphost # override the pool namespace
# bin/rust-jumphost --claim-duration 4 # 4h claim window
#
# Inside the pod:
# warm-flags-cache --help
# warm-flags-cache --team-ids <id> --no-stagger
set -euo pipefail
if ! command -v kubectl >/dev/null 2>&1; then
echo "Error: kubectl not found on PATH."
exit 1
fi
REPO_ROOT="$(cd "$(dirname "$0")/.." && pwd)"
exec "$REPO_ROOT/tools/infra-scripts/clitools/toolbox.py" \
--pool flags-cache-jumphost \
--auto-delete \
"$@"