mirror of
				https://github.com/prometheus-operator/kube-prometheus.git
				synced 2025-10-31 08:01:32 +01:00 
			
		
		
		
	Datasource links were duplicated in the grafana dashboads. This now also allows exporting grafana dashboards from the UI and just dropping them into the assets directory and they will be wrapped by the manifest generation script.
		
			
				
	
	
		
			22 lines
		
	
	
		
			346 B
		
	
	
	
		
			Bash
		
	
	
		
			Executable File
		
	
	
	
	
			
		
		
	
	
			22 lines
		
	
	
		
			346 B
		
	
	
	
		
			Bash
		
	
	
		
			Executable File
		
	
	
	
	
| #!/bin/bash
 | |
| 
 | |
| cat <<-EOF
 | |
| apiVersion: v1
 | |
| kind: ConfigMap
 | |
| metadata:
 | |
|   name: grafana-dashboards
 | |
| data:
 | |
| EOF
 | |
| 
 | |
| for f in assets/grafana/*-dashboard.json
 | |
| do
 | |
|   echo "  $(basename $f): |+"
 | |
|   hack/scripts/wrap-dashboard.sh $f | sed "s/^/    /g"
 | |
| done
 | |
| 
 | |
| for f in assets/grafana/*-datasource.json
 | |
| do
 | |
|   echo "  $(basename $f): |+"
 | |
|   cat $f | sed "s/^/    /g"
 | |
| done
 |