forked from kyma-project/examples
-
Notifications
You must be signed in to change notification settings - Fork 0
/
sample-metrics-app.yaml
73 lines (73 loc) · 1.42 KB
/
sample-metrics-app.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
kind: Service
apiVersion: v1
metadata:
name: sample-metrics-8080
namespace: default
labels:
example: monitoring-custom-metrics
spec:
selector:
app: sample-metrics
ports:
- name: web
port: 8080
protocol: TCP
---
kind: Service
apiVersion: v1
metadata:
name: sample-metrics-8081
labels:
k8s-app: metrics
example: monitoring-custom-metrics
namespace: default
spec:
selector:
app: sample-metrics
ports:
- name: web
port: 8081
protocol: TCP
---
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: sample-metrics
namespace: default
spec:
replicas: 4
template:
metadata:
annotations:
sidecar.istio.io/inject: "true"
traffic.sidecar.istio.io/includeInboundPorts: "8080"
labels:
app: sample-metrics
example: monitoring-custom-metrics
version: 1.1.3
spec:
containers:
- name: sample-metrics
image: sample-metrics-app:latest
imagePullPolicy: IfNotPresent
---
apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
name: metrics
namespace: kyma-system
labels:
prometheus: core
example: monitoring-custom-metrics
spec:
selector:
matchLabels:
k8s-app: metrics
targetLabels:
- k8s-app
endpoints:
- port: web
interval: 10s
namespaceSelector:
matchNames:
- default