From c21261e630df5cf21b6a0f8e4fe8fec3593ff413 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20=C5=98eho=C5=99?= Date: Wed, 10 Jul 2024 12:38:10 +0200 Subject: [PATCH] feat: add ebusd --- .../ebusd/app/helmrelease.yaml | 43 ++++++++++--------- 1 file changed, 22 insertions(+), 21 deletions(-) diff --git a/kubernetes/main/apps/home-automation/ebusd/app/helmrelease.yaml b/kubernetes/main/apps/home-automation/ebusd/app/helmrelease.yaml index 0520532c..d91d234b 100644 --- a/kubernetes/main/apps/home-automation/ebusd/app/helmrelease.yaml +++ b/kubernetes/main/apps/home-automation/ebusd/app/helmrelease.yaml @@ -62,6 +62,7 @@ spec: - --foreground # HTTP Client - --httpport=8080 + - --htmlpath=/config/html # Log Options - --log=all:info # MQTT Options @@ -70,20 +71,20 @@ spec: envFrom: - secretRef: name: ebusd-secret - # probes: - # liveness: &probes - # enabled: true - # custom: true - # spec: - # httpGet: - # path: /data - # port: 80 - # initialDelaySeconds: 10 - # periodSeconds: 10 - # timeoutSeconds: 1 - # failureThreshold: 3 - # readiness: *probes - # startup: *probes + probes: + liveness: &probes + enabled: true + custom: true + spec: + httpGet: + path: /data/global + port: 8080 + initialDelaySeconds: 10 + periodSeconds: 10 + timeoutSeconds: 1 + failureThreshold: 3 + readiness: *probes + startup: *probes resources: requests: cpu: 100m @@ -119,7 +120,7 @@ spec: - -c - | ( - set -e + set -ex # Install packages sudo apt update @@ -131,8 +132,8 @@ spec: sudo apt install --yes net-tools # Setup git - git config --global user.name "${GITCONFIG_USER_NAME}" - git config --global user.email "${GITCONFIG_USER_MAIL}" + git config --global user.name "$${GITCONFIG_USER_NAME}" + git config --global user.email "$${GITCONFIG_USER_MAIL}" git config --global branch.autosetuprebase always git config --global --add safe.directory '/config' ) > /tmp/postStart.log 2>&1 || true @@ -146,7 +147,7 @@ spec: - /bin/bash - -c - | - set -e + set -ex # Clone ebusd-config repository if [ ! -e "/config/.git" ]; then @@ -161,7 +162,7 @@ spec: fi # Fetch contrib/html - #if [ ! -e "/config/html/.ebus-$${EBUSD_VERSION#v}" ]; then + if [ ! -e "/config/html/.ebus-$${EBUSD_VERSION#v}" ]; then mkdir -p /config/html rm -rf /config/html/* ( @@ -169,8 +170,8 @@ spec: curl -L https://github.com/john30/ebusd/archive/refs/tags/$${EBUSD_VERSION#v}.tar.gz | tar xfvz - --strip-components=3 ebusd-$${EBUSD_VERSION#v}/contrib/html ) - echo $${EBUSD_VERSION#v} > /config/html/.ebus-$${EBUSD_VERSION#v} - #fi + touch /config/html/.ebus-$${EBUSD_VERSION#v} + fi env: EBUSD_VERSION: *version envFrom: