TrueChartsClone/charts/stable/jellyfin/templates/common.yaml

9 lines
239 B
YAML
Raw Normal View History

Fix Jellyfin Autodiscovery (#9287) **Description** <!-- Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change. --> ⚒️ Fixes # <!--(issue)--> **⚙️ Type of change** - [ ] ⚙️ Feature/App addition - [X] 🪛 Bugfix - [ ] ⚠️ Breaking change (fix or feature that would cause existing functionality to not work as expected) - [ ] 🔃 Refactor of current code **🧪 How Has This Been Tested?** <!-- Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration --> Tested with Helm install, both with autodiscovery disabled and enabled. Autodiscovery response tested with `socat` like this: ``` $ socat - udp-datagram:255.255.255.255:7359,broadcast <<< 'who is jellyfinserver?' {"Address":"https://jelly.mydomain.com","Id":"c57b66d1d9c246ae89ca745644f55477","Name":"jellyfin-558f6656cb-bmrxb","EndpointAddress":null} ``` **📃 Notes:** <!-- Please enter any other relevant information here --> * Closes #9044 * I originally tried using [udp-broadcast-relay-redux](https://github.com/onedr0p/containers/pkgs/container/udp-broadcast-relay-redux) as suggested in the issue but then switched to using a lightweight alpine container with `socat` in it, which I run as a proxy. This is for 3 reasons: - I could not make the `udp-broadcast-relay-redux` relay back the Jellyfin server response. As far as I can tell it does not offer such functionality. - `udp-broadcast-relay-redux` requires you to specify the names of the listening and outgoing NICs which proved challenging, especially with `hostNetworking` enabled. - `udp-broadcast-relay-redux` cannot listen on more than one NIC (in contrast to `socat` which listens on all NICs by default) * ~~The changes in the `questions.yaml` are my best guess (i.e. not tested).~~ Manually copied the changes onto a `questions.yaml` file from the current catalog. UI renders as expected, but I haven't tried to install the app (only copied the `questions.yaml`) **✔️ Checklist:** - [X] ⚖️ My code follows the style guidelines of this project - [X] 👀 I have performed a self-review of my own code - [X] #️⃣ I have commented my code, particularly in hard-to-understand areas - [ ] 📄 I have made corresponding changes to the documentation - [X] ⚠️ My changes generate no new warnings - [X] 🧪 I have added tests to this description that prove my fix is effective or that my feature works - [X] ⬆️ I increased versions for any altered app according to semantic versioning **➕ App addition** If this PR is an app addition please make sure you have done the following. - [ ] 🪞 I have opened a PR on [truecharts/containers](https://github.com/truecharts/containers) adding the container to TrueCharts mirror repo. - [ ] 🖼️ I have added an icon in the Chart's root directory called `icon.png` --- _Please don't blindly check all the boxes. Read them and only check those that apply. Those checkboxes are there for the reviewer to see what is this all about and the status of this PR with a quick glance._ --------- Signed-off-by: sdimovv <36302090+sdimovv@users.noreply.github.com> Signed-off-by: Kjeld Schouten <kjeld@schouten-lebbing.nl> Co-authored-by: Kjeld Schouten <kjeld@schouten-lebbing.nl>
2023-06-08 09:28:42 +00:00
{{- include "tc.v1.common.loader.init" . }}
{{- if .Values.autodiscovery.enabled -}}
{{/* Add proxy workload */}}
{{- $_ := set .Values.workload.broadcastproxy "enabled" true -}}
{{- end -}}
{{- include "tc.v1.common.loader.apply" . -}}