Korifi build and release targets (not usable until Korifi auth lands)#5584
Merged
norman-abramovitz merged 1 commit intoJul 6, 2026
Conversation
Korifi has no binary_buildpack and its Paketo run image cannot exec the dynamically linked cgo binary the classic cf package ships, so give Korifi its own flavor of the cf release flow: - make build korifi: static cgo jetstream via zig/musl for linux/<host-arch> (PLATFORM= overrides), with go generate first so worktree builds do not silently drop generated plugin wiring - make release korifi: stages dist/korifi-package and stratos-korifi-<version>.zip via a new korifi mode in release-cf.sh - paketo-buildpacks/procfile manifest, in-cluster CF_API_URL default, and a packaging-time generated encryption key cached in dist/ so repackaging never orphans encrypted data - release script refuses dynamically linked binaries in korifi mode with a pointer to make build korifi Verified end to end against Korifi v0.18.0 on kind: package stages, starts, and serves the console UI. Note that logging in is not yet possible against Korifi (no UAA); see cloudfoundry#5489.
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.
Warning
Not usable for real deployments yet. A console deployed to Korifi serves the UI but cannot log anyone in: Korifi has no UAA, and Stratos's CF auth assumes one (it takes Korifi's
loginroot link and POSTs to a/oauth/tokenthat doesn't exist). Bearer-token auth for Korifi endpoints is the subject of #5489. This PR only lands the build/packaging plumbing so that work can be developed and tested against a real Korifi.What
Adds a Korifi flavor of the CF release flow:
make build korifi— statically linked cgo jetstream forlinux/<host-arch>(override withPLATFORM=linux/amd64), built withzig cc -target <arch>-linux-musl. Runsgo generate ./...first so builds from fresh worktrees don't silently drop the generated plugin registration.make release korifi— stagesdist/korifi-package/andstratos-korifi-<version>.zipvia a newkorifimode inbuild/release-cf.sh.Existing flows are untouched: bare
make releasestill means cf+github, andmake release cfoutput is byte-identical.Why the differences from the classic cf package
binary_buildpack(Paketo only), so the manifest usespaketo-buildpacks/procfilewith the package's existingProcfile.make build korifi.VCAP_APPLICATIONmay not be reachable from inside the cluster (on kind it islocalhost, i.e. the app pod itself), so the manifest defaultsCF_API_URLto the in-clusterkorifi-api-svcservice. See Ensure VCAP_APPLICATION/cf_api can be used from both outside the cluster and within an app workload pod korifi#2299.ENCRYPTION_KEYis generated at packaging time and cached indist/.korifi-encryption-key(0600, gitignored, survivesmake clean) — no shared hardcoded key, and repackaging doesn't orphan data encrypted under a previous key.Testing
Verified end to end against Korifi v0.18.0 on kind (arm64):
make build korifi && make release korifi,cf pushfromdist/korifi-package/— stages with the procfile buildpack, starts, serves the console UI, and fails login in exactly the way #5489 describes.Two Korifi quirks hit while verifying, for the record: pushing over a crashlooping app never replaces the running droplet (filed as cloudfoundry/korifi#4378;
cf restartrecovers), andcf deletekeeps routes, so a re-push withdefault-routeneedscf delete-routefirst.Refs #5489.