Skip to content

Conversation

@aslafy-z
Copy link
Contributor

@aslafy-z aslafy-z commented Oct 3, 2025

This PR includes several changes to allow the use of this Helm chart with existing infrastructure components such as Prometheus Operator and Grafana.

  • global.alerts.enabled (new value): enable/disable deployment of alerts
  • global.alerts.kind (new value): alerts container resource (configmap or prometheusrule) (Prometheus Operator compatibility)
  • global.dashboards.enabled (new value): enable/disable deployment of dashboards
  • global.dashboards.labels (new value): allow to set dashboard configmaps a label (Grafana Sidecar compatibility)
  • runbookViewer.enabled (new value): enable/disable deployment of the runbook viewer
  • Fallback to GitHub-hosted runbook when runbookViewer is disabled
  • Only deploy collector configmap when grafana-agent is enabled
  • Prefix Grafana dashboards names by Coder
  • Prefix Grafana dashboards configmap names and Grafana uid (posponed Make Grafana dashboards' UIDs consistent #63) by coder-

It does not fix #31 but helps people that only want to deploy dashboards and alerts for example.

I'm running it right now with these values and it works almost perfectly. Without the grafana agent, logs are not correctly matched (logger field not detected) - I've seen json support was tracked with #8, it may resolve this issue. I had to add service monitors by myself, I opened issue #67 for this matter.

demo v0.6.0 is available in the https://zadkiel.fr/coder-observability helm repository

@aslafy-z aslafy-z force-pushed the feat/dashboard-labels branch 3 times, most recently from 8acd058 to 4cd9c53 Compare October 3, 2025 14:45
@aslafy-z aslafy-z marked this pull request as ready for review October 3, 2025 14:52
@aslafy-z aslafy-z requested a review from dannykopping as a code owner October 3, 2025 14:52
@aslafy-z aslafy-z force-pushed the feat/dashboard-labels branch 3 times, most recently from 47bb49f to dd9620a Compare October 3, 2025 14:58
@dannykopping
Copy link
Collaborator

@aslafy-z thanks very much for your contribution. I'll be on PTO until Mon 13th, and my colleague who is co-maintaining this with me is away as well. Would it be ok with you if I got to this when I return?

@aslafy-z aslafy-z force-pushed the feat/dashboard-labels branch from dd9620a to 651a327 Compare October 3, 2025 15:04
@aslafy-z
Copy link
Contributor Author

aslafy-z commented Oct 3, 2025

@dannykopping sure, enjoy your pto!

Copy link
Collaborator

@dannykopping dannykopping left a comment

Choose a reason for hiding this comment

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

Overall LGTM! Thanks for a great contribution @aslafy-z
Left a few notes

@aslafy-z aslafy-z force-pushed the feat/dashboard-labels branch from f456c7c to 6a7ced0 Compare October 23, 2025 10:00
@aslafy-z
Copy link
Contributor Author

@dannykopping I rebased and re-built the compiled manifests. Do you see any blocking things left? Thanks

Copy link
Collaborator

@aslafy-z the main sticking point for me is #62 (comment)
Have you tested this yet?

@aslafy-z
Copy link
Contributor Author

Sure! I missed that comment. I will test it in my dev environment in a few hours and will get back to you.

@aslafy-z
Copy link
Contributor Author

aslafy-z commented Oct 24, 2025

global:
  # global.postgres -- postgres connection information
  postgres:
    hostname: postgresql-cluster
    port: 5432
    username: coder
    database: coder
    sslmode: require
    mountSecret: coder-postgres-config
    exporter:
      enabled: true
      image: quay.io/prometheuscommunity/postgres-exporter:v0.18.1

  alerts:
    # global.alerts.kind -- the container resource kind in which alerts should be created;
    # valid values are "prometheusrule" or "configmap"
    kind: prometheusrule

  dashboards:
    enabled: true
    # global.dashboards.labels -- labels to apply to configmaps created for dashboards
    labels:
      grafana_dashboard: "1"

runbookViewer:
  enabled: false

sqlExporter:
  enabled: false

grafana-agent:
  enabled: false

grafana:
  enabled: false

prometheus:
  enabled: false

pyroscope:
  enabled: false

loki:
  enabled: false

tempo:
  enabled: false

I'm running it right now with these values and it works almost perfectly. Without the grafana agent, logs are not correctly matched (logger field not detected) - I've seen json support was tracked with #8, it may resolve this issue. I had to add service monitors by myself, I opened issue #67 for this matter.

demo v0.6.0 is available in the https://zadkiel.fr/coder-observability helm repository

@aslafy-z aslafy-z requested a review from dannykopping October 24, 2025 10:54
@dannykopping
Copy link
Collaborator

Almost there, thank you for your patience @aslafy-z - it's greatly appreciated!

@aslafy-z aslafy-z requested a review from dannykopping October 24, 2025 16:39
Copy link
Collaborator

@dannykopping dannykopping left a comment

Choose a reason for hiding this comment

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

Thanks for all the hard work on this @aslafy-z! Much appreciated.

Signed-off-by: Danny Kopping <[email protected]>
@dannykopping dannykopping merged commit be89d50 into coder:main Oct 27, 2025
1 check passed
@dannykopping dannykopping mentioned this pull request Oct 27, 2025
@aslafy-z aslafy-z deleted the feat/dashboard-labels branch October 27, 2025 15:21
@aslafy-z
Copy link
Contributor Author

@dannykopping would you mind labelling this PR with hacktoberfest-accepted so it could be counted as eligible for my Hacktoberfest PR count? Thank you

@dannykopping
Copy link
Collaborator

@aslafy-z done!

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.

Ability to use dashboards outside of the helm chart

2 participants