Skip to content
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

Add grafana links to hubs list #817

Merged
merged 1 commit into from
Nov 11, 2021
Merged

Conversation

choldgraf
Copy link
Member

@choldgraf choldgraf commented Nov 9, 2021

The grafana dashboards for our clusters are configured in the cluster-specific files in this repository. Since those exist in a structured space, this PR grabs the grafana configuration for each cluster and generates a grafana link per hub. That way we can more easily reference the grafana URL for a given hub, as this may be a common action and this can help reduce confusion.

you can preview how this looks here: https://2i2c-pilot-hubs--817.org.readthedocs.build/en/817/reference/hubs.html

This is a follow-up to #815.

# Pull support chart information to populate fields (if it exists)
support = cluster.get("support", {}).get("config", {})
grafana_url = support.get("grafana", {}).get("ingress", {}).get("hosts", "")
if isinstance(grafana_url, list):
Copy link
Contributor

Choose a reason for hiding this comment

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

Are we really expecting a list of hosts urls? And if that is the case, why do we choose just the first one?

Copy link
Member

Choose a reason for hiding this comment

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

Yeah, the grafana chart expects ingress.hosts to be a list:

https://github.com/grafana/helm-charts/blob/a0b7d4d2222976bd11af38b2fec3f654a764030a/charts/grafana/values.yaml#L180-L196

I think if we are following the same policy for grafana that we do for hubs, that we don't support multiple domains, then there should only be one entry here. Maybe that is something we can enforce in the schema?

Copy link
Member Author

@choldgraf choldgraf Nov 11, 2021

Choose a reason for hiding this comment

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

yeah I was just taking the first item because it always seemed to be a list in the config. Is this something that should block this PR? I think building the docs will fail if this condition is ever not met so we'd catch it then

Copy link
Contributor

Choose a reason for hiding this comment

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

Should we capture @sgibson91's suggestion in a new issue?

Copy link
Member Author

@choldgraf choldgraf Nov 16, 2021

Choose a reason for hiding this comment

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

+1 from me, though I think it is probably not a huge priority

Copy link
Member

@GeorgianaElena GeorgianaElena left a comment

Choose a reason for hiding this comment

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

🚀

@choldgraf
Copy link
Member Author

I am going to merge this one in because I would personally find it very useful to be able to quickly reference the grafana URLs for hubs (and make it clear when we don't have a grafana set up for a hub...but happy to iterate on questions about the right configuration structure etc in follow-up issues!

@choldgraf choldgraf merged commit f489662 into 2i2c-org:master Nov 11, 2021
@choldgraf choldgraf deleted the grafana-url branch November 11, 2021 18:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Archived in project
Development

Successfully merging this pull request may close these issues.

4 participants