Repository navigation
fix(keycloak): point HTTPRoute backends at the service port - #3235
Conversation
Summary of ChangesHello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request corrects a configuration mismatch in the Keycloak HTTPRoute templates. By updating the backend port references to match the service's defined port, it ensures that traffic is correctly routed through the Gateway API, preventing 503 service unavailable errors. Highlights
New Features🧠 You can now enable Memory (public preview) to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console. Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize the Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counterproductive. You can react with 👍 and 👎 on Gemini (@gemini-code-assist) comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here. Footnotes
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughThe Keycloak HTTPRoute template changes the ChangesKeycloak HTTPRoute Port Update
Estimated code review effort: 1 (Trivial) | ~3 minutes Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Code Review
This pull request updates the Keycloak HTTPRoute template (packages/system/keycloak/templates/httproute.yaml) to change the backend service port for keycloak-http from 80 to 8080 in multiple routing rules. No review comments were provided, and the changes appear correct, so there is no additional feedback.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
Andrei Kvapil (kvaps)
left a comment
There was a problem hiding this comment.
LGTM. Root cause is clear: keycloak-http exposes port 8080 while the three HTTPRoute backendRefs targeted port 80, so Gateway API resolves no backend and envoy returns 503 for every Keycloak host under gateway-enabled. Pointing the routes at 8080 fixes it; the Ingress path is unaffected since it references the port by name.
ba83d9c to
cfd7f63
Compare
The keycloak-http Service only exposes port 8080, but every HTTPRoute backendRef referenced port 80. The Gateway API resolves backendRefs against the Service's declared ports, so the route had no valid backend and envoy answered 503 for all Keycloak hostnames whenever gateway-enabled is true. The Ingress template is unaffected: it references the port by name (http). Signed-off-by: Timofei Larkin <[email protected]>
cfd7f63 to
7475491
Compare
|
Created backport PR for
Please cherry-pick the changes locally and resolve any conflicts. git fetch origin backport-3235-to-release-1.5
git worktree add --checkout .worktree/backport-3235-to-release-1.5 backport-3235-to-release-1.5
cd .worktree/backport-3235-to-release-1.5
git reset --hard HEAD^
git cherry-pick -x 747549168668376523e2548dff2709e027ef93df
git push --force-with-lease |
Backport of #3235 onto release-1.5. With gateway-enabled: "true" every Keycloak hostname answered 503 from envoy: the keycloak-http Service exposes only port 8080, while the HTTPRoute backendRef referenced port 80, and Gateway API resolves a backendRef against the Service's declared ports, so nothing resolved. The Ingress template was never affected because it references the port by name. release-1.5 has a single HTTPRoute, so the fix here is the one port. main's version of this file carries the admin-hostname split (a separate public/admin route pair added after v1.5.2 and not backported), which is why the bot's cherry-pick collided: it tried to import that whole structure, including two `$adminHost` variables this branch never defines. Assisted-By: Claude <[email protected]> Signed-off-by: Myasnikov Daniil <[email protected]> (cherry picked from commit a7e650e6e96addb274ffd5c18e502f00b3f3cb06)
Summary
With
gateway-enabled: "true", every Keycloak hostname answers 503 from envoy. Thekeycloak-httpService exposes a single port, 8080:but all three HTTPRoute backendRefs in
packages/system/keycloak/templates/httproute.yamlreferenceport: 80. Gateway API resolves a backendRef against the Service's declared ports, so no backend resolves and the route serves 503. The Ingress template is unaffected because it references the port by name (http).Observed live on the freedom dev cluster: all Keycloak hosts returned 503 via the Gateway; hand-patching the route's backend port to 8080 restored service.
Change
Point the three backendRefs (public route, its no-adminHost variant, and the admin route) at port 8080.
Verified with
helm template -s templates/httproute.yaml(with and withoutingress.adminHost): both routes render withport: 8080.Summary by CodeRabbit