Skip to content
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

Support grafana additional volumeMounts field. #3960

Merged
merged 17 commits into from
May 17, 2021
Merged
Show file tree
Hide file tree
Changes from 16 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions docs/api-references/docs.md
Original file line number Diff line number Diff line change
Expand Up @@ -6150,6 +6150,19 @@ IngressSpec
<em>(Optional)</em>
</td>
</tr>
<tr>
<td>
<code>additionalVolumeMounts</code></br>
<em>
<a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.18/#volumemount-v1-core">
[]Kubernetes core/v1.VolumeMount
</a>
</em>
</td>
<td>
<p>Additional volume mounts of grafana pod.</p>
</td>
</tr>
</tbody>
</table>
<h3 id="helperspec">HelperSpec</h3>
Expand Down
1 change: 1 addition & 0 deletions examples/basic/tidb-monitor.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ kind: TidbMonitor
metadata:
name: basic
spec:
replicas: 1
clusters:
- name: basic
prometheus:
Expand Down
50 changes: 50 additions & 0 deletions examples/monitor-with-externalConfigMap/grafana/README.md
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}
```
Loading