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 tag with charm name to dashboard #256

Merged
merged 6 commits into from
Feb 14, 2025
Merged

Add tag with charm name to dashboard #256

merged 6 commits into from
Feb 14, 2025

Conversation

sed-i
Copy link
Contributor

@sed-i sed-i commented Feb 7, 2025

Issue

  • Sometimes it's not obvious where a given dashboard originated from.
  • When browsing list of dashboards in grafana UI, it could be handy to filter by charm name.

Solution

Have the Provider auto-add a tag with the charm's name, if it is not already there.
In tandem with canonical/grafana-k8s-operator#390.

Context

Testing Instructions

Deploy the following bundle with:

  • grafana-agent from this PR
  • hardware-observer with the grafana_dashboard lib fetched from this PR
  • zookeerer from charmhub
graph LR
zookeeper --- grafana-agent
hardware-observer --- zookeeper
hardware-observer --- grafana-agent
grafana-agent --- grafana
Loading
default-base: [email protected]/stable
saas:
  graf:
    url: microk8s:admin/am.graf
applications:
  ga:
    charm: ./[email protected]
  hwo:
    charm: ./[email protected]
  zookeeper:
    charm: zookeeper
    channel: 3/stable
    revision: 149
    num_units: 1
relations:
- - ga:cos-agent
  - zookeeper:cos-agent
- - ga:grafana-dashboards-provider
  - graf:grafana-dashboard
- - hwo:general-info
  - zookeeper:juju-info
- - hwo:cos-agent
  - ga:cos-agent

image

Note that for zookeeper we get the charm: grafana-agent tag, because it was deployed from charmhub, i.e. without the updated grafana-dashboard lib.

Upgrade Notes

@sed-i sed-i changed the title Feature/charm tag Add tag with charm name to dashboard Feb 7, 2025
@sed-i sed-i marked this pull request as ready for review February 7, 2025 19:30
@sed-i sed-i requested a review from a team as a code owner February 7, 2025 19:30
@sed-i sed-i force-pushed the feature/charm_tag branch from b59ed1d to 85fd86f Compare February 7, 2025 19:34
Copy link
Contributor

@Abuelodelanada Abuelodelanada left a comment

Choose a reason for hiding this comment

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

LGTM!

lib/charms/grafana_agent/v0/cos_agent.py Show resolved Hide resolved
@sed-i sed-i merged commit 599f77b into main Feb 14, 2025
17 checks passed
@sed-i sed-i deleted the feature/charm_tag branch February 14, 2025 14:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants