Skip to content

feat: add Go UDS controller and native admission policies - #3187

Closed
jeff-mccoy wants to merge 7 commits into
defenseunicorns:mainfrom
jeff-mccoy:codex/native-controller-admission
Closed

jeff-mccoy wants to merge 7 commits into
defenseunicorns:mainfrom
jeff-mccoy:codex/native-controller-admission

Conversation

@jeff-mccoy

@jeff-mccoy jeff-mccoy commented Oct 31, 2026 •

Copy link
Copy Markdown
Member

Superseded by #3190 so CI runs from a repository-owned branch with its normal registry credentials. The replacement also corrects the K0s documentation/version consistency failure.

Add an opt-in Go controller and Kubernetes-native admission profile for UDS Core. The controller reconciles the existing Package/ClusterConfig APIs and retains Java Keycloak, while Kubernetes policies handle object-local admission rules and Go keeps cluster-dependent validation, topology, and JavaScript-compatible exemption behavior.

The supported deployment owns the complete Package lifecycle. Stop and drain the Pepr watcher before starting Go; retain Pepr admission until complete Go registration succeeds. Startup rejects partial phase ownership and an implicit admission-only mode because status and finalizers have one owner. Standard Core package selection continues to use Pepr.

The profile requires Kubernetes 1.37+ and the fixed uds-system/uds-controller identity. Broad Go callbacks remain the default. Protected parameter revision checks, automatic snapshot repair, per-object ownership/version guards, and shared serving trust preserve admission and cleanup boundaries. Lease loss cancels writers; this does not claim distributed fencing of already-accepted API writes.

The implementation follows Core 1.16 schema and validation, creates confidential Java Keycloak probe clients, and reloads consumers when bootstrap trust is first published. CLIENT_SECRET is the default; assertion modes require explicit selection. Go 1.27.3 and patched HTTP/text dependencies are required, and CI checks the module, generation, admission contracts, and production vulnerability reachability.

Validation:

  • 1,840 Go race-tested cases/subtests across 23 packages, vet, deterministic regeneration of 76 API/client files, 1,117 original Pepr unit tests, 120 Keycloak chart tests, and broad/narrow render contracts pass.
  • Production entrypoint and matching symbol-aware audit scans report no reachable vulnerable functions. The audit and release executable sections match; stripped-binary module fallback is not presented as symbol reachability.
  • A task-owned K3s 1.37.1 cluster with signed Core 1.16 inputs, Java Keycloak 26.8.1, real Core addons, and configured CA trust passed all 26 API files: 156 tests passed and two original conditional skips remain. All 31 browser cases completed; one existing classification-banner navigation race used its configured retry.
  • Actual admission, exemption revocation, Package lifecycle, two-replica leader replacement, and serving-CA rotation passed. The rotation run admitted 157 requests without failure and verified each replica's new certificate. These receipts identify their exact earlier runtime revisions.
  • The final ownership/reload revision passed real startup and first-publication smoke checks: an existing consumer restarted and read the new configuration. Both unchanged public-versus-empty CA tests passed against Google HTTPS, with exact CA restoration and fixture removal.

The complete API/browser run used 330ab7f; final targeted startup/reload and trust proof used 514d66c. Earlier failed fixtures and an independent K3s SQLite restart are retained separately. Two custom 90-second trust-preparation attempts exceeded that setup budget during global reconciliation; the unchanged 30-second source assertions subsequently passed using the converged original fixture. This is functional validation, not a new performance or sizing claim. Java SIGNED_JWT compatibility and production migration remain separate gates.

CI status: the dedicated implementation checks pass. Remaining inherited checks are blocked by private-registry HTTP 401 responses and an unchanged base mismatch: the K0s documentation lists 1.36 while DEFAULT_K0S_VERSION selects 1.37. No checks or authentication requirements were disabled.

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