Skip to content

Add the operator overview and conditions browser Grafana dashboards #186

Description

@sourcehawk

Add the operator overview and conditions browser Grafana dashboards

Problem

There is no dashboard that shows an operator built on the framework end to end: controller-runtime reconcile and workqueue health, what the framework did to each managed resource, and the condition state of the owners it manages. The upstream conditions browser covers conditions only, hardcodes exported_namespace, shows stale series from former-leader pods, and declares a resource variable it never uses.

Approach

  • observability/dashboards/ocf_operator.tpl.json (uid {{operator_namespace}}ocf_operator): variables datasource, job, controller (multi). Rows: Overview stat tiles (reconciles/s, error ratio, p99 reconcile time, p99 queue wait, active/max workers, leader, owners Ready, owners not Ready for more than 2m, owners Unknown); Reconciliation; Workqueue; Managed resources (apply rate by operation, updated rate per component/resource, not-converging ratio and apply-error ratio grouped by the full metric identity); Conditions (owners by condition type and status, "Owners not Ready" table with reason, Since and coloured Status, data link into the browser); API client; Process (collapsed). Stat tiles run instant queries.
  • observability/dashboards/crd_conditions_browser.tpl.json (uid {{operator_namespace}}crd_conditions_browser): carried over from upstream with {{namespace_label}} templated, a Since column and coloured Status column, the count stats filtered consistently with the table, the resource_id variable made visible and wired into the panels, wildcard All values so cluster-scoped owners stay visible, and a tag-based link to the overview.
  • Dashboard uids are templated with the metric namespace so two operators' renders coexist in one Grafana; the alert dashboard_url annotations render with the same namespace and deep-link into that operator's browser.
  • Every condition query joins on the freshest series per owner: topk by (kind, id) (1, ...), or topk by (kind, id, condition) when the query spans condition types.
  • make lint-dashboards runs a Go test over the templates: valid JSON/YAML after rendering, uids, no leftover placeholders, every referenced metric name exists, every alert has a promtool test, exactly one severity label valued warning or critical; it runs in the CI observability job.

Verification

  • make dashboards METRIC_NAMESPACE=demo renders both files and make lint-dashboards passes.
  • On the local stack, every panel of both dashboards is populated by the simulator's world, the controller variable filters all rows consistently, the "Owners not Ready" table links into the browser pre-filtered to the clicked owner, the alert dashboard_url annotations resolve to the rendered browser uid, the browser's count stats track its namespace filter, and the cluster-scoped simulator owner appears under namespace All and disappears under a concrete namespace.
  • Neither dashboard has auto-refresh enabled by default.

Context

Sub-issue of #183.

Metadata

Metadata

Assignees

Labels

featureUser-observable capability or surface

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions