-
Notifications
You must be signed in to change notification settings - Fork 67
/
prometheus-data-generator.yaml
88 lines (88 loc) · 2 KB
/
prometheus-data-generator.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
87
88
---
apiVersion: v1
kind: ConfigMap
metadata:
name: prometheus-data-generator-config
namespace: nr-prometheus
data:
config: |
---
config:
- name: number_of_fruits
description: The number of fruits we have.
type: gauge
labels: [name, color]
sequence:
- time: 5
values: 0-20
operation: inc
labels:
name: apple
color: red
- eval_time: 5
operation: set
labels:
name: apple
color: red
- time: 5
eval_time: 1
values: 0-20
operation: inc
labels:
name: apple
color: green
- time: 5
eval_time: 1
values: 0-5
operation: dec
labels:
name: apple
color: green
- time: 5
eval_time: 1
value: 3
operation: inc
labels:
name: apple
color: yellow
---
apiVersion: v1
kind: Pod
metadata:
name: prometheus-data-generator
namespace: nr-prometheus
labels:
app.kubernetes.io/name: prometheus-data-generator
spec:
containers:
- name: prometheus-data-generator
image: littleangryclouds/prometheus-data-generator:0.2
env:
- name: PDG_CONFIG
value: /pdg/config.yaml
volumeMounts:
- name: prometheus-data-generator-config-vol
mountPath: /pdg/
ports:
- containerPort: 9000
volumes:
- name: prometheus-data-generator-config-vol
configMap:
name: prometheus-data-generator-config
items:
- key: config
path: config.yaml
---
apiVersion: v1
kind: Service
metadata:
name: prometheus-data-generator
namespace: nr-prometheus
labels:
app.kubernetes.io/name: prometheus-data-generator
spec:
ports:
- port: 9000
protocol: TCP
selector:
app.kubernetes.io/name: prometheus-data-generator