Replies: 3 comments
|
Once again proving k8s is unwieldy. If they added support for this in November I would just see it as a breaking change for homepage. Happy to accept a PR for it, I don’t use k8s so it’s not a high priority thing for me. Since literally everything is AI right now and it might be killing FOSS I would only ask that a PR (AI or not) be careful about not breaking things for existing users |
0 replies
|
This discussion has been automatically closed due to inactivity. See our contributing guidelines for more details. |
0 replies
|
This discussion has been automatically locked since there has not been any recent activity after it was closed. Please open a new discussion for related concerns. See our contributing guidelines for more details. |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Description
I encountered a crash in the service discovery process when using an
HTTPRouteresource that does not haveparentRefsdefined. The logs show aTypeError: Cannot read properties of undefined (reading '0').Configuration:
Gateway API discovery is enabled in
kubernetes.yaml:Root Cause Analysis:
I believe the issue is located in
src/utils/kubernetes/resource-helpers.jswithin thegetUrlFromHttpRoutefunction.The code assumes that if
hostnamesare present on anHTTPRoute,parentRefsmust also be present and populated. It attempts to accessresource.spec.parentRefs[0]directly to determine the URL schema (http/https).https://github.com/gethomepage/homepage/blob/main/src/utils/kubernetes/resource-helpers.js#L51
Steps to Reproduce:
gateway: trueinconfig/kubernetes.yaml.HTTPRouteresource in Kubernetes that hashostnamesbut noparentRefs. This is a valid configuration when using mechanisms like "Default Gateways".TypeError: Cannot read properties of undefined (reading '0')and fails to discover services.Expected Behavior:
Homepage should correctly handle
HTTPRouteresources whereparentRefsis not explicitly defined, as this is a valid configuration according to the Gateway API specification.References:
For more context on why
parentRefscan be omitted (e.g. "Default Gateways"), see:https://kubernetes.io/blog/2025/11/06/gateway-api-v1-4/#introducing-default-gateways
homepage version
1.9.0
Installation method
Docker
Configuration
Container Logs
[2026-01-23T18:32:01.713Z] error: TypeError: Cannot read properties of undefined (reading '0')
at k (/app/.next/server/chunks/7655.js:1:17544)
at l (/app/.next/server/chunks/7655.js:1:17625)
at Object.n [as constructedServiceFromResource] (/app/.next/server/chunks/7655.js:1:18173)
at /app/.next/server/chunks/7655.js:1:12360
at Array.map ()
at t (/app/.next/server/chunks/7655.js:1:12343)
at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
at async q (/app/.next/server/pages/api/bookmarks.js:1:2946)
at async g (/app/.next/server/pages/api/services.js:1:185)
[2026-01-23T18:32:01.714Z] error: Failed to discover services, please check kubernetes.yaml for errors or remove example entries.
Browser Logs
No response
Troubleshooting
All reactions