diff --git a/kubernetes/pygrowatt-deployment.yaml b/kubernetes/pygrowatt-deployment.yaml index d7cdf08..455f5b9 100644 --- a/kubernetes/pygrowatt-deployment.yaml +++ b/kubernetes/pygrowatt-deployment.yaml @@ -17,6 +17,13 @@ spec: labels: app: pygrowatt spec: + volumes: + - name: pygrowatt-config + secret: + secretName: pygrowatt-config + items: + - key: config.ini + path: config.ini containers: - name: pygrowatt-container image: pygrowatt @@ -26,6 +33,11 @@ spec: ports: - containerPort: 5279 protocol: TCP + volumeMounts: + - mountPath: "/opt/PyGrowatt/scripts/config.ini" + subPath: "config.ini" + name: pygrowatt-config + readOnly: true --- apiVersion: v1 kind: Service diff --git a/kubernetes/pygrowatt-secret.yaml b/kubernetes/pygrowatt-secret.yaml new file mode 100644 index 0000000..4e46751 --- /dev/null +++ b/kubernetes/pygrowatt-secret.yaml @@ -0,0 +1,20 @@ +--- +apiVersion: v1 +kind: Secret +metadata: + name: pygrowatt-config +type: Opaque +stringData: + config.ini: |- + [Growatt] + KEY = Growatt + UpdateInterval = 5 + + [Pvoutput] + Apikey = Your-API-Key + SystemId = Your-System-Id + StatusInterval = 5 + + [MQTT] + ServerIP = test.mosquitto.org + ServerPort = 1883 \ No newline at end of file