K8s add-on
fe-ax opened this issue · 0 comments
fe-ax commented
This module works great! If anyone needs it, I just wanted to leave this for a copy-and-paste action for k8s users.
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: mg4
namespace: default
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 1Gi
storageClassName: local-path
---
apiVersion: apps/v1
kind: Deployment
metadata:
creationTimestamp: null
labels:
app: mg4
name: mg4
spec:
replicas: 1
selector:
matchLabels:
app: mg4
strategy:
type: Recreate
template:
metadata:
creationTimestamp: null
labels:
app: mg4
spec:
containers:
- image: saicismartapi/saic-python-mqtt-gateway:latest
name: mg4
resources: {}
env:
- name: MQTT_URI
value: "tcp://eclipse-mosquitto:1883"
- name: MQTT_USER
value: hass
- name: MQTT_PASSWORD
value: xxxxxxxxxxxxxxxxx
- name: MQTT_SERVER_CERT
value: ""
- name: MQTT_TOPIC
value: "saic"
- name: "SAIC_USER"
value: "xxxxxxxxxxxxxxxxxxxxx"
- name: SAIC_PASSWORD
value: "xxxxxxxxxxxxxxxxxxxxx"
- name: SAIC_REST_URI
value: "https://gateway-mg-eu.soimt.com/api.app/v1/"
- name: SAIC_REGION
value: "eu"
- name: SAIC_TENANT_ID
value: "459771"
- name: SAIC_PHONE_COUNTRY_CODE
value: ""
- name: ABRP_API_KEY
value: ""
- name: ABRP_USER_TOKEN
value: ""
- name: BATTERY_CAPACITY_MAPPING
value: ""
- name: OPENWB_LP_MAP
value: ""
- name: CHARGING_STATIONS_JSON
value: ""
- name: LOG_LEVEL
value: "INFO"
- name: MQTT_LOG_LEVEL
value: "INFO"
- name: SAIC_RELOGIN_DELAY
value: "900"
- name: HA_DISCOVERY_ENABLED
value: "True"
- name: HA_DISCOVERY_PREFIX
value: "homeassistant"
- name: HA_SHOW_UNAVAILABLE
value: "True"
- name: CHARGE_MIN_PERCENTAGE
value: "1.0"
- name: MESSAGES_REQUEST_INTERVAL
value: "60"
- name: TZ
value: Europe/Amsterdam
volumeMounts:
- mountPath: /config
name: config
volumes:
- name: config
persistentVolumeClaim:
claimName: mg4