From 260bd874bb97e129ab6ea1e2d2525cbb2354e582 Mon Sep 17 00:00:00 2001 From: Stavros kois Date: Mon, 20 Mar 2023 17:33:42 +0200 Subject: [PATCH] conditionally add capability --- library/ix-dev/community/homebridge/ci/basic-values.yaml | 2 +- library/ix-dev/community/homebridge/ci/no-avahi-values.yaml | 2 +- .../ix-dev/community/homebridge/templates/_homebridge.tpl | 6 ++++-- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/library/ix-dev/community/homebridge/ci/basic-values.yaml b/library/ix-dev/community/homebridge/ci/basic-values.yaml index 4044e23dc5..f2548653f3 100644 --- a/library/ix-dev/community/homebridge/ci/basic-values.yaml +++ b/library/ix-dev/community/homebridge/ci/basic-values.yaml @@ -4,4 +4,4 @@ hbStorage: hostPath: /mnt/{{ .Release.Name }}/data hbNetwork: - webPort: 38000 + webPort: 30000 diff --git a/library/ix-dev/community/homebridge/ci/no-avahi-values.yaml b/library/ix-dev/community/homebridge/ci/no-avahi-values.yaml index 895581675e..f888edbeca 100644 --- a/library/ix-dev/community/homebridge/ci/no-avahi-values.yaml +++ b/library/ix-dev/community/homebridge/ci/no-avahi-values.yaml @@ -4,7 +4,7 @@ hbStorage: hostPath: /mnt/{{ .Release.Name }}/data hbNetwork: - webPort: 38000 + webPort: 30000 hbConfig: enableAvahi: false diff --git a/library/ix-dev/community/homebridge/templates/_homebridge.tpl b/library/ix-dev/community/homebridge/templates/_homebridge.tpl index 7c99e5ac31..954a34cf2e 100644 --- a/library/ix-dev/community/homebridge/templates/_homebridge.tpl +++ b/library/ix-dev/community/homebridge/templates/_homebridge.tpl @@ -21,10 +21,12 @@ workload: # Without those, logs show: "Failed to start message bus: Failed to drop capabilities: Operation not permitted" - SETGID - SETUID - # Without this, logs show: "Failed to create runtime directory /run/avahi-daemon" - - CHOWN # Witout this, logs show: "Failed to start message bus: Failed to bind socket "/var/run/dbus/system_bus_socket": Permission denied" - DAC_OVERRIDE + {{ if .Values.hbConfig.enableAvahi }} + # Without this, logs show: "Failed to create runtime directory /run/avahi-daemon" + - CHOWN + {{ end }} env: HOMEBRIDGE_CONFIG_UI_PORT: {{ .Values.hbNetwork.webPort }} ENABLE_AVAHI: {{ ternary "1" "0" .Values.hbConfig.enableAvahi | quote }}