Browse Source

Merge "2. Add persistency for grafana dashboards"

changes/64/746864/10
Zuul 2 months ago
committed by Gerrit Code Review
parent
commit
a287271fb0
3 changed files with 21 additions and 0 deletions
  1. +3
    -0
      doc/source/user/index.rst
  2. +9
    -0
      magnum/drivers/common/templates/kubernetes/helm/prometheus-operator.sh
  3. +9
    -0
      releasenotes/notes/altered_grafanaUI_dashboards_persistency-1106b2e259a769b0.yaml

+ 3
- 0
doc/source/user/index.rst View File

@ -1500,6 +1500,9 @@ _`monitoring_storage_class_name`
The kubernetes storage class name to use for the prometheus pvc.
Using this label will activate the usage of a pvc instead of local
disk space.
When using monitoring_storage_class_name 2 pvcs will be created.
One for the prometheus server which size is set by
monitoring_retention_size and one for grafana which is fixed at 1Gi.
Default: ""
_`prometheus_adapter_enabled`


+ 9
- 0
magnum/drivers/common/templates/kubernetes/helm/prometheus-operator.sh View File

@ -24,7 +24,12 @@ EOF
# Because the PVC and Prometheus use different scales for the volume size
# conversion is needed. The prometheus-monitoring value (in GB) is the conversion
# with a ratio of (1 GiB = 1.073741824 GB) and then rounded to int
MONITORING_RETENTION_SIZE_GB=$(echo | awk "{print int(${MONITORING_RETENTION_SIZE}*1.073741824)}")
APP_GRAFANA_PERSISTENT_STORAGE="false"
if [ "${MONITORING_STORAGE_CLASS_NAME}" != "" ]; then
APP_GRAFANA_PERSISTENT_STORAGE="true"
fi
# Validate if communication node <-> master is secure or insecure
PROTOCOL="https"
@ -71,6 +76,10 @@ prometheus-operator:
cpu: 100m
memory: 128Mi
adminPassword: ${GRAFANA_ADMIN_PASSWD}
persistence:
enabled: ${APP_GRAFANA_PERSISTENT_STORAGE}
storageClassName: ${MONITORING_STORAGE_CLASS_NAME}
size: 1Gi
kubeApiServer:
tlsConfig:


+ 9
- 0
releasenotes/notes/altered_grafanaUI_dashboards_persistency-1106b2e259a769b0.yaml View File

@ -0,0 +1,9 @@
---
features:
- |
Add persistency for grafana UI altered dashboards. To enable this use
monitoring_storage_class_name label.
It is recommended that dashboards be persisted by other means, mainly
by using kubernetes configMaps. More info [0].
[0] https://github.com/helm/charts/tree/master/stable/grafana#sidecar-for-dashboards

Loading…
Cancel
Save