Skip to content

Add option to create new aggregator based on a json file #68

New issue

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

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

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: develop
Choose a base branch
from

Conversation

BrunoSegato13
Copy link

@BrunoSegato13 BrunoSegato13 commented Aug 4, 2024

Hi,
Due to some internal reasons, our company needs to deploy Report Portal with docker based using Caddy as reverse-proxy instead of Traefik.

With this change we faced the same issues mentioned in #43 where the redirection, versions information on login page and the health status for the analyzers services have stopped to work.

To address these issues, I have extend the service-index by adding the possibility to provide the services urls using a json file in oppose to be discovered by Traefik or k8s api, in this way at least for the installations where the services urls are not dynamically allocated we can use other reverse-proxy's besides Traefik without loosing any functionality.

Have also added one working example with the required changes to perform a deployment with Caddy.

If you find these changes beneficial for the service-index component, please consider review them.

Thank you!

}

var nodesInfo map[string]*NodeInfo
if err := json.Unmarshal(byteValue, &nodesInfo); err != nil {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it seems the be we are reading the whole file. In this case it could be as easy as

// read our opened jsonFile as a byte array.
byteValue, _ := ioutil.ReadAll(jsonFile)
var nodesInfo map[string]*NodeInfo
json.Unmarshal(byteValue, &nodesInfo)

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

File reading simplified

@@ -0,0 +1,416 @@
version: "3.8"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i don't think we need to store yet another copy of compose file in this repo. Let's just get it removed

@avarabyeu
Copy link
Member

As another option, you may want to consider using Caddy API to get actual list of services and their URLs

@BrunoSegato13 BrunoSegato13 force-pushed the feature/json-file-aggregator branch from f696d0b to b4c4d8e Compare November 24, 2024 12:33
@BrunoSegato13
Copy link
Author

Thank you for the suggestion to use the Caddy API to retrieve the URLs. I can implement it if you prefer, but I believe using a json file is simpler and more flexible, as it allows us to use others reverse proxies than Caddy/Traefik.

@BrunoSegato13 BrunoSegato13 force-pushed the feature/json-file-aggregator branch from 10e0098 to 6c76abc Compare March 27, 2025 14:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants