-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdaemonset.yaml
62 lines (61 loc) · 1.56 KB
/
daemonset.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
#
# This DaemonSet only works on selected nodes
# use kubectl label nodes denver exporter-bme380/enabled=true to allow the exporter provisioned on the node
# help see here. https://github.com/KesiSound/BMPDisplay
---
apiVersion: apps/v1
kind: DaemonSet
metadata:
name: bme280-exporter
namespace: monitoring
labels:
app: bme280-exporter
spec:
selector:
matchLabels:
app: bme280-exporter
template:
metadata:
labels:
app: bme280-exporter
annotations:
prometheus.io/path: /metrics
prometheus.io/port: "9123"
prometheus.io/scrape: "true"
spec:
containers:
- name: bme280-exporter
image: lukasbahr/prometheus-bme280-exporter:74b2a86
args: ["--accuracy=ACCURACY_STANDARD", "--port=9123","--loglevel=debug"]
env:
- name: NODE_NAME
valueFrom:
fieldRef:
fieldPath: spec.nodeName
ports:
- name: http
containerPort: 9123
volumeMounts:
- mountPath: /dev/i2c-1
name: device
securityContext:
privileged: true
resources:
limits:
memory: 200Mi
requests:
cpu: 100m
memory: 200Mi
#livenessProbe:
# httpGet:
# path: /
# port: 9103
#initialDelaySeconds: 5
#periodSeconds: 5
volumes:
- name: device
hostPath:
path: /dev/i2c-1
terminationGracePeriodSeconds: 10
nodeSelector:
k3s.io/exporter-bme380-enabled: "true"