Skip to content

Commit

Permalink
Implement support for Grafana Operator v5 (#561)
Browse files Browse the repository at this point in the history
* Implement support for Grafana Operator v5

Implement changes to support Grafana Operator v5 when the new
grafana.integreatly.org CRD is available. Use the new CRDs as default
when they are available. Fallover to deploying with Grafana Operator v4
when the Grafana Operator v5 CRDs are not available, thereby providing
backwards compatibility to allow administrators time to migrate.

Additionally, the polystat plugin has been removed from the rhos-cloud
dashboard due to compatibility issues with grafana-cli usage when
dynamically loading plugins. Usage of Grafana Operator v5 is also a
target for disconnected support, and dynamically loading plugins in
these environments is expected to be a problem.

Related: OSPRH-2577
Closes: STF-1667

* Default Grafana role set to Admin

In order to match the previous (Grafana Operator v4) role, set
auto_assign_org_role to the Admin value. Default is Viewer.
  • Loading branch information
leifmadsen authored Jan 15, 2024
1 parent 665577e commit f2a24ef
Show file tree
Hide file tree
Showing 7 changed files with 376 additions and 236 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -365,6 +365,7 @@ spec:
- monitoring.coreos.com
- monitoring.rhobs
- elasticsearch.k8s.elastic.co
- grafana.integreatly.org
- integreatly.org
resources:
- '*'
Expand Down
1 change: 1 addition & 0 deletions deploy/role.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,7 @@ rules:
- monitoring.coreos.com
- monitoring.rhobs
- elasticsearch.k8s.elastic.co
- grafana.integreatly.org
- integreatly.org
resources:
- '*'
Expand Down
119 changes: 0 additions & 119 deletions roles/servicetelemetry/files/rhos-cloud-dashboard.json
Original file line number Diff line number Diff line change
Expand Up @@ -1418,125 +1418,6 @@
"align": false,
"alignLevel": null
}
},
{
"collapsed": false,
"datasource": "STFPrometheus",
"gridPos": {
"h": 1,
"w": 24,
"x": 0,
"y": 33
},
"id": 23,
"panels": [],
"title": "Instances",
"type": "row"
},
{
"colors": [
"#299c46",
"rgba(237, 129, 40, 0.89)",
"#d44a3a",
"#4040a0"
],
"datasource": "STFPrometheus",
"description": "Click instance for drill down view",
"fieldConfig": {
"defaults": {},
"overrides": []
},
"gridPos": {
"h": 5,
"w": 24,
"x": 0,
"y": 34
},
"id": 17,
"links": [],
"mappingType": 1,
"mappingTypes": [
{
"name": "value to text",
"value": 1
},
{
"name": "range to text",
"value": 2
}
],
"polystat": {
"animationSpeed": 2500,
"columnAutoSize": true,
"columns": "",
"defaultClickThrough": "",
"defaultClickThroughNewTab": false,
"defaultClickThroughSanitize": false,
"displayLimit": 100,
"fontAutoColor": true,
"fontAutoScale": true,
"fontSize": 12,
"fontType": "Roboto",
"globalDecimals": 2,
"globalDisplayMode": "all",
"globalDisplayTextTriggeredEmpty": "OK",
"globalOperatorName": "avg",
"globalUnitFormat": "short",
"gradientEnabled": true,
"hexagonSortByDirection": 1,
"hexagonSortByField": "name",
"maxMetrics": 0,
"polygonBorderColor": "black",
"polygonBorderSize": 2,
"polygonGlobalFillColor": "#FFF899",
"radius": "",
"radiusAutoSize": true,
"rowAutoSize": true,
"rows": "",
"shape": "hexagon_pointed_top",
"tooltipDisplayMode": "all",
"tooltipDisplayTextTriggeredEmpty": "OK",
"tooltipFontSize": 12,
"tooltipFontType": "Roboto",
"tooltipPrimarySortDirection": 2,
"tooltipPrimarySortField": "thresholdLevel",
"tooltipSecondarySortDirection": 2,
"tooltipSecondarySortField": "value",
"tooltipTimestampEnabled": true,
"valueEnabled": true
},
"rangeMaps": [
{
"from": "null",
"text": "N/A",
"to": "null"
}
],
"repeat": "projects",
"repeatDirection": "h",
"savedComposites": [],
"savedOverrides": [],
"targets": [
{
"exemplar": true,
"expr": "sum by (resource, plugin_instance) (label_replace(collectd_virt_memory{service=~\".+-$clouds-.+\"}, \"resource\", \"$1\", \"host\", \".+:(.+):.+\")) + on(resource) group_right(plugin_instance) ceilometer_cpu{project=\"$projects\", service=~\".+-$clouds-.+\"}",
"instant": true,
"interval": "",
"legendFormat": "{{plugin_instance}}",
"refId": "A"
}
],
"timeFrom": null,
"timeShift": null,
"title": "Project $projects",
"type": "grafana-polystat-panel",
"valueMaps": [
{
"op": "=",
"text": "N/A",
"value": "null"
}
]
}
],
"refresh": "1m",
Expand Down
Loading

0 comments on commit f2a24ef

Please sign in to comment.