janus-idp / helm-backstage

Helm Chart for Deploying Backstage. This repo is deprecated. Please move to https://github.com/redhat-developer/rhdh-chart
https://redhat-developer.github.io/rhdh-chart/
Apache License 2.0
62 stars 53 forks source link

Simplify the definition of the application host name #167

Closed dmartinol closed 9 months ago

dmartinol commented 9 months ago

What do you want to improve?

Simplify the definition of the application host name for a chart deployer.

What is the current behavior?

The chart deployer must specify the application host using either global.host or global.clusterRouterBase. The latter parameter is basically requesting the user to specify a cluster configuration that we can also extract from the cluster itself with a lookup function.

What is the new behavior?

In the janus-idp.hostname template function, extend the exit condition with a further attempt to lookup the cluster domain from the configuration, as in: oc get ingress.config.openshift.io/cluster -oyaml | yq '.spec.domain' If the configuration is found, then we can use it as a last resort option.

masayag commented 9 months ago

@Zaperex can you pls see if this one is valid and if it can be contributed?

Zaperex commented 9 months ago

@masayag I tested on openshift local and verified that the relevant hostname information can be extracted from the cluster with a lookup function. I'll add the PR for it right now.

dmartinol commented 9 months ago

Thank you @Zaperex!