-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmanifests.yaml
More file actions
122 lines (108 loc) · 2.65 KB
/
Copy pathmanifests.yaml
File metadata and controls
122 lines (108 loc) · 2.65 KB
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
kind: Namespace
apiVersion: v1
metadata:
name: rpdu2mqtt
---
apiVersion: v1
kind: ConfigMap
metadata:
name: configuration
namespace: rpdu2mqtt
data:
config.yaml: |
Mqtt:
Connection:
Host: "192.168.1.1" # Update to the IP of your MQTT broker.
Port: 1883
Credentials:
Username: "admin"
Password: "password"
ParentTopic: "rPDU2MQTT"
PDU:
Connection:
Host: 192.168.1.2 # Update to the IP of your PDU.
Port: 80
PollInterval: 5
Overrides:
PDU:
Name: "Your PDU"
Devices:
YOUR-SERIAL-NUMBER:
ID: your_pdu
Name: MY PDU
Enabled: true
Measurements:
# I override the names, to give a more usable display name.
# Also- I change the ID, to be a bit shorter for power.
apparentPower:
Name: Apparent Power
realPower:
ID: power
Name: Power
energy:
Name: Energy
powerFactor:
Name: Power Factor
current:
Name: Current
voltage:
Name: Voltage
# I recommend leaving these disabled, unless you have a use-case for them.
currentCrestFactor:
Enabled: false
balance:
Enabled: false
HomeAssistant:
DiscoveryEnabled: true
DiscoveryTopic: "homeassistant"
# Short discovery interval is used for testing.
DiscoveryInterval: 30
---
apiVersion: apps/v1
kind: Deployment
metadata:
labels:
role: app
name: rpdu2mqtt
namespace: rpdu2mqtt
spec:
replicas: 1
revisionHistoryLimit: 1
selector:
matchLabels:
app: rpdu2mqtt
role: app
template:
metadata:
labels:
app: rpdu2mqtt
role: app
spec:
dnsPolicy: ClusterFirst
containers:
- image: ghcr.io/xtremeownage/rpdu2mqtt:stable
name: app
securityContext:
runAsNonRoot: true
allowPrivilegeEscalation: false
runAsUser: 1654
seccompProfile:
type: RuntimeDefault
capabilities:
drop:
- ALL
volumeMounts:
- name: config-files
mountPath: /config
resources:
limits:
memory: 800Mi
cpu: 300m
requests:
memory: 100Mi
cpu: 100m
volumes:
- name: config-files
configMap:
name: configuration
defaultMode: 0777