Remove min port from UI and validate with template

This commit is contained in:
Stavros kois committed 2022-12-19 11:10:32 +02:00
1 parent b7c84a5466
commit 60a902e98a
36 files changed
+24 -6

No files matched your search

File renamed without changes.
File renamed without changes.
@@ -15,7 +15,7 @@ type: application
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 2212.0.0
version: 2212.0.1
# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
File renamed without changes.
File renamed without changes.
@@ -77,7 +77,6 @@ questions:
description: "Specify port to be used for Portal access"
schema:
type: int
min: 9000
max: 65535
default: 15000
@@ -427,7 +426,6 @@ questions:
schema:
type: int
required: true
min: 9000
max: 65535
- variable: protocol
label: "Protocol"
@@ -21,3 +21,10 @@ Get configuration for host network
{{- print "true" -}}
{{- end -}}
{{- end -}}
{{/* Validate portal port */}}
{{- if .Values.enableUIPortal }}
{{- if and (not .Values.hostNetwork) (lt .Values.portalDetails.port 9000) }}
{{- fail (printf "Port (%d) is too low. Minimum allowed port is 9000." .Values.portalDetails.port) }}
{{- end }}
{{- end }}
@@ -1,4 +1,5 @@
{{- if and (.Values.portForwardingList) (eq (include "hostNetworkingConfiguration" .) "false") }}
{{- $hostNet := .Values.hostNetwork }}
apiVersion: v1
kind: Service
metadata:
@@ -9,6 +10,9 @@ spec:
type: NodePort
ports:
{{- range $index, $config := .Values.portForwardingList }}
{{- if and (not $hostNet) (lt (int $config.nodePort) 9000) }}
{{- fail (printf "Port (%s) is too low. Minimum allowed port is 9000." ($config.nodePort | toString)) }}
{{- end }}
- port: {{ $config.containerPort }}
targetPort: {{ $config.containerPort }}
protocol: {{ $config.protocol }}