Skip to content

feat(operator): nested SPIRE topology + edge SPIFFE IDs (proposal 012 PR-2) - #86

Merged
flg77 merged 1 commit into
mainfrom
spiffe-edge/nested-topology
May 15, 2026
Merged

feat(operator): nested SPIRE topology + edge SPIFFE IDs (proposal 012 PR-2)#86
flg77 merged 1 commit into
mainfrom
spiffe-edge/nested-topology

Conversation

@flg77

@flg77 flg77 commented May 15, 2026

Copy link
Copy Markdown
Owner

Summary

Second PR of proposal 012 — extends operator-side SPIFFE provisioning (011 PR-2) to edge deployments with site-qualified SPIFFE IDs.

Stacked 3-deep: base is spiffe/agent-sidecar (#85), itself on spiffe/operator-controller (#84), itself on main. Merge #84#85 → this, retargeting each to main as the chain collapses.

Inert by design — no behaviour change until an operator sets deployMode: edge + spec.spiffe.

What's new

CRD (agentcollective_types.go + hand-updated bases):

  • SpiffeSpec gains edgeTopology (nested | federated | ed25519, default nested) + edgeSiteID.
  • AgentCollectiveStatus gains edgeSiteID.

Reconciler (collective/spiffe.go):

  • New computeSpiffeID — when the owning AgentCorpus has deployMode: edge and spiffe.edgeTopology: nested, the SPIFFE ID is site-qualified: spiffe://<trust-domain>/edge/<site-id>/role/<collective>. Federated/ed25519 topologies + every non-edge deploy mode keep the flat spiffe://<trust-domain>/role/<collective> form.
  • nested without an edgeSiteID → config error via status.spiffeError, never a hard reconcile failure.
  • patchSpiffeStatus also patches edgeSiteID.

Deploy manifests (deploy/edge-spire/):

  • nested-spire-server.values.yaml — Helm values overlay for the upstream spiffe/spire chart in nested mode.
  • edge-bundle-fetcher.yaml — PVC + CronJob caching the parent trust bundle (offline survival).
  • README.md — install runbook + the edgeSiteID-uniqueness requirement + a no-RWX fallback.

Test plan

  • go build ./... clean — validated on lighthouse
  • 5 new tests in spiffe_edge_test.go — site-qualified ID, missing-edgeSiteID error, federated plain ID, non-edge topology ignored, ed25519 topology plain ID
  • 18/18 SPIFFE tests pass (5 edge + 13 prior), full operator suite green

Proposal 012 reference

012 - SPIRE for ACC edge deployments.md. PR-1 #83 merged. PR-3 (federation + configurable offline action) next.

🤖 Generated with Claude Code

@flg77
flg77 changed the base branch from spiffe/agent-sidecar to main May 15, 2026 15:51
Second PR of proposal 012 — extends the operator-side SPIFFE
provisioning (011 PR-2) to edge deployments.

Inert by design: no behaviour change until an operator sets
deployMode=edge + spec.spiffe.

CRD changes (agentcollective_types.go + hand-updated CRD bases):

* SpiffeSpec gains EdgeTopology (nested | federated | ed25519,
  default nested) + EdgeSiteID.
* AgentCollectiveStatus gains EdgeSiteID — echoes the site
  qualifier baked into SpiffeID.

Reconciler (collective/spiffe.go):

* New computeSpiffeID() — when the owning AgentCorpus has
  deployMode=edge AND spiffe.edgeTopology=nested, the SPIFFE ID
  is site-qualified:
    spiffe://<trust-domain>/edge/<site-id>/role/<collective>
  Federated / ed25519 topologies + every non-edge deploy mode
  keep the flat spiffe://<trust-domain>/role/<collective> form.
* nested topology without an edgeSiteID reports a config error
  via SpiffeResult.Err -> status.spiffeError; never hard-fails
  reconciliation.
* CollectiveReconciler.patchSpiffeStatus also patches EdgeSiteID.

Deploy manifests (deploy/edge-spire/):

* nested-spire-server.values.yaml — Helm values overlay for the
  upstream spiffe/spire chart configured for nested topology
  (edge SPIRE downstream of an rhoai parent).  ACC does not
  vendor SPIRE — operators helm-install it.
* edge-bundle-fetcher.yaml — PVC + CronJob caching the parent
  SPIRE trust bundle every 6h for offline survival.
* README.md — install runbook + the edgeSiteID-uniqueness
  requirement + the no-RWX fallback.

Test coverage: 5 unit tests in spiffe_edge_test.go covering the
site-qualified ID, the missing-edgeSiteID error path, federated
plain ID, non-edge topology-ignored, and ed25519 topology.

Validated on lighthouse: go build ./... clean, full operator
suite green.

Stacked on spiffe/agent-sidecar (011 PR-3, PR #85), which is
itself stacked on 011 PR-2 (#84).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@flg77
flg77 force-pushed the spiffe-edge/nested-topology branch from 118b300 to 351d491 Compare May 15, 2026 15:53
@flg77
flg77 merged commit e695674 into main May 15, 2026
@flg77
flg77 deleted the spiffe-edge/nested-topology branch May 15, 2026 15:53
flg77 added a commit that referenced this pull request Jun 15, 2026
fix(acc-deploy/pkg): apply degrades gracefully when packages root isn't host-writable (#85)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant