Closed danushadhitya closed 1 month ago
Hi @danushadhitya, thank you for the PR.
I'm seeing an interpolation issue, which could be related to how withOptions fields are parsed, could you try this ?
byField: std.format('%s', $._config.clusterLabel)
Thanks for the comment @n888. I have fixed it now.
LGTM
Local diff test with k8s_cluster_name
clusterLabel:
index e6bb1b71..c3333fb2 100644
--- a/charts/grafana/mixin/dashboards/k8s-resources-multicluster.json
+++ b/charts/grafana/mixin/dashboards/k8s-resources-multicluster.json
@@ -354,7 +354,7 @@
{
"id": "joinByField",
"options": {
- "byField": "cluster",
+ "byField": "k8s_cluster_name",
"mode": "outer"
}
},
@@ -542,7 +542,7 @@
{
"id": "joinByField",
"options": {
- "byField": "cluster",
+ "byField": "k8s_cluster_name",
"mode": "outer"
}
},
Since, most of the selectors for the dashboard are overriden by custom variables.
File in path: dashboards/resources/multi-cluster.libsonnet does have the tranformation "byField" Selector hardcoded as "cluster" but whereas all other clustername selectors use the override variable "%(clusterLabel)s". This fork contains the change of converting hard-coded selector to over-ride selector which supports grafana dashboard.