Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

headlampUrl issue when deployed with backstage and ngnix ingress #8

Open
navpreet-securitas opened this issue Jan 21, 2025 · 6 comments

Comments

@navpreet-securitas
Copy link

i'm trying to use this plugin in backstage instances that is deployed in k8s exposed via public ingress (nginx). having headlampUrl containing port 4466 & FE calling this headlampUrl from browser end , this port needs to be exposed via nginx.

exposing 4466 port is not recommended and straightforward from nginx ingress. can this headlampUrl be changed to something like:

 const headlampUrl =
    config.getOptionalString('headlamp.url') ||
    `${window.location.protocol}//${window.location.hostname}/{somepath}`;

file link

having default ports (80/443) with some path/uri , will enable reaching it via same backstage url and on some path.

@navpreet-securitas
Copy link
Author

@joaquimrocha @yolossn

@yolossn
Copy link
Contributor

yolossn commented Jan 22, 2025

Hey, You can configure the headlamp.url value to point to your url with subpath.

@navpreet-securitas
Copy link
Author

navpreet-securitas commented Jan 22, 2025

Hey, You can configure the headlamp.url value to point to your url with subpath.

we don't have headlamp deployed in cluster as separate instance. we are using backend Integration Mode.
so if our backstage url is https://devplatform.domain.com , i need to use this ? in headlamp.url

@yolossn
Copy link
Contributor

yolossn commented Jan 22, 2025

Since you are exposing headlamp via an Ingress you can use it in headlamp.url config.

@navpreet-securitas
Copy link
Author

Since you are exposing headlamp via an Ingress you can use it in headlamp.url config.

we don't have dedicated / separate headlamp deployment. headlamp backend is running in integrated mode (with backstage plugin itself). Doing so , FE tries to call https://devplatform.domain.com:4466 . which is causing problem.
with Nginx ingress exposing 4466 port is not recommended.
if we create a proxy which maps https://devplatform.domain.com/headlampbe --> http://backstage.svc.cluster.local:4466
and then add https://devplatform.domain.com/headlampbe to headlamp.url , this also doesn't work.
headlamp.url expects dedicated headlamp deployment not integrated one

@yolossn
Copy link
Contributor

yolossn commented Jan 29, 2025

if we create a proxy which maps https://devplatform.domain.com/headlampbe --> http://backstage.svc.cluster.local:4466/
and then add https://devplatform.domain.com/headlampbe to headlamp.url , this also doesn't work.
headlamp.url expects dedicated headlamp deployment not integrated one

May I know what is happening in this case? Do you not see the Headlamp UI in the frontend or is it not loading the clusters from backstage to Headlamp?

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants