@@ -29,23 +29,23 @@ local template = grafana.template;
2929 sort=1
3030 ),
3131
32- local workloadTemplate =
32+ local workloadTypeTemplate =
3333 template.new(
34- name='workload ' ,
34+ name='type ' ,
3535 datasource='$datasource' ,
36- query='label_values(namespace_workload_pod:kube_pod_owner:relabel{%(clusterLabel)s="$cluster", namespace="$namespace"}, workload )' % $._config.clusterLabel,
36+ query='label_values(namespace_workload_pod:kube_pod_owner:relabel{%(clusterLabel)s="$cluster", namespace="$namespace"}, workload_type )' % $._config.clusterLabel,
3737 current='' ,
3838 hide='' ,
3939 refresh=2 ,
4040 includeAll=false ,
4141 sort=1
4242 ),
4343
44- local workloadTypeTemplate =
44+ local workloadTemplate =
4545 template.new(
46- name='type ' ,
46+ name='workload ' ,
4747 datasource='$datasource' ,
48- query='label_values(namespace_workload_pod:kube_pod_owner:relabel{%(clusterLabel)s="$cluster", namespace="$namespace", workload ="$workload "}, workload_type )' % $._config.clusterLabel,
48+ query='label_values(namespace_workload_pod:kube_pod_owner:relabel{%(clusterLabel)s="$cluster", namespace="$namespace", workload_type ="$type "}, workload )' % $._config.clusterLabel,
4949 current='' ,
5050 hide='' ,
5151 refresh=2 ,
@@ -315,7 +315,7 @@ local template = grafana.template;
315315 )
316316 ) + {
317317 templating+: {
318- list+: [clusterTemplate, namespaceTemplate, workloadTemplate, workloadTypeTemplate ],
318+ list+: [clusterTemplate, namespaceTemplate, workloadTypeTemplate, workloadTemplate ],
319319 },
320320 },
321321 },
0 commit comments