Repository navigation
feat: Implement in-cluster Registrar service - #44
Merged
Merged
Conversation
Introduce an in-cluster Registrar Deployment that proxies all registry operations between agents and the external backend. Agents connect to the Registrar via gRPC instead of reaching external registries directly, reducing external connections from N (one per node) to 1 per cluster. Phases 1-2 implement: - gRPC RegistrarService (RegisterEndpoint, UnregisterEndpoint, WatchEndpoints server-streaming, ListAllEndpoints) - Versioned in-memory endpoint snapshot with diff computation - Broadcaster for fan-out of endpoint events to watching agents - Periodic sync loop polling the registry backend for changes - Agent-side registrar client with local cache populated by watch stream, exponential backoff with jitter on reconnect, and last_version resume - Registrar binary with Cobra CLI, controller-runtime manager, and support for kubernetes, dynamodb, etcd, and cloudmap backends The agent now exclusively uses the registrar backend (--registrar-address flag), removing the --registry-backend switch. Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
The new e2e.yaml workflow includes registrar deployment and covers everything e2e-agent.yaml did. Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
These workflows run integration tests (testcontainers), not end-to-end tests. The actual e2e workflow is e2e.yaml which deploys to KinD. Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
bpalermo
force-pushed
the
feat/in-cluster-registrar
branch
from
March 22, 2026 19:12
a6dbc00 to
2e22c90
Compare
Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
ServiceAccount, ClusterRole, ClusterRoleBinding, Deployment, Service, and Kustomization for deploying the registrar with kubernetes backend. Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
Uses the csi.spiffe.io CSI driver to mount the workload SPIFFE UDS socket, consistent with the proxy deployment pattern. Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
When SPIRE is enabled: - Registrar loads X.509 SVID cert/key and CA bundle from the SPIRE CSI mount directory and serves gRPC with mutual TLS - Agent loads its own SVID from --spire-workload-cert-dir and connects to the registrar with mTLS When SPIRE is disabled (--spire-enabled=false): - Registrar serves gRPC without TLS - Agent connects to the registrar with insecure credentials New flags: - registrar: --spire-enabled, --spire-workload-socket - agent: --spire-workload-cert-dir Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
Move the duplicated TLS cert loading logic from registrar and agent into common/spire with ServerTLSConfig and ClientTLSConfig functions. Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
The distroless nonroot container (uid 65532) cannot bind to privileged port 443. The registrar listens on 8443, and the Kubernetes Service maps external port 443 to targetPort 8443. Agents connect to the Service on port 443 as before. Also adds --spire-enabled=false to the e2e registrar deployment since SPIRE is not available in the KinD test cluster. Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
docs/proposals/000_in-cluster-registrar.mdNew components
api/aether/registrar/v1/registrar.protoRegistrarService(RegisterEndpoint, UnregisterEndpoint, WatchEndpoints, ListAllEndpoints)registrar/internal/server/registrar/cmd/registrar/registry/internal/registrar/Agent changes
--registrar-addressflag)--registry-backendswitch and direct backend dependencies from agentInfrastructure
build-registrar,load-registrar-image,push-registrar-imageTest plan
bazel test --test_tag_filters=-integration //...)bazel build //...)TestAgentDaemonSetpasses (registrar + agent start correctly in KinD)main(pre-existing image pull issue, not a regression)🤖 Generated with Claude Code