Skip to content

fix: Let acceptance pass with a prunable site namespace - #335

Draft
scotwells wants to merge 1 commit into
feat/manual-inventory-recordsfrom
fix/site-namespace-prune-check
Draft

scotwells wants to merge 1 commit into
feat/manual-inventory-recordsfrom
fix/site-namespace-prune-check

Conversation

@scotwells

Copy link
Copy Markdown
Contributor

Today a gateway created in a staging project does not get a hostname, a certificate or DNS, and nothing serves it at the edge. This change switches staging to the controller's demand mode so that it does, and lets clients prove who they are with their Connector key. Once it merges and reconciles, a new gateway in a staging project should get an address under the staging Connect domain, be served from the us-central-1 cell, and become Ready. A client holding an authorized key can then open a tunnel through it.

Demand mode replaces the earlier managed endpoints approach in staging. The central controller holds no credentials for any cell. It reserves the hostname and requests a certificate in the service project, then hands a request, the certificate and a placement policy to the Karmada hub. A small agent in the cell picks the request up, programs the existing MASQUE provider and reports back. The controller publishes DNS only after the cell says the endpoint is serving.

Client authentication builds on that path. For each connection the policy allows, the controller writes an authorized key for the client's Connector key to the hub and places it on the same cell. The cell's MASQUE authority turns it into a grant, assigns the client an address range from the network's ledger and reports readiness. The controller copies the resulting connection details into the binding's status once the cell reports the key ready.

What changes:

  • The hub gets the request definition, the status reflector, an admission policy that confines the controller to the objects demand mode writes, and the roles it needs. The reflector now also reports authorized key status. The admission policy and runtime role cover keys. They are bound to the identity the controller already uses against the hub, so no new credential is introduced. The old distributor and canary roles are removed.
  • The hub and the us-central-1 staging cell both get the authorized key definition from the Galactic build that carries key authentication.
  • The us-central-1 staging cell gets the request definition, member admission, the cell agent at one replica, its capacity settings, and read access to endpoint certificates for the MASQUE provider. The provider serves registered endpoints alongside its existing legacy authority, so current MASQUE clients keep working. The temporary Python placement scaffold is deleted.
  • That cell's MASQUE authority and provider run the Galactic build from the open key authentication pull request, pinned by digest, because it has not merged. Its tenant access is extended to the staging test network so the authority can read the network and issue sessions there. No other cell moves off the Galactic main build.
  • The controller runs with the demand flags instead of the canary flags. The service project writer gets a Milo role and binding for the permissions demand mode uses. A leftover permission patch for the credential broker is removed, since demand mode leaves the broker off.
  • The credential broker preparation, which was never switched on, is deleted along with its Kyverno exception.

The controller image and configuration bundle are pinned by digest to the build from the open Connect pull request for client authentication, which stacks on the demand mode work. Nothing from either has merged, so the pins should be bumped once they land, and the Galactic pin dropped once its release reaches the main build.

Production is not touched.

Validation: the staging, edge and managed endpoint renders build, the managed endpoint checks and their mutation tests pass, and the hub and cell bundle components and the repointed MASQUE components render through Flux with the intended patches and image digests. Several Linux-only render checks could not run on the author's machine and are left to CI. Assumptions that could not be checked live, the one-time cleanup of old canary objects and the one-time ledger setup are in the latest follow-up comment.

🤖 Generated with Claude Code

The cell site claims no volume, so its namespace no longer carries
kustomize.toolkit.fluxcd.io/prune: disabled. flux-verify still required
it, so every acceptance mode failed with "cell namespace fleet-site is
prunable".

Key changes:
- flux-verify checks only the coordination namespace and the handoff CRD,
  the objects whose manifests still disable pruning
- The success line names those two objects
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