-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathservice.yaml
executable file
·86 lines (86 loc) · 2.09 KB
/
service.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
---
# Deployment of our grafana-service
apiVersion: apps/v1
kind: Deployment
metadata:
name: grafana-service
namespace: keptn
spec:
selector:
matchLabels:
run: grafana-service
replicas: 1
template:
metadata:
labels:
run: grafana-service
spec:
containers:
- name: grafana-service
image: keptnsandbox/grafana-service:0.1.0
ports:
- containerPort: 8080
env:
- name: EVENTBROKER
value: 'http://event-broker.keptn.svc.cluster.local/keptn'
- name: CONFIGURATION_SERVICE
value: 'http://configuration-service.keptn.svc.cluster.local:8080'
- name: GRAFANA_URL
value: http://yourgrafana-url
- name: GRAFANA_TOKEN
value: yourtoken
- name: PROMETHEUS_URL
value: http://yourprometheus-url
#serviceAccountName: keptn-default
---
# Expose grafana-service via Port 8080 within the cluster
apiVersion: v1
kind: Service
metadata:
name: grafana-service
namespace: keptn
labels:
run: grafana-service
spec:
ports:
- port: 8080
protocol: TCP
selector:
run: grafana-service
---
## Subscribe to events via a keptn/distributor
apiVersion: apps/v1
kind: Deployment
metadata:
name: grafana-service-distributor
namespace: keptn
spec:
selector:
matchLabels:
run: distributor
replicas: 1
template:
metadata:
labels:
run: distributor
spec:
containers:
- name: distributor
image: keptn/distributor:0.6.1
ports:
- containerPort: 8080
resources:
requests:
memory: "32Mi"
cpu: "50m"
limits:
memory: "128Mi"
cpu: "500m"
env:
- name: PUBSUB_URL
value: 'nats://keptn-nats-cluster'
# listen to all events in sh.keptn. - see https://github.com/keptn/spec/blob/0.1.3/cloudevents.md
- name: PUBSUB_TOPIC
value: 'sh.keptn.>'
- name: PUBSUB_RECIPIENT
value: 'grafana-service'