canonical / grafana-agent-k8s-operator

https://charmhub.io/grafana-agent-k8s
Apache License 2.0
8 stars 18 forks source link

fix(k8s): forward dashboards #241

Closed simskij closed 1 year ago

simskij commented 1 year ago

resolves #240 resolves #87

Issue

currently, dashboards are only forwarded for the machine flavor of grafana agent

Solution

forward dashboards for k8s as well

Context

Testing Instructions

  1. deploy cos lite
  2. deploy this bundle, with a local build of the charm:
    bundle: pr-241
    saas:
    grafana:
    url: uk8s:admin/cos.grafana
    prometheus:
    url: uk8s:admin/cos.prometheus
    applications:
    ga:
    charm: local:grafana-agent-k8s-4
    channel: edge
    resources:
      agent-image: 30
    scale: 1
    pgsql:
    charm: postgresql-k8s
    channel: 14/edge
    revision: 128
    resources:
      postgresql-image: 116
    scale: 1
    relations:
    - - ga:metrics-endpoint
    - pgsql:metrics-endpoint
    - - ga:logging-provider
    - pgsql:logging
    - - ga:send-remote-write
    - prometheus:receive-remote-write
    - - ga:grafana-dashboards-provider
    - grafana:grafana-dashboard
    - - ga:grafana-dashboards-consumer
    - pgsql:grafana-dashboard
  3. look in grafana and make sure you have all the dashboards image

Release Notes

Forward dashboards on K8s.

simskij commented 1 year ago

As someone who's been back a month and barely remembers what Python is, this change is hard to review without any tests to show that it works. Any context I'm missing justifying the absence of tests?

tests added 👍🏼