Skip to content

Commit

Permalink
Added default dashboards for grafana (#131)
Browse files Browse the repository at this point in the history
* Added default dashboards for grafana

* Updated grafana chart

* Added doc and condition in configmap for dashboard.enabled

* Added grafana upgrade guide

* Updated github CI/CD docs

* Modified README
  • Loading branch information
dunefro authored Nov 16, 2023
1 parent f20b21e commit 44012fa
Show file tree
Hide file tree
Showing 7 changed files with 5,254 additions and 48 deletions.
9 changes: 5 additions & 4 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
name: '[CI/CD] Update README metadata'

on:
- pull_request
# paths:
# # - charts/*/values.yaml
# - 'charts/tfy-agent/values.yaml'
pull_request:
branches:
- 'main'
paths:
- 'charts/*'
jobs:
update-readme-metadata:
runs-on: ubuntu-latest
Expand Down
6 changes: 3 additions & 3 deletions charts/tfy-grafana/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
apiVersion: v2
name: tfy-grafana
description: Truefoundry grafana provisioner
version: 0.1.3
version: 0.1.4-rc.1
maintainers:
- name: truefoundry
- name: truefoundry
dependencies:
- name: grafana
version: 6.58.7
repository: "https://grafana.github.io/helm-charts"
repository: "https://grafana.github.io/helm-charts"
73 changes: 42 additions & 31 deletions charts/tfy-grafana/README.md
Original file line number Diff line number Diff line change
@@ -1,38 +1,49 @@
# Header
subheading

## Upgrade Guide

### From 1.3 to 1.4
- Default dashboards are now included with the grafana charts
- You can add the dashboards in the `dashboards/` folder
- Apply a label to the configmap via `.grafana.sidecar.dashboards.label` and `.grafana.sidecar.dashboards.labelValue`.


## Parameters

### grafana Configuration for Grafana deployment.
| Name | Description | Value |
| --------------------------------------------------------- | -------------------------------------------------- | -------------------- |
| `grafana.replicas` | StatefulSet configuration for Grafana. | `1` |
| `grafana.useStatefulSet` | Replicas configuration for Grafana. | `true` |
| `grafana.resources.limits.cpu` | CPU limit for Grafana. | `100m` |
| `grafana.resources.limits.memory` | Memory limit for Grafana. | `128Mi` |
| `grafana.resources.requests.cpu` | CPU request for Grafana. | `100m` |
| `grafana.resources.requests.memory` | Memory request for Grafana. | `128Mi` |
| `grafana.adminUser` | Admin user for Grafana. | `""` |
| `grafana.adminPassword` | Admin password for Grafana. | `""` |
| `grafana.initChownData.resources.limits.cpu` | CPU limit for initializing chown data. | `100m` |
| `grafana.initChownData.resources.limits.memory` | Memory limit for initializing chown data. | `128Mi` |
| `grafana.initChownData.resources.requests.cpu` | CPU request for initializing chown data. | `100m` |
| `grafana.initChownData.resources.requests.memory` | Memory request for initializing chown data. | `128Mi` |
| `grafana.sidecar.resources.limits.cpu` | CPU limit for Grafana sidecar. | `100m` |
| `grafana.sidecar.resources.limits.memory` | Memory limit for Grafana sidecar. | `100Mi` |
| `grafana.sidecar.resources.requests.cpu` | CPU request for Grafana sidecar. | `50m` |
| `grafana.sidecar.resources.requests.memory` | Memory request for Grafana sidecar. | `50Mi` |
| `grafana.datasources.datasources.yaml.apiVersion` | API version for the datasource configuration. | `1` |
| `grafana.datasources.datasources.yaml.datasources[0].name`| Name of the first datasource. | `Prometheus` |
| `grafana.datasources.datasources.yaml.datasources[0].type`| Type of the first datasource. | `prometheus` |
| `grafana.datasources.datasources.yaml.datasources[0].url` | URL for the first datasource. | `http://prometheus-kube-prometheus-prometheus.prometheus.svc.cluster.local:9090` |
| `grafana.datasources.datasources.yaml.datasources[0].access` | Access type for the first datasource. | `proxy` |
| `grafana.datasources.datasources.yaml.datasources[0].isDefault` | Specify if the first datasource is the default. | `true` |
| `grafana.datasources.datasources.yaml.datasources[1].name`| Name of the second datasource. | `Loki` |
| `grafana.datasources.datasources.yaml.datasources[1].type`| Type of the second datasource. | `loki` |
| `grafana.datasources.datasources.yaml.datasources[1].url` | URL for the second datasource. | `http://loki.loki.svc.cluster.local:3100` |
| `grafana.datasources.datasources.yaml.datasources[1].access` | Access type for the second datasource. | `proxy` |
| `grafana.datasources.datasources.yaml.datasources[1].isDefault` | Specify if the second datasource is the default.| `false` |
| `grafana.persistence.enabled` | Enable or disable persistence for Grafana. | `true` |
| `grafana.persistence.size` | Size of the persisted storage for Grafana. | `10Gi` |
| Name | Description | Value |
| --------------------------------------------------------------- | -------------------------------------------------- | ---------------------------- |
| `grafana.replicas` | StatefulSet configuration for Grafana. | `1` |
| `grafana.useStatefulSet` | Replicas configuration for Grafana. | `true` |
| `grafana.resources.limits.cpu` | CPU limit for Grafana. | `100m` |
| `grafana.resources.limits.memory` | Memory limit for Grafana. | `128Mi` |
| `grafana.resources.requests.cpu` | CPU request for Grafana. | `100m` |
| `grafana.resources.requests.memory` | Memory request for Grafana. | `128Mi` |
| `grafana.adminUser` | Admin user for Grafana. | `""` |
| `grafana.adminPassword` | Admin password for Grafana. | `""` |
| `grafana.initChownData.resources.limits.cpu` | CPU limit for initializing chown data. | `100m` |
| `grafana.initChownData.resources.limits.memory` | Memory limit for initializing chown data. | `128Mi` |
| `grafana.initChownData.resources.requests.cpu` | CPU request for initializing chown data. | `100m` |
| `grafana.initChownData.resources.requests.memory` | Memory request for initializing chown data. | `128Mi` |
| `grafana.sidecar.resources.limits.cpu` | CPU limit for Grafana sidecar. | `100m` |
| `grafana.sidecar.resources.limits.memory` | Memory limit for Grafana sidecar. | `100Mi` |
| `grafana.sidecar.resources.requests.cpu` | CPU request for Grafana sidecar. | `50m` |
| `grafana.sidecar.resources.requests.memory` | Memory request for Grafana sidecar. | `50Mi` |
| `grafana.sidecar.dashboards.enabled` | Whether to enable/disable dashboards | `false` |
| `grafana.sidecar.dashboards.label` | Label key for grafana dashboard configmap | `truefoundry_truevisibility` |
| `grafana.sidecar.dashboards.labelValue` | Label value for grafana dashboard configmap | `owner` |
| `grafana.datasources.datasources.yaml.apiVersion` | API version for the datasource configuration. | `1` |
| `grafana.datasources.datasources.yaml.datasources[0].name` | Name of the first datasource. | `Prometheus` |
| `grafana.datasources.datasources.yaml.datasources[0].type` | Type of the first datasource. | `prometheus` |
| `grafana.datasources.datasources.yaml.datasources[0].url` | URL for the first datasource. | `http://prometheus-kube-prometheus-prometheus.prometheus.svc.cluster.local:9090` |
| `grafana.datasources.datasources.yaml.datasources[0].access` | Access type for the first datasource. | `proxy` |
| `grafana.datasources.datasources.yaml.datasources[0].isDefault` | Specify if the first datasource is the default. | `true` |
| `grafana.datasources.datasources.yaml.datasources[1].name` | Name of the second datasource. | `Loki` |
| `grafana.datasources.datasources.yaml.datasources[1].type` | Type of the second datasource. | `loki` |
| `grafana.datasources.datasources.yaml.datasources[1].url` | URL for the second datasource. | `http://loki.loki.svc.cluster.local:3100` |
| `grafana.datasources.datasources.yaml.datasources[1].access` | Access type for the second datasource. | `proxy` |
| `grafana.datasources.datasources.yaml.datasources[1].isDefault` | Specify if the second datasource is the default. | `false` |
| `grafana.persistence.enabled` | Enable or disable persistence for Grafana. | `true` |
| `grafana.persistence.size` | Size of the persisted storage for Grafana. | `10Gi` |

Loading

0 comments on commit 44012fa

Please sign in to comment.