Skip to main content

What It Does

The Auto-Registrar is a Kubernetes controller that:
  1. Watches for pods with the label hexr.dev/agent: "true"
  2. Reads the pod’s process context ConfigMap
  3. Creates SPIRE registration entries for each process identity
  4. Maps hexr_tool() service names → SPIFFE ID DNS SANs

How It Works

1

Pod created with hexr label

Kubernetes creates a new pod with the hexr.dev/agent=true label. The Auto-Registrar watches for these events.
2

Read ProcessContext ConfigMap

The Auto-Registrar reads the associated ProcessContext ConfigMap to discover all sub-processes (roles) the agent will spawn.
3

Create parent registration entry

A SPIRE registration entry is created for the pod itself: CreateEntry(parent=node, spiffeID, selectors).
4

Create per-process entries

For each sub-process defined in the ProcessContext (e.g., researcher, writer, editor), a separate SPIRE registration entry is created with role-specific selectors.

Registration Entry Format

For each process in an agent pod, the registrar creates:

Pod Labels

The Auto-Registrar watches for these labels:

Configuration


Image