Skip to content

Commit

Permalink
kommander: Fixes to the clusters summary dashboard (#460)
Browse files Browse the repository at this point in the history
* kommander: Fix managed cluster count graph

* kommander: Bump chart version

* kommander: Change clusters dashboard uid

* kommander: Use dashboard name for home dashboard job

* kommander: Add [Global] suffix to clusters dashbaord name
  • Loading branch information
gracedo authored Feb 25, 2020
1 parent a42892b commit becc0e1
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 19 deletions.
2 changes: 1 addition & 1 deletion stable/kommander/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ maintainers:
- name: alejandroEsc
- name: jimmidyson
name: kommander
version: 0.4.15
version: 0.4.16
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,7 @@ metadata:
data:
k8s-resources-clusters-dashboard.json: |-
{
"__inputs": [
{
"name": "DS_KOMMANDERPROMETHEUS",
"label": "KommanderPrometheus",
"description": "",
"type": "datasource",
"pluginId": "prometheus",
"pluginName": "Prometheus"
}
],
"__inputs": [],
"__requires": [
{
"type": "grafana",
Expand Down Expand Up @@ -70,12 +61,12 @@ data:
"gnetId": null,
"graphTooltip": 0,
"id": null,
"iteration": 1582226941429,
"iteration": 1582323837127,
"links": [],
"panels": [
{
"cacheTimeout": null,
"datasource": "${DS_KOMMANDERPROMETHEUS}",
"datasource": "$datasource",
"gridPos": {
"h": 6,
"w": 24,
Expand Down Expand Up @@ -124,7 +115,7 @@ data:
"pluginVersion": "6.6.0",
"targets": [
{
"expr": "count(thanos_store_nodes_grpc_connections)",
"expr": "count(prometheus_build_info)",
"refId": "A"
}
],
Expand Down Expand Up @@ -2677,8 +2668,8 @@ data:
]
},
"timezone": "",
"title": "Kubernetes / Compute Resources / Clusters",
"uid": "efa86fd1d0c121a26444b636a3f509a8",
"title": "Kubernetes / Compute Resources / Cluster [Global]",
"uid": "f0U1EswWk",
"version": 1
}
{{- end }}
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ data:
set -o errexit
set -o pipefail
CURL="curl --verbose --fail --max-time 30 --retry 20 --retry-connrefused"
DASHBOARD_ID=$($CURL -H "X-Forwarded-User: $X_FORWARDED_USER" {{ .Values.grafana.hooks.serviceURL }}/api/dashboards/uid/{{ .Values.grafana.hooks.homeDashboardUID }} | jq '.dashboard.id')
DASHBOARD_ID=$($CURL -H "X-Forwarded-User: $X_FORWARDED_USER" {{ .Values.grafana.hooks.serviceURL }}/api/search/?query={{ .Values.grafana.hooks.dashboardName | urlquery }} | jq '.[0].id')
echo "setting home dashboard to ID" $DASHBOARD_ID
$CURL -X PUT -H "Content-Type: application/json" -H "X-Forwarded-User: $X_FORWARDED_USER" -d '{"homeDashboardId":'"$DASHBOARD_ID"'}' {{ .Values.grafana.hooks.serviceURL }}/api/org/preferences
---
Expand Down
3 changes: 1 addition & 2 deletions stable/kommander/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,7 @@ grafana:
image: dwdraju/alpine-curl-jq
secretKeyRef: ops-portal-username
serviceURL: http://kommander-kubeaddons-grafana.kommander
# This is the UID of the "Kubernetes / Compute Resources / Clusters" summary dashboard
homeDashboardUID: efa86fd1d0c121a26444b636a3f509a8
dashboardName: "Kubernetes / Compute Resources / Cluster [Global]"
kommanderServiceAccount: kommander-kubeaddons

## Do not deploy default dashboards.
Expand Down

0 comments on commit becc0e1

Please sign in to comment.