Skip to content

Complete Grafana dashboard and ship with Helm chart #174

Description

@vriesdemichael

Summary

The Helm chart has grafanaDashboard.enabled: false and the dashboard template appears incomplete. Users need visibility into operator behavior but no ready-to-use dashboard is provided.

Problem

Current state:

  • values.yaml has grafanaDashboard.enabled: false
  • Dashboard ConfigMap template exists but content is minimal
  • Documentation references monitoring but no dashboard JSON is shipped
  • Users must create their own dashboards from scratch

Proposed Solution

1. Create Comprehensive Dashboard JSON

Dashboard should include panels for:

Reconciliation Overview

  • Reconciliation rate (success/failure)
  • Reconciliation duration (p50, p95, p99)
  • Active resources by type and phase
  • Error rate by error type

Rate Limiting

  • Tokens available (global and per-namespace)
  • Wait time histogram
  • Timeout count

Drift Detection

  • Orphaned resources count
  • Unmanaged resources count
  • Last successful drift check

Health

  • Leader election status
  • Database connection status
  • Keycloak instance status

2. Add to Helm Chart

# templates/grafana-dashboard-configmap.yaml
{{- if .Values.monitoring.grafanaDashboard.enabled }}
apiVersion: v1
kind: ConfigMap
metadata:
  name: {{ include "keycloak-operator.fullname" . }}-dashboard
  labels:
    {{- include "keycloak-operator.labels" . | nindent 4 }}
    grafana_dashboard: "1"
data:
  keycloak-operator.json: |
    {{ .Files.Get "dashboards/keycloak-operator.json" | indent 4 }}
{{- end }}

3. Enable by Default

Change default in values.yaml:

monitoring:
  grafanaDashboard:
    enabled: true  # Changed from false

Acceptance Criteria

  • Dashboard JSON created with all key metrics
  • Dashboard tested with Grafana 9.x and 10.x
  • Configmap template properly includes dashboard
  • Enabled by default
  • Screenshot added to documentation

References

  • ADR-048: Prometheus metrics exposure
  • Review finding: TODO/SENIOR_SRE_REVIEW.md

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions