major(omada-controller): stop playing around with the port, let omada-controller handle it (#16719)

**Description**

The Omada chart by default silently changes the internal port to use if
ingress is enabled. My understanding was the upstream container always
exposed 443 internally which needed to be remapped to not conflict with
the default Truenas web server. This seems to no-longer be the case so I
propose this weird silent behavior be removed.

This PR accomplishes this. 

⚒️ 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?**

Not yet - but I'm interested to know the best way to test this. 

**📃 Notes:**

Currently it appears that setting the port works against the upstream
container at least on the initial install. Subesequent changes would
require changing the port in the UI before changing in Truecharts.

**✔️ 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
- [ ] ⚠️ My changes generate no new warnings
- [ ] 🧪 I have added tests to this description that prove my fix is
effective or that my feature works
- [ ] ⬆️ 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: Stavros Kois <47820033+stavros-k@users.noreply.github.com>
Co-authored-by: Aaron Dalton <zenoftheblues@gmail.com>
Co-authored-by: Stavros Kois <47820033+stavros-k@users.noreply.github.com>
This commit is contained in:
Aaron Dalton
2024-01-12 22:58:54 +02:00
committed by GitHub
co-authored by Aaron Dalton Stavros Kois
parent 2ff2f2f27c
commit 8060a3bf8c
3 changed files with 6 additions and 20 deletions
+1 -1
View File
@@ -1,7 +1,7 @@
kubeVersion: ">=1.24.0-0"
apiVersion: v2
name: omada-controller
version: 12.1.7
version: 13.0.0
appVersion: "5.13"
description: Omada is a SDN tool for TP-Link Omada hardware
home: https://truecharts.org/charts/stable/omada-controller
@@ -1,24 +1,9 @@
{{/* Render the templates */}}
{{ include "tc.v1.common.loader.init" . }}
{{/*
Omada automatically redirects to that port.
Instead of consuming the external 443 port, it's better to switch internal
But still give user the ability to change it.
When ingress is enabled, set this to 443, otherwise set it to whatever `port` is set to
The old behavior of always running on port 443 seams to have changed upstream. The
current upstream behavior is to not allow the port to be changed (without re-install)
after setup.
*/}}
{{- $port := .Values.service.main.ports.main.port -}}
{{- if .Values.ingress.main.enabled -}}
{{- $port = 443 -}}
{{- end -}}
{{- $_ := set .Values.workload.main.podSpec.containers.main.env "MANAGE_HTTPS_PORT" $port -}}
{{- $_ := set .Values.service.main.ports.main "targetPort" $port -}}
{{- $_ := set .Values.workload.main.podSpec.containers.main.probes.liveness "port" $port -}}
{{- $_ := set .Values.workload.main.podSpec.containers.main.probes.readiness "port" $port -}}
{{- $_ := set .Values.workload.main.podSpec.containers.main.probes.startup "port" $port -}}
{{ include "tc.v1.common.loader.apply" . }}
{{ include "tc.v1.common.loader.all" . }}
@@ -67,6 +67,7 @@ workload:
containers:
main:
env:
MANAGE_HTTPS_PORT: "{{ .Values.service.main.ports.main.port }}"
PORTAL_HTTPS_PORT: "{{ .Values.service.comm.ports.comm.port }}"
probes:
startup: