-
Notifications
You must be signed in to change notification settings - Fork 500
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support grafana additional volumeMounts field. (#3960)
- Loading branch information
1 parent
e405d4d
commit a015396
Showing
11 changed files
with
2,208 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,6 +3,7 @@ kind: TidbMonitor | |
metadata: | ||
name: basic | ||
spec: | ||
replicas: 1 | ||
clusters: | ||
- name: basic | ||
prometheus: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
# An example describes how to mount a custom dashboard JSON file for Grafana. | ||
|
||
> **Note:** | ||
> | ||
> This document is to show how to mount a custom dashboard for Grafana in TidbMonitor. | ||
> This would help to customize the user's Grafana dashboards. | ||
## Install | ||
|
||
The following commands are assumed to be executed in this directory. | ||
|
||
Create custom dashboard JSON with configMap: | ||
|
||
```bash | ||
kubectl apply -f custom-dashboard.yaml -n ${namespace} | ||
``` | ||
|
||
Install TidbMonitor: | ||
|
||
```bash | ||
kubectl apply -f tidb-monitor.yaml -n ${namespace} | ||
``` | ||
|
||
Wait for Pods ready: | ||
|
||
```bash | ||
watch kubectl -n ${namespace} get pod | ||
``` | ||
|
||
Explore the monitoring dashboards: | ||
|
||
```bash | ||
kubectl -n ${namespace} port-forward svc/basic-grafana 3000:3000 | ||
``` | ||
|
||
Browse [localhost:3000](http://localhost:3000), and check the custom dashboard. | ||
|
||
## Uninstall | ||
|
||
Uninstall TidbMonitor: | ||
|
||
```bash | ||
kubectl delete -f tidb-monitor.yaml -n ${namespace} | ||
``` | ||
|
||
Delete the external configMap: | ||
|
||
```bash | ||
kubectl delete -f custom-dashboard.yaml -n ${namespace} | ||
``` |
Oops, something went wrong.