-
Notifications
You must be signed in to change notification settings - Fork 500
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
Use grafana provisioning to replace dashboard installer #388
Conversation
There should be some documents about how the zipped dashboards come from, so other contributors know how to update it when there are newer dashboards in the upstream. |
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.
Good job! I just left a format suggestion and a question.
"type": "file" | ||
} | ||
] | ||
} |
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.
Keep a new line at the end of file, so do the rest files
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.
Accept
9928a25
to
67e690f
Compare
Accept
|
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.
LGTM
why not build an image which contains the config file, avoid to save config files to the configmap? |
@xiaojingchen It's more convient to use configmap instead of a static docker image, especially when the dashboards needs to be updated. |
- "/bin/sh" | ||
- "-c" | ||
- > | ||
gzip -dc /tmp/dashboard-gz/tidb.json.gz > /grafana-dashboard-definitions/tidb/tidb.json; |
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.
use &&
instead of ;
?
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.
4115cf1
to
07db5fd
Compare
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.
lgtm
* Move tidb-operator architecture section to a new page * Apply suggestions from code review Co-authored-by: Ran <huangran@pingcap.com> * Apply suggestions from code review Co-authored-by: Ran <huangran@pingcap.com> Co-authored-by: Ran <huangran@pingcap.com>
Function
In the higher version of grafana,. it improve the experience by adding a new active provisioning system that uses config files. So we can remove dashboard installer logic by the feature.
But there is a problem the file of dashboard is too large exceed the limitation of ConfigMap's annotation field, we have to compress it by gzip.
The logic is here:
The content is binary data
postStart: exec: command: - "/bin/sh" - "-c" - > gzip -dc /tmp/dashboard-gz/tidb.json.gz > /grafana-dashboard-definitions/tidb/tidb.json; gzip -dc /tmp/dashboard-gz/pd.json.gz > /grafana-dashboard-definitions/tidb/pd.json; gzip -dc /tmp/dashboard-gz/tikv.json.gz > /grafana-dashboard-definitions/tidb/tikv.json; gzip -dc /tmp/dashboard-gz/overview.json.gz > /grafana-dashboard-definitions/tidb/overview.json;
Test