Skip to content

Shift Control Center off the full-CR API onto target mode - #243

Merged
iAlexeze merged 3 commits into
mainfrom
feat/control-center-target-mode
Aug 5, 2026
Merged

Shift Control Center off the full-CR API onto target mode#243
iAlexeze merged 3 commits into
mainfrom
feat/control-center-target-mode

Conversation

@iAlexeze

@iAlexeze iAlexeze commented Aug 5, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Control Center's IDP create form spoke the old full-CR contract (constructed apiVersion/kind/metadata/spec, fetched schema from a path the gateway never served). It now speaks target mode like every other Apply API caller — submits {"target": "...", ...fields}, fetches GET /api/v1/schema?target=<target>, never builds a CR itself.
  • The runtime's /katalog response now carries target per CRD (CRDEntry.IDPTargetOrEmpty()), so Control Center resolves it the same way any caller does instead of deriving one from Kind/GVK.
  • Added IDP and security documentations.

Test plan

  • go build ./... and go test ./... clean on both the main module and cmd/controlcenter
  • Manually exercise the [+ Create] form against a running gateway + runtime

Control Center's IDP create form spoke the old full-CR contract — it
constructed apiVersion/kind/metadata/spec client-side and server-side, and
fetched schema from a path-suffixed endpoint the gateway never actually
served. It now speaks target mode like every other Apply API caller:
submits {"target": "...", ...fields}, fetches schema from
GET /api/v1/schema?target=<target>, and never builds a CR — the gateway
does that from idp.fields/idp.additionalFields.

The runtime's /katalog response now carries a target field per CRD
(CRDEntry.IDPTargetOrEmpty) alongside idpEnabled, so Control Center
resolves target the same way every other caller does instead of deriving
one from Kind/GVK.

Closed a gap in the target-mode API itself found along the way:
BuildCRFromTarget had no fallback for a caller-supplied name when
idp.name isn't declared, unlike full CR mode's metadata.name — every
target-mode request against such a CRD was rejected regardless of what
the caller sent. It now falls back to a flat "name" field the same way.
concepts/idp reframed around the gateway as the entry point — schema
discovery, apply, read, list, delete — with the CR as an internal
contract the caller never sees, not "apply a CR" as the whole story.
Target mode moved from a footnote link to the primary path throughout,
full CR mode framed as the advanced/compat option.

Added idp.allowedTokens as a first-class topic: a concepts/idp deep dive
(03-token-scoping.md) and a dedicated security page
(security/08-idp-permissions.md) — per-token operation and namespace
scoping on the Apply API, a real authorization layer distinct from the
CRD-level allowedNamespaces/restrictedNamespaces every caller shares.

Filled in the Apply API reference (nested idp.fields.path,
idp.config.response payload/exclude/poll, structured violation
responses) and fixed pre-existing broken links in security/index.md.

CHANGELOG updated to match — idp.name/idp.namespace entries describe
both modes directly, no longer only full CR mode.
@iAlexeze
iAlexeze merged commit 68e59cd into main Aug 5, 2026
10 checks passed
@iAlexeze
iAlexeze deleted the feat/control-center-target-mode branch August 5, 2026 20:43
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