Files
egress-proxies-operator/docs/plans-executions/2026-08-11-2220-demo-scripts.md
Jan Novak 0d68111bc2 Add demo scripts: egress IP check and bulk proxy creation
docs/demo/show-egress-ips.sh probes each healthy proxy from the
discovery API against an IP-echo site; create-kubernetes-proxies.sh and
create-gcp-proxies.sh bulk-create demo Proxies, the gcp one spreading
them across randomly picked EU zones.

Co-Authored-By: Claude <noreply@anthropic.com>
2026-08-11 22:40:24 +02:00

1.9 KiB

Execution: Demo scripts

Plan: 2026-08-11-2220-demo-scripts.md

  • Step 0 — Branch feat/demo-scripts + plan commit
  • Step 1 — docs/demo/show-egress-ips.sh
  • Extra (added iteratively, not in the original plan) — proxy-creation scripts

Step 0 + Step 1

Branched off main, committed the plan alone, then wrote docs/demo/show-egress-ips.sh: takes BASE_URL as its argument, lists /v1/proxies (bearer auth via optional TOKEN env), probes each healthy proxy with curl -x http://ip:port against an IP-echo site (IP_ECHO_URL, default ipify JSON), banners which proxy each request goes through, skips unhealthy ones, and ends with a probed/skipped/failed summary. Per user request the script was left uncommitted for iteration and no verification beyond bash -n was run.

Extra — create-kubernetes-proxies.sh, create-gcp-proxies.sh

Added on the same branch before the first commit:

  • create-kubernetes-proxies.sh <count> — creates proxy-kubernetes-demo-1..N with the kubernetes provider, spec taken from config/samples/proxy_kubernetes.yaml, applied via kubectl apply -f - heredocs. Optional NAMESPACE env.
  • create-gcp-proxies.sh <count> — creates proxy-gcp-demo-1..N from the user-supplied gcp-eu manifest (e2-micro, Ubuntu 24.04, Squid cloud-init), each with a zone picked randomly from a hardcoded list of 27 EU zones so the fleet gets egress IPs from different locations. Env overrides: ZONES, GCP_PROVIDER (default gcp-eu), NAMESPACE.

Worth noting: beyond the user's sample manifest, the gcp script also writes the picked zone into attributes.zone, so the discovery API exposes each proxy's location and leases can select on it. The zone list is static — if a project lacks quota in some region, ZONES narrows the pool; nothing validates zones against the live project.