fix(deploy): mount the gateway signing key into the worker - #127
Merged
Merged
Conversation
The worker runs the same binary and the same blue.yaml as the Control API, so it loads the gateway envelope at startup and that envelope declares the signing key. The chart only mounted the Secret into the API, so the worker exited on a missing file and crash-looped, taking the gateway log cleanup and revocation jobs with it. It never signs anything; the mount just satisfies the load. Pinning the path by env keeps the two pods from disagreeing if a config file moves it. Fixes #126 Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Contributor
Author
|
This pull request was created from a Blocks session. |
AlejandroEsquivel
marked this pull request as ready for review
September 16, 2026 00:55
tomi-stipancik
approved these changes
Sep 16, 2026
tomi-stipancik
enabled auto-merge (squash)
September 16, 2026 05:22
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.
Fixes #126
The worker crash-loops in gateway mode. Found it on the EKS cluster built from the Helm guide — 35 restarts,
0/1available:The worker runs the same binary and the same
blue.yamlas the Control API. That config declaresgateway.inference_jwt.private_key_file, andload_gateway_jwt_key_ring(lib.rs:1460) runs on every startup wheregateway.typeis set. The chart mounted the Secret into the API only, so the worker died on the missing file — andcleanup_gateway_request_logsandprocess_gateway_revocationsdied with it.It can't just skip the gateway block:
process_gateway_revocations(lib.rs:8528) drives the provisioner, so it needs the envelope. It only doesn't need this one key —state.gateway_jwthas two consumers and both are API request handlers (gateway_auth.rs:123mints tokens,:158serves/gateway/jwks).What changed
worker-deployment.yamlmounts thegateway-jwtSecret the same waydeployment.yaml:143,163does, gated onblue.enableInferenceProxy. Itsvolumes:/volumeMounts:were wrapped inwith .Values.blue.config.existingConfigMap, so that becomes theif orpattern the API template already uses.HARNESS_GATEWAY_JWT_PRIVATE_KEY_FILEis set on the worker too. The API sets it, so without it a config file pointing somewhere else would break the worker again while the API kept working.verify-deployment.shrenders the worker on its own and asserts the mount. The existing greps are file-wide and pass on the API's copy.Verification
scripts/verify-deployment.shpasses. Reverting only the template makes the new assertion fail, so the guard works. Rendered all four permutations ofexistingConfigMap×enableInferenceProxyplusincludePreviousKey: the two non-gateway ones are byte-identical tomain, and the gateway ones match the API's shape.helm lintclean.Not tested against a live cluster — the deployed one is mid-investigation and I didn't want to change it.
Follow-ups, not in here
🤖 Generated with Claude Code