Compare commits

...

4 Commits

Author SHA1 Message Date
d008c9fd5a add ingress 2
All checks were successful
ci/woodpecker/push/predeploy Pipeline was successful
ci/woodpecker/push/build/1 Pipeline was successful
ci/woodpecker/push/build/4 Pipeline was successful
ci/woodpecker/push/build/2 Pipeline was successful
ci/woodpecker/push/build/3 Pipeline was successful
ci/woodpecker/push/deploy/1 Pipeline was successful
ci/woodpecker/tag/predeploy Pipeline was successful
ci/woodpecker/push/deploy/2 Pipeline was successful
ci/woodpecker/push/deploy/3 Pipeline was successful
ci/woodpecker/push/deploy/4 Pipeline was successful
ci/woodpecker/tag/build/4 Pipeline was successful
ci/woodpecker/tag/build/1 Pipeline was successful
ci/woodpecker/tag/build/3 Pipeline was successful
ci/woodpecker/tag/build/2 Pipeline was successful
ci/woodpecker/tag/deploy/4 Pipeline was successful
ci/woodpecker/tag/deploy/3 Pipeline was successful
ci/woodpecker/tag/deploy/2 Pipeline was successful
ci/woodpecker/tag/deploy/1 Pipeline was successful
2025-11-29 21:02:05 +01:00
1eb0f84659 add ingress
Some checks failed
ci/woodpecker/push/build/2 Pipeline was successful
ci/woodpecker/push/build/4 Pipeline was successful
ci/woodpecker/push/build/3 Pipeline was successful
ci/woodpecker/push/predeploy Pipeline was successful
ci/woodpecker/push/build/1 Pipeline was successful
ci/woodpecker/push/deploy/1 Pipeline failed
ci/woodpecker/push/deploy/3 Pipeline failed
ci/woodpecker/push/deploy/4 Pipeline failed
ci/woodpecker/push/deploy/2 Pipeline failed
ci/woodpecker/tag/predeploy Pipeline was successful
ci/woodpecker/tag/build/4 Pipeline was successful
ci/woodpecker/tag/build/1 Pipeline was successful
ci/woodpecker/tag/build/3 Pipeline was successful
ci/woodpecker/tag/build/2 Pipeline was successful
ci/woodpecker/tag/deploy/4 Pipeline was successful
ci/woodpecker/tag/deploy/1 Pipeline was successful
ci/woodpecker/tag/deploy/3 Pipeline was successful
ci/woodpecker/tag/deploy/2 Pipeline was successful
2025-11-29 20:57:49 +01:00
51df63d9f2 config file fix
All checks were successful
ci/woodpecker/push/build/1 Pipeline was successful
ci/woodpecker/push/build/2 Pipeline was successful
ci/woodpecker/push/build/4 Pipeline was successful
ci/woodpecker/push/build/3 Pipeline was successful
ci/woodpecker/push/predeploy Pipeline was successful
ci/woodpecker/push/deploy/1 Pipeline was successful
ci/woodpecker/push/deploy/3 Pipeline was successful
ci/woodpecker/push/deploy/4 Pipeline was successful
ci/woodpecker/push/deploy/2 Pipeline was successful
ci/woodpecker/tag/build/2 Pipeline was successful
ci/woodpecker/tag/build/3 Pipeline was successful
ci/woodpecker/tag/build/4 Pipeline was successful
ci/woodpecker/tag/build/1 Pipeline was successful
ci/woodpecker/tag/predeploy Pipeline was successful
ci/woodpecker/tag/deploy/3 Pipeline was successful
ci/woodpecker/tag/deploy/1 Pipeline was successful
ci/woodpecker/tag/deploy/2 Pipeline was successful
ci/woodpecker/tag/deploy/4 Pipeline was successful
2025-11-29 20:49:48 +01:00
cdaa5deb58 load redis and mqtt only from env
All checks were successful
ci/woodpecker/push/build/4 Pipeline was successful
ci/woodpecker/push/build/2 Pipeline was successful
ci/woodpecker/push/predeploy Pipeline was successful
ci/woodpecker/push/deploy/1 Pipeline was successful
ci/woodpecker/push/deploy/2 Pipeline was successful
ci/woodpecker/tag/predeploy Pipeline was successful
ci/woodpecker/push/build/3 Pipeline was successful
ci/woodpecker/push/build/1 Pipeline was successful
ci/woodpecker/push/deploy/4 Pipeline was successful
ci/woodpecker/push/deploy/3 Pipeline was successful
ci/woodpecker/tag/build/1 Pipeline was successful
ci/woodpecker/tag/build/4 Pipeline was successful
ci/woodpecker/tag/build/2 Pipeline was successful
ci/woodpecker/tag/build/3 Pipeline was successful
ci/woodpecker/tag/deploy/4 Pipeline was successful
ci/woodpecker/tag/deploy/2 Pipeline was successful
ci/woodpecker/tag/deploy/3 Pipeline was successful
ci/woodpecker/tag/deploy/1 Pipeline was successful
2025-11-29 20:44:17 +01:00
6 changed files with 67 additions and 21 deletions

View File

@@ -25,11 +25,11 @@ steps:
- printf "$KUBE_CONFIG_CONTENT" > /tmp/kubeconfig
- export KUBECONFIG=/tmp/kubeconfig
- kubectl create configmap home-automation-config
--from-file=devices=config/devices.yaml
--from-file=groups=config/groups.yaml
--from-file=layout=config/layout.yaml
--from-file=rules=config/rules.yaml
--from-file=scenes=config/scenes.yaml
--from-file=devices.yaml=config/devices.yaml
--from-file=groups.yaml=config/groups.yaml
--from-file=layout.yaml=config/layout.yaml
--from-file=rules.yaml=config/rules.yaml
--from-file=scenes.yaml=config/scenes.yaml
--namespace=$NAMESPACE
--dry-run=client -o yaml | kubectl apply -f -
- kubectl apply -f deployment/configmap.yaml -n $NAMESPACE

View File

@@ -391,9 +391,19 @@ async def async_main() -> None:
validate_devices(devices)
logger.info(f"Loaded {len(devices)} device(s) from configuration")
# Get Redis URL from config or environment variable or use default
redis_config = config.get("redis", {})
redis_url = redis_config.get("url") or os.environ.get("REDIS_URL", "redis://localhost:6379/0")
# Build Redis URL from environment variables or config or use default
redis_host = os.environ.get("REDIS_HOST")
redis_port = os.environ.get("REDIS_PORT")
redis_db = os.environ.get("REDIS_DB")
if redis_host and redis_port and redis_db:
redis_url = f"redis://{redis_host}:{redis_port}/{redis_db}"
logger.info(f"Using Redis from environment variables: {redis_url}")
else:
# Fallback to config file
redis_config = config.get("redis", {})
redis_url = redis_config.get("url") or "redis://localhost:6379/0"
logger.info(f"Using Redis from config file: {redis_url}")
# Connect to Redis with retry
redis_client = await get_redis_client(redis_url)

View File

@@ -1,14 +1,4 @@
version: 1
mqtt:
broker: "172.16.2.16"
port: 1883
client_id: "home-automation-abstraction"
username: null
password: null
keepalive: 60
redis:
url: "redis://172.23.1.116:6379/8"
channel: "ui:updates"
devices:
- device_id: lampe_semeniere_wohnzimmer
name: Semeniere

View File

@@ -99,4 +99,27 @@ spec:
- port: 80
targetPort: 8001
name: http
type: ClusterIP
type: ClusterIP
---
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: api-ingress
annotations:
cert-manager.io/cluster-issuer: letsencrypt-production-http
spec:
tls:
- hosts:
- homea2-api.hottis.de
secretName: homea2-api-cert
rules:
- host: homea2-api.hottis.de
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: api
port:
number: 80

View File

@@ -13,7 +13,7 @@ data:
# UI specific environment variables
UI_UI_PORT: "8002"
UI_API_BASE: "http://api:8001"
UI_API_BASE: "https://homea2-api.hottis.de"
UI_BASE_PATH: "/"
# API specific environment variables

View File

@@ -76,4 +76,27 @@ spec:
- port: 80
targetPort: 8002
name: http
type: ClusterIP
type: ClusterIP
---
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: ui-ingress
annotations:
cert-manager.io/cluster-issuer: letsencrypt-production-http
spec:
tls:
- hosts:
- homea2.hottis.de
secretName: homea2-ui-cert
rules:
- host: homea2.hottis.de
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: ui
port:
number: 80