From 78dd9dc60f36741d62ef10aef065861cc50c6d3e Mon Sep 17 00:00:00 2001 From: Jonas Wrede <3731681+jonaswre@users.noreply.github.com> Date: Sun, 25 Sep 2022 21:46:16 +0200 Subject: [PATCH] fix(lancache): fix port assignments (#3798) * Fixed lancache port assignment * Added better label. And reverted to safe default * Removed default ports * Moved warning form frontend ui to documentation * update doc * fix ports * Update charts/incubator/lancache-monolithic/docs/installation_notes.md Signed-off-by: Stavros Kois <47820033+stavros-k@users.noreply.github.com> * lint * Update charts/incubator/lancache-monolithic/docs/installation_notes.md Co-authored-by: Kjeld Schouten-Lebbing Signed-off-by: Stavros Kois <47820033+stavros-k@users.noreply.github.com> Signed-off-by: Stavros Kois <47820033+stavros-k@users.noreply.github.com> Co-authored-by: Stavros Kois <47820033+stavros-k@users.noreply.github.com> Co-authored-by: Stavros kois Co-authored-by: Kjeld Schouten-Lebbing --- .devcontainer/devcontainer.json | 2 +- charts/incubator/lancache-dns/questions.yaml | 29 +++++++++++++++++++ charts/incubator/lancache-dns/values.yaml | 10 ++++++- .../docs/installation_notes.md | 15 ++++++++++ .../lancache-monolithic/questions.yaml | 29 +++++++++++++++++++ .../incubator/lancache-monolithic/values.yaml | 8 +++++ 6 files changed, 91 insertions(+), 2 deletions(-) create mode 100644 charts/incubator/lancache-monolithic/docs/installation_notes.md diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 7aac7e76eed..edbe7698dd3 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -2,7 +2,7 @@ // https://github.com/microsoft/vscode-dev-containers/tree/v0.154.0/containers/ruby { "name": "Ruby", - "image": "ghcr.io/truecharts/devcontainer:v2.3.0@sha256:a163ad40427cd75a31a0365afb832f97e512d420429ed091b90b18a034526264" + "image": "ghcr.io/truecharts/devcontainer:v2.3.0@sha256:a163ad40427cd75a31a0365afb832f97e512d420429ed091b90b18a034526264", // Set *default* container specific settings.json values on container create. "settings": { diff --git a/charts/incubator/lancache-dns/questions.yaml b/charts/incubator/lancache-dns/questions.yaml index fe2a3739885..dcff327963b 100644 --- a/charts/incubator/lancache-dns/questions.yaml +++ b/charts/incubator/lancache-dns/questions.yaml @@ -97,6 +97,35 @@ questions: type: int default: 53 required: true +# Include{advancedPortTCP} + - variable: targetPort + label: "Target Port" + description: "The internal(!) port on the container the Application runs on" + schema: + type: int + default: 53 + - variable: dns + label: "DNS Service" + description: "The Primary service on which the healthcheck runs, often the webUI" + schema: + additional_attrs: true + type: dict + attrs: +# Include{serviceSelectorSimple} +# Include{serviceSelectorExtras} + - variable: dns + label: "DNS Service Port Configuration" + schema: + additional_attrs: true + type: dict + attrs: + - variable: port + label: "Port" + description: "This port exposes the container port on the service" + schema: + type: int + default: 53 + required: true # Include{advancedPortUDP} - variable: targetPort label: "Target Port" diff --git a/charts/incubator/lancache-dns/values.yaml b/charts/incubator/lancache-dns/values.yaml index 07a9ee553c1..821f4947a75 100644 --- a/charts/incubator/lancache-dns/values.yaml +++ b/charts/incubator/lancache-dns/values.yaml @@ -1,7 +1,7 @@ image: repository: tccr.io/truecharts/lancache-dns - tag: latest@sha256:0d04cbb893f0b1da8154e2d0a9911b5e9c71f6b2dbb2e66d62e8763b4fe2a17f pullPolicy: IfNotPresent + tag: latest@sha256:0d04cbb893f0b1da8154e2d0a9911b5e9c71f6b2dbb2e66d62e8763b4fe2a17f env: CACHE_DOMAINS_REPO: "https://github.com/uklans/cache-domains.git" @@ -27,6 +27,14 @@ service: main: ports: main: + port: 53 + targetPort: 53 + + dns: + enabled: true + ports: + dns: + enabled: true protocol: UDP port: 53 targetPort: 53 diff --git a/charts/incubator/lancache-monolithic/docs/installation_notes.md b/charts/incubator/lancache-monolithic/docs/installation_notes.md new file mode 100644 index 00000000000..d0992f8b389 --- /dev/null +++ b/charts/incubator/lancache-monolithic/docs/installation_notes.md @@ -0,0 +1,15 @@ +# Installation Notes + +Clients like Steam, Battle.net, etc sends requests to port 80/443. +In case you don't want to use traefik in front of this app, you need to change the ports. + +- `Service` -> `Main` -> `Port`: **80** +- `Service` -> `https` -> `Port`: **443** + +:::danger + +Doing this will break Traefik and we do NOT recommend it. +Also, you have to make sure that you do NOT have any other service on these ports. +Like TrueNAS Scale WebUI. + +::: diff --git a/charts/incubator/lancache-monolithic/questions.yaml b/charts/incubator/lancache-monolithic/questions.yaml index 990bd0582e6..250b12e3af8 100644 --- a/charts/incubator/lancache-monolithic/questions.yaml +++ b/charts/incubator/lancache-monolithic/questions.yaml @@ -90,6 +90,35 @@ questions: schema: type: int default: 80 + - variable: https + label: "HTTPS" + description: "HTTPS Service" + schema: + additional_attrs: true + type: dict + attrs: +# Include{serviceSelectorSimple} +# Include{serviceSelectorExtras} + - variable: https + label: "HTTPS" + schema: + additional_attrs: true + type: dict + attrs: + - variable: port + label: "Port" + description: "This port exposes the container port on the service" + schema: + type: int + default: 10280 + required: true +# Include{advancedPortHTTPS} + - variable: targetPort + label: "Target Port" + description: "The internal(!) port on the container the Application runs on" + schema: + type: int + default: 443 # Include{serviceExpertRoot} default: false # Include{serviceExpert} diff --git a/charts/incubator/lancache-monolithic/values.yaml b/charts/incubator/lancache-monolithic/values.yaml index 1b508863372..cd9d96772fb 100644 --- a/charts/incubator/lancache-monolithic/values.yaml +++ b/charts/incubator/lancache-monolithic/values.yaml @@ -27,6 +27,14 @@ service: port: 10279 targetPort: 80 protocol: HTTP + https: + enabled: true + ports: + https: + enabled: true + port: 10280 + targetPort: 443 + protocol: HTTPS persistence: config: