diff --git a/assets/grafana/deployment-dashboard.json b/assets/grafana/deployment-dashboard.json index 69638d15690c68d1c21a9aafe1d310a92345e8d1..357bd8e65d1df25e2a14c6616a8aa027d6ac40bc 100644 --- a/assets/grafana/deployment-dashboard.json +++ b/assets/grafana/deployment-dashboard.json @@ -302,7 +302,7 @@ "targets": [ { "refId": "A", - "expr": "kube_deployment_spec_replicas{deployment=\"$deployment_name\",namespace=\"$deployment_namespace\"}", + "expr": "max(kube_deployment_spec_replicas{deployment=\"$deployment_name\",namespace=\"$deployment_namespace\"}) without (instance)", "intervalFactor": 2, "step": 600, "metric": "kube_deployment_spec_replicas" @@ -381,7 +381,7 @@ "targets": [ { "refId": "A", - "expr": "kube_deployment_status_replicas_available{deployment=\"$deployment_name\",namespace=\"$deployment_namespace\"}", + "expr": "min(kube_deployment_status_replicas_available{deployment=\"$deployment_name\",namespace=\"$deployment_namespace\"}) without (instance)", "intervalFactor": 2, "step": 600 } @@ -505,7 +505,7 @@ }, "targets": [ { - "expr": "kube_deployment_status_observed_generation{deployment=\"$deployment_name\",namespace=\"$deployment_namespace\"}", + "expr": "max(kube_deployment_status_observed_generation{deployment=\"$deployment_name\",namespace=\"$deployment_namespace\"}) without (instance)", "intervalFactor": 2, "legendFormat": "", "refId": "A", @@ -583,7 +583,7 @@ }, "targets": [ { - "expr": "kube_deployment_metadata_generation{deployment=\"$deployment_name\",namespace=\"$deployment_namespace\"}", + "expr": "max(kube_deployment_metadata_generation{deployment=\"$deployment_name\",namespace=\"$deployment_namespace\"}) without (instance)", "intervalFactor": 2, "legendFormat": "", "refId": "A", @@ -649,35 +649,35 @@ "steppedLine": false, "targets": [ { - "expr": "kube_deployment_status_replicas{deployment=\"$deployment_name\",namespace=\"$deployment_namespace\"}", + "expr": "max(kube_deployment_status_replicas{deployment=\"$deployment_name\",namespace=\"$deployment_namespace\"}) without (instance)", "intervalFactor": 2, "legendFormat": "current replicas", "refId": "A", "step": 30 }, { - "expr": "kube_deployment_status_replicas_available{deployment=\"$deployment_name\",namespace=\"$deployment_namespace\"}", + "expr": "min(kube_deployment_status_replicas_available{deployment=\"$deployment_name\",namespace=\"$deployment_namespace\"}) without (instance)", "intervalFactor": 2, "legendFormat": "available", "refId": "B", "step": 30 }, { - "expr": "kube_deployment_status_replicas_unavailable{deployment=\"$deployment_name\",namespace=\"$deployment_namespace\"}", + "expr": "max(kube_deployment_status_replicas_unavailable{deployment=\"$deployment_name\",namespace=\"$deployment_namespace\"}) without (instance)", "intervalFactor": 2, "legendFormat": "unavailable", "refId": "C", "step": 30 }, { - "expr": "kube_deployment_status_replicas_updated{deployment=\"$deployment_name\",namespace=\"$deployment_namespace\"}", + "expr": "min(kube_deployment_status_replicas_updated{deployment=\"$deployment_name\",namespace=\"$deployment_namespace\"}) without (instance)", "intervalFactor": 2, "legendFormat": "updated", "refId": "D", "step": 30 }, { - "expr": "kube_deployment_spec_replicas{deployment=\"$deployment_name\",namespace=\"$deployment_namespace\"}", + "expr": "max(kube_deployment_spec_replicas{deployment=\"$deployment_name\",namespace=\"$deployment_namespace\"}) without (instance)", "intervalFactor": 2, "legendFormat": "desired", "refId": "E", diff --git a/manifests/exporters/kube-state-metrics-deployment.yaml b/manifests/exporters/kube-state-metrics-deployment.yaml index 6ef971cefa096af3bf0f5c2c30ba93c41f8a4566..3fec8caded34fe0379b201ea35799e2fb82e3696 100644 --- a/manifests/exporters/kube-state-metrics-deployment.yaml +++ b/manifests/exporters/kube-state-metrics-deployment.yaml @@ -3,7 +3,7 @@ kind: Deployment metadata: name: kube-state-metrics spec: - replicas: 1 + replicas: 2 template: metadata: labels: diff --git a/manifests/grafana/grafana-dashboards.yaml b/manifests/grafana/grafana-dashboards.yaml index f9757dc1abb40aad9b11ae44d6160e2c39b6c970..b9cfac085c85ab3c547f99a759f137fe64cc87f4 100644 --- a/manifests/grafana/grafana-dashboards.yaml +++ b/manifests/grafana/grafana-dashboards.yaml @@ -1166,7 +1166,7 @@ data: "targets": [ { "refId": "A", - "expr": "kube_deployment_spec_replicas{deployment=\"$deployment_name\",namespace=\"$deployment_namespace\"}", + "expr": "max(kube_deployment_spec_replicas{deployment=\"$deployment_name\",namespace=\"$deployment_namespace\"}) without (instance)", "intervalFactor": 2, "step": 600, "metric": "kube_deployment_spec_replicas" @@ -1245,7 +1245,7 @@ data: "targets": [ { "refId": "A", - "expr": "kube_deployment_status_replicas_available{deployment=\"$deployment_name\",namespace=\"$deployment_namespace\"}", + "expr": "min(kube_deployment_status_replicas_available{deployment=\"$deployment_name\",namespace=\"$deployment_namespace\"}) without (instance)", "intervalFactor": 2, "step": 600 } @@ -1369,7 +1369,7 @@ data: }, "targets": [ { - "expr": "kube_deployment_status_observed_generation{deployment=\"$deployment_name\",namespace=\"$deployment_namespace\"}", + "expr": "max(kube_deployment_status_observed_generation{deployment=\"$deployment_name\",namespace=\"$deployment_namespace\"}) without (instance)", "intervalFactor": 2, "legendFormat": "", "refId": "A", @@ -1447,7 +1447,7 @@ data: }, "targets": [ { - "expr": "kube_deployment_metadata_generation{deployment=\"$deployment_name\",namespace=\"$deployment_namespace\"}", + "expr": "max(kube_deployment_metadata_generation{deployment=\"$deployment_name\",namespace=\"$deployment_namespace\"}) without (instance)", "intervalFactor": 2, "legendFormat": "", "refId": "A", @@ -1513,35 +1513,35 @@ data: "steppedLine": false, "targets": [ { - "expr": "kube_deployment_status_replicas{deployment=\"$deployment_name\",namespace=\"$deployment_namespace\"}", + "expr": "max(kube_deployment_status_replicas{deployment=\"$deployment_name\",namespace=\"$deployment_namespace\"}) without (instance)", "intervalFactor": 2, "legendFormat": "current replicas", "refId": "A", "step": 30 }, { - "expr": "kube_deployment_status_replicas_available{deployment=\"$deployment_name\",namespace=\"$deployment_namespace\"}", + "expr": "min(kube_deployment_status_replicas_available{deployment=\"$deployment_name\",namespace=\"$deployment_namespace\"}) without (instance)", "intervalFactor": 2, "legendFormat": "available", "refId": "B", "step": 30 }, { - "expr": "kube_deployment_status_replicas_unavailable{deployment=\"$deployment_name\",namespace=\"$deployment_namespace\"}", + "expr": "max(kube_deployment_status_replicas_unavailable{deployment=\"$deployment_name\",namespace=\"$deployment_namespace\"}) without (instance)", "intervalFactor": 2, "legendFormat": "unavailable", "refId": "C", "step": 30 }, { - "expr": "kube_deployment_status_replicas_updated{deployment=\"$deployment_name\",namespace=\"$deployment_namespace\"}", + "expr": "min(kube_deployment_status_replicas_updated{deployment=\"$deployment_name\",namespace=\"$deployment_namespace\"}) without (instance)", "intervalFactor": 2, "legendFormat": "updated", "refId": "D", "step": 30 }, { - "expr": "kube_deployment_spec_replicas{deployment=\"$deployment_name\",namespace=\"$deployment_namespace\"}", + "expr": "max(kube_deployment_spec_replicas{deployment=\"$deployment_name\",namespace=\"$deployment_namespace\"}) without (instance)", "intervalFactor": 2, "legendFormat": "desired", "refId": "E",