Files
capsule/hack/distro/host-proxy/deploy.yaml
Oliver Bähler 0abc77b56a feat: diverse performance improvements (#1861)
Signed-off-by: Oliver Bähler <oliverbaehler@hotmail.com>
2026-02-03 22:05:00 +01:00

43 lines
1.2 KiB
YAML

apiVersion: apps/v1
kind: Deployment
metadata:
name: capsule
namespace: monitoring-system
labels:
app: capsule
spec:
replicas: 1
selector:
matchLabels:
app: capsule
template:
metadata:
labels:
app: capsule
annotations:
profiles.grafana.com/memory.scrape: "true"
profiles.grafana.com/memory.port: "8082"
profiles.grafana.com/cpu.scrape: "true"
profiles.grafana.com/cpu.port: "8082"
profiles.grafana.com/goroutine.scrape: "true"
profiles.grafana.com/goroutine.port: "8082"
spec:
containers:
- name: capsule
image: alpine/socat
ports:
- name: metrics
containerPort: 8080
- name: profiling
containerPort: 8082
command: ["sh", "-c"]
args:
- |
set -e
echo "Starting TCP proxy to ${LAPTOP_HOST_IP}..."
# Forward 8080 -> TARGET_HOST:8080
socat TCP-LISTEN:8080,fork,reuseaddr TCP:${LAPTOP_HOST_IP}:8080 &
# Forward 8082 -> TARGET_HOST:8082
socat TCP-LISTEN:8082,fork,reuseaddr TCP:${LAPTOP_HOST_IP}:8082 &
wait