| {%- from "kubernetes/map.jinja" import common with context %} |
| {%- from "kubernetes/map.jinja" import master with context %} |
| |
| {%- if master.get('enabled', False) %} |
| {% set network = master.get('network', []) %} |
| {% endif %} |
| |
| dashboard: |
| kubernetes-cluster-prometheus: |
| datasource: prometheus |
| format: json |
| template: kubernetes/files/grafana_dashboards/kubernetes_cluster_prometheus.json |
| {%- if network is defined and network.get('engine') == 'calico' %} |
| calico-prometheus: |
| datasource: prometheus |
| format: json |
| template: kubernetes/files/grafana_dashboards/calico_prometheus.json |
| {%- endif %} |
| kubernetes: |
| datasource: influxdb |
| format: json |
| template: kubernetes/files/grafana_dashboards/kubernetes_influxdb.json |
| {%- if network is defined and network.get('engine') == 'calico' %} |
| calico: |
| datasource: influxdb |
| format: json |
| template: kubernetes/files/grafana_dashboards/calico_influxdb.json |
| {%- endif %} |
| main: |
| datasource: influxdb |
| row: |
| kubernetes-control-plane: |
| title: Kubernetes Control Plane |
| panel: |
| kubernetes: |
| title: Kubernetes |
| links: |
| - dashboard: Kubernetes |
| title: Kubernetes |
| type: dashboard |
| target: |
| cluster_status: |
| rawQuery: true |
| query: SELECT last(value) FROM cluster_status WHERE cluster_name = 'k8s-master' AND environment_label = '$environment' AND $timeFilter GROUP BY time($interval) fill(null) |
| kubernetes-data-plane: |
| title: Kubernetes Data Plane |
| panel: |
| kubernetes: |
| title: Kubernetes |
| links: |
| - dashboard: Kubernetes |
| title: Kubernetes |
| type: dashboard |
| target: |
| cluster_status: |
| rawQuery: true |
| query: SELECT last(value) FROM cluster_status WHERE cluster_name = 'k8s-pool' AND environment_label = '$environment' AND $timeFilter GROUP BY time($interval) fill(null) |