From 23970aec44cf834f6f2d8b8bf35e9a9a17dae03b Mon Sep 17 00:00:00 2001 From: sonicaj Date: Sun, 12 Sep 2021 18:08:59 +0500 Subject: [PATCH] Allow configuring node port for collabora --- test/collabora/1.0.0/questions.yaml | 17 ++++++++++++++--- test/collabora/1.0.0/templates/service.yaml | 6 ++++++ test/collabora/1.0.0/test_values.yaml | 2 +- 3 files changed, 21 insertions(+), 4 deletions(-) create mode 100644 test/collabora/1.0.0/templates/service.yaml diff --git a/test/collabora/1.0.0/questions.yaml b/test/collabora/1.0.0/questions.yaml index d5d6a87efd..92c915d84f 100644 --- a/test/collabora/1.0.0/questions.yaml +++ b/test/collabora/1.0.0/questions.yaml @@ -1,10 +1,12 @@ groups: - name: "Collabora Configuration" description: "Configure Collabora" - - name: "Storage" - description: "Configure Storage for Collabora" - name: "Collabora Environment Variables" description: "Set the environment that will be visible to the container" + - name: "Networking" + description: "Configure Networking for Collabora" + - name: "Storage" + description: "Configure Storage for Collabora" portals: web_portal: @@ -13,7 +15,7 @@ portals: host: - "$node_ip" ports: - - "9980" + - "$variable-nodePort" path: "/loleaflet/dist/admin/admin.html" questions: @@ -127,3 +129,12 @@ questions: label: "Value" schema: type: string + + - variable: nodePort + label: "Node Port to use for Collabora" + group: "Networking" + schema: + type: int + default: 9980 + min: 9000 + max: 65535 diff --git a/test/collabora/1.0.0/templates/service.yaml b/test/collabora/1.0.0/templates/service.yaml new file mode 100644 index 0000000000..80bfc92928 --- /dev/null +++ b/test/collabora/1.0.0/templates/service.yaml @@ -0,0 +1,6 @@ +{{ $port := .Values.nodePort }} +{{ $ports := list }} +{{ $ports = mustAppend $ports (dict "name" "collabora" "port" $port "nodePort" $port "targetPort" "collabora") }} +{{ $params := . }} +{{ $_ := set $params "commonService" (dict "ports" $ports "type" "NodePort" ) }} +{{ include "common.classes.service" $params }} diff --git a/test/collabora/1.0.0/test_values.yaml b/test/collabora/1.0.0/test_values.yaml index 99815d7405..b1b1393572 100644 --- a/test/collabora/1.0.0/test_values.yaml +++ b/test/collabora/1.0.0/test_values.yaml @@ -12,4 +12,4 @@ config: extra_params: "--o:welcome.enable=false --o:user_interface.mode=notebookbar --o:ssl.termination=true --o:ssl.enable=false" DONT_GEN_SSL_CERT: "true" server_name: "collabora" - +nodePort: 32980