Skip to content

fix: add datasource regex to KPS dashboards to lock datasource selection#662

Merged
AndrejsPon00 merged 1 commit into
mainfrom
add-datasource-regex
Dec 15, 2025
Merged

fix: add datasource regex to KPS dashboards to lock datasource selection#662
AndrejsPon00 merged 1 commit into
mainfrom
add-datasource-regex

Conversation

@AndrejsPon00
Copy link
Copy Markdown
Contributor

@AndrejsPon00 AndrejsPon00 commented Dec 5, 2025

Closes #638

@AndrejsPon00 AndrejsPon00 requested a review from gmlexx as a code owner December 5, 2025 19:03
Copilot AI review requested due to automatic review settings December 5, 2025 19:03
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds datasource regex configuration support to KPS (Kube Prometheus Stack) Grafana dashboards to enable locking datasource selection. The changes replace hardcoded empty regex values with templated values from Helm chart configuration.

Key changes:

  • Added Helm template variable $Values at the start of each dashboard file
  • Replaced hardcoded regex: "" with regex: {{ $Values.grafana.dashboard.datasource.regex | default "" }}
  • Escaped Grafana template variables in legendFormat fields to prevent Helm template conflicts

Reviewed changes

Copilot reviewed 28 out of 28 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
kps-workload-total.yaml Added datasource regex templating and escaped legend format variables
kps-scheduler.yaml Added datasource regex templating and escaped legend format variables
kps-proxy.yaml Added datasource regex templating and escaped legend format variables
kps-prometheus.yaml Added datasource regex templating and escaped legend format variables
kps-pod-total.yaml Added datasource regex templating
kps-persistentvolumesusage.yaml Added datasource regex templating
kps-nodes.yaml Added datasource regex templating and escaped legend format variables
kps-nodes-darwin.yaml Added datasource regex templating and escaped legend format variables
kps-nodes-aix.yaml Added datasource regex templating and escaped legend format variables
kps-node-rsrc-use.yaml Added datasource regex templating and escaped legend format variables
kps-node-cluster-rsrc-use.yaml Added datasource regex templating and escaped legend format variables
kps-namespace-by-workload.yaml Added datasource regex templating
kps-namespace-by-pod.yaml Added datasource regex templating
kps-kubelet.yaml Added datasource regex templating and escaped legend format variables
kps-k8s-resources-workloads-namespace.yaml Added datasource regex templating and escaped legend format variables
kps-k8s-resources-workload.yaml Added datasource regex templating
kps-k8s-resources-pod.yaml Added datasource regex templating
kps-k8s-resources-node.yaml Added datasource regex templating and escaped legend format variables
kps-k8s-resources-namespace.yaml Added datasource regex templating
kps-k8s-resources-multicluster.yaml Added datasource regex templating
kps-k8s-resources-cluster.yaml Added datasource regex templating
kps-k8s-coredns.yaml Added datasource regex templating and escaped legend format variables
kps-grafana-overview.yaml Added datasource regex templating and escaped legend format variables
kps-etcd.yaml Added datasource regex templating and escaped legend format variables
kps-controller-manager.yaml Added datasource regex templating and escaped legend format variables
kps-cluster-total.yaml Added datasource regex templating
kps-apiserver.yaml Added datasource regex templating and escaped legend format variables
kps-alertmanager-overview.yaml Added datasource regex templating, escaped legend format variables, and cleaned up datasource current value

@AndrejsPon00 AndrejsPon00 merged commit f9a23a5 into main Dec 15, 2025
10 checks passed
@github-project-automation github-project-automation Bot moved this to Done in k0rdent Dec 15, 2025
@AndrejsPon00 AndrejsPon00 deleted the add-datasource-regex branch December 15, 2025 13:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

Grafana: Streamline list of Data Sources

4 participants