POST /pod/spec
Insert or update pod metadata. Upserts onpod_name (the primary
key) — a pod restarting reusing the same name replaces the
previous row in place. Empty/whitespace-only pod_name is
rejected at the handler (warn-log + no-op) to keep a sentinel
empty-PK row from polluting the table.
Request
pod_identity and workload_selector_labels are populated by the
controller’s extract_pod_identity_and_selectors helper (priority:
app.kubernetes.io/name → app.kubernetes.io/component → k8s-app
→ owner-reference walk to Deployment/StatefulSet/DaemonSet).
POST /pod/mark_dead
Mark a pod’s row as dead without deleting it (preserves historical correlation againstpod_traffic rows referencing the same IP).
The controller’s reconcile_pods_task calls this periodically for
pods that left the node — sending pod_ip alongside pod_name
lets the broker apply a precise (pod_name, pod_ip) filter rather
than a name-only one, avoiding the race where a same-name restart’s
live row gets marked dead.
Request
pod_ip is optional for backwards compatibility with older
controllers; when absent, the broker falls back to a name-only
filter (and logs a warn for the missing precision). Empty
pod_name is rejected.
GET /pod/info
Return all pod metadata rows. Ordered by(pod_namespace ASC, pod_name ASC) for stable display.
GET /pod/name/{name}
Get a single pod by name. Returns the live row when one exists (falls back to the most-recent dead row only if no live row matches — defensive for a hypothetical future schema where multiple rows perpod_name are possible).
GET /pod/ip/{ip}
Get a single pod by IP. Used by the advisor when resolving a peer IP to a pod identity during NetworkPolicy generation."No data found" is returned when no row matches.
GET /pod/list/{node}
Return all live pods recorded for the named node. The controller’s reconciler calls this to compute the dead-pod diff each cycle. Filtered tois_dead=false; ordered by
(pod_namespace ASC, pod_name ASC) so reconciler “marking X as
dead” log sequences are deterministic.