Skip to content

Commit 884c992

Browse files
committed
example_grafana_prometheus_datasource
Signed-off-by: hwassman <[email protected]>
1 parent 6ec22c5 commit 884c992

File tree

4 files changed

+41
-0
lines changed

4 files changed

+41
-0
lines changed
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
apiVersion: grafana.integreatly.org/v1beta1
2+
kind: GrafanaDatasource
3+
metadata:
4+
name: prometheus-grafanadatasource
5+
namespace: grafana-for-cnsa
6+
spec:
7+
datasource:
8+
access: proxy
9+
basicAuthUser: internal
10+
editable: true
11+
isDefault: false
12+
jsonData:
13+
httpHeaderName1: Authorization
14+
timeInterval: 5s
15+
tlsSkipVerify: true
16+
httpMethod: POST
17+
name: Prometheus
18+
secureJsonData:
19+
httpHeaderValue1: Bearer ${token}
20+
type: prometheus
21+
url: https://thanos-querier.openshift-monitoring.svc.cluster.local:9091
22+
instanceSelector:
23+
matchLabels:
24+
dashboards: my-dashboards
25+
plugins:
26+
- name: grafana-clock-panel
27+
version: 1.3.0
28+
resyncPeriod: 5m
29+
valuesFrom:
30+
- targetPath: secureJsonData.httpHeaderValue1
31+
valueFrom:
32+
secretKeyRef:
33+
key: token
34+
name: grafana-for-cnsa-sa
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
apiVersion: v1
2+
kind: Secret
3+
metadata:
4+
name: grafana-for-cnsa-sa
5+
annotations:
6+
kubernetes.io/service-account.name: "grafana-for-cnsa-sa"
7+
type: kubernetes.io/service-account-token

0 commit comments

Comments
 (0)