From 32666aa628ec030d13b5bb9087b35c824ec664a1 Mon Sep 17 00:00:00 2001 From: "Dustin C. Hatch" Date: Sun, 27 Jul 2025 18:39:55 -0500 Subject: [PATCH] h-a: Schedule Piper, Whisper, Mosquitto with HA Using pod affinity rules, we can schedule the ancillary processes for Home Assistant to run on the same node as the main server. --- home-assistant/mosquitto.yaml | 12 ++++++++++++ home-assistant/piper.yaml | 12 ++++++++++++ home-assistant/whisper.yaml | 12 ++++++++++++ 3 files changed, 36 insertions(+) diff --git a/home-assistant/mosquitto.yaml b/home-assistant/mosquitto.yaml index 455d589..da57538 100644 --- a/home-assistant/mosquitto.yaml +++ b/home-assistant/mosquitto.yaml @@ -55,6 +55,18 @@ spec: app.kubernetes.io/name: mosquitto app.kubernetes.io/part-of: home-assistant spec: + affinity: + podAffinity: + preferredDuringSchedulingIgnoredDuringExecution: + - weight: 100 + podAffinityTerm: + labelSelector: + matchExpressions: + - key: app.kubernetes.io/name + operator: In + values: + - home-assistant + topologyKey: kubernetes.io/hostname containers: - name: mosquitto image: docker.io/library/eclipse-mosquitto:2.0.15 diff --git a/home-assistant/piper.yaml b/home-assistant/piper.yaml index bd850f0..2543aed 100644 --- a/home-assistant/piper.yaml +++ b/home-assistant/piper.yaml @@ -36,6 +36,18 @@ spec: app.kubernetes.io/name: piper app.kubernetes.io/part-of: home-assistant spec: + affinity: + podAffinity: + preferredDuringSchedulingIgnoredDuringExecution: + - weight: 100 + podAffinityTerm: + labelSelector: + matchExpressions: + - key: app.kubernetes.io/name + operator: In + values: + - home-assistant + topologyKey: kubernetes.io/hostname containers: - name: piper image: docker.io/rhasspy/wyoming-piper:1.3.2 diff --git a/home-assistant/whisper.yaml b/home-assistant/whisper.yaml index 863879f..acd83c3 100644 --- a/home-assistant/whisper.yaml +++ b/home-assistant/whisper.yaml @@ -36,6 +36,18 @@ spec: app.kubernetes.io/name: whisper app.kubernetes.io/part-of: home-assistant spec: + affinity: + podAffinity: + preferredDuringSchedulingIgnoredDuringExecution: + - weight: 100 + podAffinityTerm: + labelSelector: + matchExpressions: + - key: app.kubernetes.io/name + operator: In + values: + - home-assistant + topologyKey: kubernetes.io/hostname containers: - name: whisper image: docker.io/rhasspy/wyoming-whisper:1.0.0