From 1ecbf5734aa376bde58e84cb198016dfb68074d0 Mon Sep 17 00:00:00 2001 From: Stavros Kois <47820033+stavros-k@users.noreply.github.com> Date: Thu, 27 Jul 2023 21:21:42 +0300 Subject: [PATCH] NAS-123258 / 23.10 / allow to expose daemon port (#1412) * allow to expose daemon port * remove redundant line break * test with daemon exposed * handle it differently for smooth upgrades * Use a port in the available range of CI --- library/ix-dev/community/deluge/Chart.yaml | 2 +- .../community/deluge/ci/basic-values.yaml | 4 ++++ .../ix-dev/community/deluge/questions.yaml | 19 +++++++++++++++++++ .../community/deluge/templates/_deluge.tpl | 8 ++++++++ library/ix-dev/community/deluge/values.yaml | 2 ++ 5 files changed, 34 insertions(+), 1 deletion(-) diff --git a/library/ix-dev/community/deluge/Chart.yaml b/library/ix-dev/community/deluge/Chart.yaml index 0309a8bdc7..c2d121c58d 100644 --- a/library/ix-dev/community/deluge/Chart.yaml +++ b/library/ix-dev/community/deluge/Chart.yaml @@ -3,7 +3,7 @@ description: Deluge is a lightweight, Free Software, cross-platform BitTorrent c annotations: title: Deluge type: application -version: 1.0.5 +version: 1.0.6 apiVersion: v2 appVersion: '9.5.3' kubeVersion: '>=1.16.0-0' diff --git a/library/ix-dev/community/deluge/ci/basic-values.yaml b/library/ix-dev/community/deluge/ci/basic-values.yaml index 43924ebd3b..fde461eb03 100644 --- a/library/ix-dev/community/deluge/ci/basic-values.yaml +++ b/library/ix-dev/community/deluge/ci/basic-values.yaml @@ -5,3 +5,7 @@ delugeStorage: downloads: type: hostPath hostPath: /mnt/{{ .Release.Name }}/downloads + +delugeNetwork: + exposeDaemon: true + daemonPort: 32100 diff --git a/library/ix-dev/community/deluge/questions.yaml b/library/ix-dev/community/deluge/questions.yaml index 14a02cd10e..b4eed994d1 100644 --- a/library/ix-dev/community/deluge/questions.yaml +++ b/library/ix-dev/community/deluge/questions.yaml @@ -106,6 +106,25 @@ questions: min: 9000 max: 65535 required: true + - variable: exposeDaemon + label: Expose Daemon Port + description: Expose the Deluge Daemon port + schema: + type: boolean + default: false + show_if: [["hostNetwork", "=", false]] + - variable: daemonPort + label: Daemon Port + description: | + The port for the Deluge Daemon.
+ (Internal port is always 58846) + schema: + type: int + show_if: [["exposeDaemon", "=", true]] + default: 58846 + min: 9000 + max: 65535 + required: true - variable: torrentPort label: Torrent Port description: | diff --git a/library/ix-dev/community/deluge/templates/_deluge.tpl b/library/ix-dev/community/deluge/templates/_deluge.tpl index b0d310cfd1..1cda1063d3 100644 --- a/library/ix-dev/community/deluge/templates/_deluge.tpl +++ b/library/ix-dev/community/deluge/templates/_deluge.tpl @@ -64,6 +64,14 @@ service: nodePort: {{ .Values.delugeNetwork.webPort }} targetPort: 8112 targetSelector: deluge + {{- if .Values.delugeNetwork.exposeDaemon }} + daemon: + enabled: true + port: {{ .Values.delugeNetwork.daemonPort }} + nodePort: {{ .Values.delugeNetwork.daemonPort }} + targetPort: 58846 + targetSelector: deluge + {{- end }} torrent: enabled: true type: NodePort diff --git a/library/ix-dev/community/deluge/values.yaml b/library/ix-dev/community/deluge/values.yaml index 6835c6ea15..e738a03b3e 100644 --- a/library/ix-dev/community/deluge/values.yaml +++ b/library/ix-dev/community/deluge/values.yaml @@ -15,6 +15,8 @@ delugeNetwork: hostNetwork: false webPort: 30038 torrentPort: 30039 + exposeDaemon: false + daemonPort: 58846 delugeID: user: 568