-
Notifications
You must be signed in to change notification settings - Fork 600
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
fix(dashboards): use new grafonnet for apiserver dashboard #890
fix(dashboards): use new grafonnet for apiserver dashboard #890
Conversation
@@ -11,7 +11,7 @@ | |||
refresh: kubernetesMixin._config.grafanaK8s.refresh, | |||
tags: kubernetesMixin._config.grafanaK8s.dashboardTags, | |||
|
|||
rows: [ | |||
[if 'rows' in super then 'rows']: [ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Grafana layout engine doesn't operate on 'rows' anymore (is really old), it now uses a grid system. I've included the defaults that exist in this file directly on the dashboard, we can generalize as more dashboards get ported.
panel-datasource-rule: | ||
reason: The new Grafonnet promotes the use of datasources at the query level. This should probably end up in the linter as a valid option. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The linter wants that the Panel has a datasource set that matches the template variable, this is debatable. Panels do not really deal with datasources, the value at the panel level is passed through by the UI to the query targets.
When you only use one data source, this doesn't matter that much but when combining queries from multiple data sources on the same panel, then you have to set it to -- Mixed --
on the Panel level.
This is the what the new Grafonnet does, from a jsonnet/code perspective you'll see that the data source is configured on the query rather than the panel.
Thanks for this, rebase needed :) |
18b187a
to
bec80ad
Compare
Rebased, dropped a few commits. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for this
ref: #888
This updates the apiserver dashboard to use the new Grafonnet.
This will cause some changes but should result in the same dashboard.
A few noteable changes:
The code abstracts a few of these panels into separate functions to avoid duplication a bit.
Also see inline comments about a few changes outside the dashboard.