From fdc26fde29d3fad7b950890b77145ee6697b9cc9 Mon Sep 17 00:00:00 2001 From: Stavros kois Date: Wed, 16 Nov 2022 15:56:14 +0200 Subject: [PATCH] Remove unneeded ports (80/443) from emby and fix hostnetwork --- test/emby/{1.0.13 => 1.0.14}/.helmignore | 0 test/emby/{1.0.13 => 1.0.14}/Chart.lock | 0 test/emby/{1.0.13 => 1.0.14}/Chart.yaml | 2 +- test/emby/{1.0.13 => 1.0.14}/README.md | 0 test/emby/{1.0.13 => 1.0.14}/app-readme.md | 0 .../{1.0.13 => 1.0.14}/charts/common-2207.0.0.tgz | Bin test/emby/{1.0.13 => 1.0.14}/ix_values.yaml | 0 test/emby/{1.0.13 => 1.0.14}/questions.yaml | 5 +++-- test/emby/{1.0.13 => 1.0.14}/requirements.lock | 0 test/emby/{1.0.13 => 1.0.14}/templates/NOTES.txt | 4 ++++ .../{1.0.13 => 1.0.14}/templates/deployment.yaml | 3 --- test/emby/1.0.14/templates/portal.tpl | 10 ++++++++++ .../{1.0.13 => 1.0.14}/templates/service-tcp.yaml | 8 +++++--- .../{1.0.13 => 1.0.14}/templates/service-udp.yaml | 0 .../templates/tests/deployment-check.yaml | 0 test/emby/{1.0.13 => 1.0.14}/test_values.yaml | 0 16 files changed, 23 insertions(+), 9 deletions(-) rename test/emby/{1.0.13 => 1.0.14}/.helmignore (100%) rename test/emby/{1.0.13 => 1.0.14}/Chart.lock (100%) rename test/emby/{1.0.13 => 1.0.14}/Chart.yaml (95%) rename test/emby/{1.0.13 => 1.0.14}/README.md (100%) rename test/emby/{1.0.13 => 1.0.14}/app-readme.md (100%) rename test/emby/{1.0.13 => 1.0.14}/charts/common-2207.0.0.tgz (100%) rename test/emby/{1.0.13 => 1.0.14}/ix_values.yaml (100%) rename test/emby/{1.0.13 => 1.0.14}/questions.yaml (97%) rename test/emby/{1.0.13 => 1.0.14}/requirements.lock (100%) rename test/emby/{1.0.13 => 1.0.14}/templates/NOTES.txt (59%) rename test/emby/{1.0.13 => 1.0.14}/templates/deployment.yaml (96%) create mode 100644 test/emby/1.0.14/templates/portal.tpl rename test/emby/{1.0.13 => 1.0.14}/templates/service-tcp.yaml (62%) rename test/emby/{1.0.13 => 1.0.14}/templates/service-udp.yaml (100%) rename test/emby/{1.0.13 => 1.0.14}/templates/tests/deployment-check.yaml (100%) rename test/emby/{1.0.13 => 1.0.14}/test_values.yaml (100%) diff --git a/test/emby/1.0.13/.helmignore b/test/emby/1.0.14/.helmignore similarity index 100% rename from test/emby/1.0.13/.helmignore rename to test/emby/1.0.14/.helmignore diff --git a/test/emby/1.0.13/Chart.lock b/test/emby/1.0.14/Chart.lock similarity index 100% rename from test/emby/1.0.13/Chart.lock rename to test/emby/1.0.14/Chart.lock diff --git a/test/emby/1.0.13/Chart.yaml b/test/emby/1.0.14/Chart.yaml similarity index 95% rename from test/emby/1.0.13/Chart.yaml rename to test/emby/1.0.14/Chart.yaml index 4736c8c9af..6cbbc81981 100644 --- a/test/emby/1.0.13/Chart.yaml +++ b/test/emby/1.0.14/Chart.yaml @@ -13,4 +13,4 @@ keywords: name: emby sources: - https://hub.docker.com/r/emby/embyserver -version: 1.0.13 +version: 1.0.14 diff --git a/test/emby/1.0.13/README.md b/test/emby/1.0.14/README.md similarity index 100% rename from test/emby/1.0.13/README.md rename to test/emby/1.0.14/README.md diff --git a/test/emby/1.0.13/app-readme.md b/test/emby/1.0.14/app-readme.md similarity index 100% rename from test/emby/1.0.13/app-readme.md rename to test/emby/1.0.14/app-readme.md diff --git a/test/emby/1.0.13/charts/common-2207.0.0.tgz b/test/emby/1.0.14/charts/common-2207.0.0.tgz similarity index 100% rename from test/emby/1.0.13/charts/common-2207.0.0.tgz rename to test/emby/1.0.14/charts/common-2207.0.0.tgz diff --git a/test/emby/1.0.13/ix_values.yaml b/test/emby/1.0.14/ix_values.yaml similarity index 100% rename from test/emby/1.0.13/ix_values.yaml rename to test/emby/1.0.14/ix_values.yaml diff --git a/test/emby/1.0.13/questions.yaml b/test/emby/1.0.14/questions.yaml similarity index 97% rename from test/emby/1.0.13/questions.yaml rename to test/emby/1.0.14/questions.yaml index ef2a764b57..fa860589b4 100644 --- a/test/emby/1.0.13/questions.yaml +++ b/test/emby/1.0.14/questions.yaml @@ -23,12 +23,12 @@ portals: host: - "$node_ip" ports: - - "$variable-embyServerHttp.port" + - "$kubernetes-resource_configmap_portal_port" path: "/web" questions: - variable: hostNetwork - label: "Configure Host Network" + label: "Enable Host Network" group: "Networking" schema: type: boolean @@ -74,6 +74,7 @@ questions: label: "Configure Emby Server HTTP Service" group: "Networking" schema: + show_if: [[ "hostNetwork", "!=", true]] type: dict attrs: - variable: port diff --git a/test/emby/1.0.13/requirements.lock b/test/emby/1.0.14/requirements.lock similarity index 100% rename from test/emby/1.0.13/requirements.lock rename to test/emby/1.0.14/requirements.lock diff --git a/test/emby/1.0.13/templates/NOTES.txt b/test/emby/1.0.14/templates/NOTES.txt similarity index 59% rename from test/emby/1.0.13/templates/NOTES.txt rename to test/emby/1.0.14/templates/NOTES.txt index 6fc24835a3..d2e3ff976e 100644 --- a/test/emby/1.0.13/templates/NOTES.txt +++ b/test/emby/1.0.14/templates/NOTES.txt @@ -1,3 +1,7 @@ 1. Get the application URL by running these commands: +{{- if .Values.hostNetwork }} +http://$node_ip:8096/ +{{ else }} http://$node_ip:{{ .Values.embyServerHttp.port }}/ +{{ end }} diff --git a/test/emby/1.0.13/templates/deployment.yaml b/test/emby/1.0.14/templates/deployment.yaml similarity index 96% rename from test/emby/1.0.13/templates/deployment.yaml rename to test/emby/1.0.14/templates/deployment.yaml index ac3cb712ec..e15f1e1e4a 100644 --- a/test/emby/1.0.13/templates/deployment.yaml +++ b/test/emby/1.0.14/templates/deployment.yaml @@ -24,9 +24,6 @@ spec: {{ include "common.deployment.common_spec" . | nindent 2 }} - name: emby protocol: TCP containerPort: 8096 - {{- if .Values.hostNetwork }} - hostPort: {{ .Values.embyServerHttp.port }} - {{- end }} - name: emby-dlna protocol: UDP containerPort: 1900 diff --git a/test/emby/1.0.14/templates/portal.tpl b/test/emby/1.0.14/templates/portal.tpl new file mode 100644 index 0000000000..3cf73f3d06 --- /dev/null +++ b/test/emby/1.0.14/templates/portal.tpl @@ -0,0 +1,10 @@ +apiVersion: v1 +kind: ConfigMap +metadata: + name: portal +data: + {{- if .Values.hostNetwork }} + port: "8096" + {{- else }} + port: {{ .Values.embyServerHttp.port | quote }} + {{- end }} diff --git a/test/emby/1.0.13/templates/service-tcp.yaml b/test/emby/1.0.14/templates/service-tcp.yaml similarity index 62% rename from test/emby/1.0.13/templates/service-tcp.yaml rename to test/emby/1.0.14/templates/service-tcp.yaml index cf180ba03a..7a5a7d7439 100644 --- a/test/emby/1.0.13/templates/service-tcp.yaml +++ b/test/emby/1.0.14/templates/service-tcp.yaml @@ -1,8 +1,10 @@ {{ $svc := .Values.embyServerHttp }} {{ $ports := list }} -{{ $ports = mustAppend $ports (dict "name" "emby" "port" $svc.port "nodePort" $svc.port "targetPort" "emby") }} -{{ $ports = mustAppend $ports (dict "name" "http" "port" 80 "targetPort" "emby") }} -{{ $ports = mustAppend $ports (dict "name" "https" "port" 443 "targetPort" "emby") }} +{{ if .Values.hostNetwork }} +{{ $ports = mustAppend $ports (dict "name" "http" "port" 8096 "targetPort" 8096) }} +{{ else }} +{{ $ports = mustAppend $ports (dict "name" "http" "port" $svc.port "nodePort" $svc.port "targetPort" 8096) }} +{{ end }} {{ $params := . }} {{ $_ := set $params "commonService" (dict "ports" $ports ) }} {{ if .Values.hostNetwork }} diff --git a/test/emby/1.0.13/templates/service-udp.yaml b/test/emby/1.0.14/templates/service-udp.yaml similarity index 100% rename from test/emby/1.0.13/templates/service-udp.yaml rename to test/emby/1.0.14/templates/service-udp.yaml diff --git a/test/emby/1.0.13/templates/tests/deployment-check.yaml b/test/emby/1.0.14/templates/tests/deployment-check.yaml similarity index 100% rename from test/emby/1.0.13/templates/tests/deployment-check.yaml rename to test/emby/1.0.14/templates/tests/deployment-check.yaml diff --git a/test/emby/1.0.13/test_values.yaml b/test/emby/1.0.14/test_values.yaml similarity index 100% rename from test/emby/1.0.13/test_values.yaml rename to test/emby/1.0.14/test_values.yaml