@@ -163,6 +163,45 @@ local var = g.dashboard.variable;
163163 ];
164164
165165 local panels = [
166+ tsPanel.new('Pod Count per Workload' )
167+ + tsPanel.gridPos.withW(24 )
168+ + tsPanel.queryOptions.withTargets([
169+ prometheus.new(
170+ '${datasource}' ,
171+ 'sum by (cluster, namespace, deployment) (kube_deployment_spec_replicas{%(clusterLabel)s="$cluster", namespace="$namespace", deployment="$workload"})' % $._config
172+ ) + prometheus.withLegendFormat('{{deployment}} desired' )
173+ + prometheus.withRefId('D' ),
174+
175+ prometheus.new(
176+ '${datasource}' ,
177+ 'sum by (cluster, namespace, deployment) (kube_deployment_status_replicas_available{%(clusterLabel)s="$cluster", namespace="$namespace", deployment="$workload"})' % $._config
178+ ) + prometheus.withLegendFormat('{{deployment}} available' )
179+ + prometheus.withRefId('E' ),
180+
181+ prometheus.new(
182+ '${datasource}' ,
183+ 'sum by (cluster, namespace, statefulset) (kube_statefulset_replicas{%(clusterLabel)s="$cluster", namespace="$namespace", statefulset="$workload"})' % $._config
184+ ) + prometheus.withLegendFormat('{{statefulset}} desired' )
185+ + prometheus.withRefId('F' ),
186+
187+ prometheus.new(
188+ '${datasource}' ,
189+ 'sum by (cluster, namespace, statefulset) (kube_statefulset_status_replicas_ready{%(clusterLabel)s="$cluster", namespace="$namespace", statefulset="$workload"})' % $._config
190+ ) + prometheus.withLegendFormat('{{statefulset}} available' )
191+ + prometheus.withRefId('G' ),
192+
193+ prometheus.new(
194+ '${datasource}' ,
195+ 'sum by (cluster, namespace, daemonset) (kube_daemonset_status_desired_number_scheduled{%(clusterLabel)s="$cluster", namespace="$namespace", daemonset="$workload"})' % $._config
196+ ) + prometheus.withLegendFormat('{{daemonset}} desired' )
197+ + prometheus.withRefId('H' ),
198+
199+ prometheus.new(
200+ '${datasource}' ,
201+ 'sum by (cluster, namespace, daemonset) (kube_daemonset_status_number_available{%(clusterLabel)s="$cluster", namespace="$namespace", daemonset="$workload"})' % $._config
202+ ) + prometheus.withLegendFormat('{{daemonset}} available' )
203+ + prometheus.withRefId('I' ),
204+ ]),
166205 tsPanel.new('CPU Usage' )
167206 + tsPanel.gridPos.withW(24 )
168207 + tsPanel.queryOptions.withTargets([
0 commit comments