Repository navigation
feat: add Go UDS controller and native admission policies - #3
Closed
jeff-mccoy wants to merge 16 commits into
Closed
jeff-mccoy wants to merge 16 commits into
jeff-mccoy wants to merge 16 commits into
Conversation
Co-Authored-By: Ark <ark@defenseunicorns.com>
The current FIPS image declares user 65532, and its Quarkus application is accessible only to the image owner and group. UID 1000 causes AccessDeniedException during startup. Match the runtime UID, GID and volume group while preserving the non-root and capability restrictions. Add rendered-chart coverage using the actual Unicorn values.
The read-only diagnostic confirmed image user 65532 and Quarkus application ownership 65532:65532 with mode 0770. The runtime values and rendered regression now cover the correction; remove the one-off image export and filesystem scan.
The image UID changed from 1000 to 65532. Fresh installs succeed with the corrected runtime identity, but upgraded Keycloak cannot rewrite the existing 1000-owned truststore and H2 data. Enable the existing upgrade-only permission migration for Unicorn and derive its target UID/GID from the runtime security context instead of hard-coding 1000. Preserve the registry1 identity and the migration container capability restrictions.
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.
Review continues in upstream #3190. This superseded fork staging PR is closed; its branch and validation history are preserved.
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:
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 setup: this proposal uses a repository-owned branch so the existing private-registry login steps can receive their normal credentials. The K0s compatibility table now matches the configured 1.37 test version; the actual version-consistency check passes. Runtime code is unchanged from the previously validated revision. Replaces #3187.
Upstream review: #3190.