浏览代码

Remove min port from UI and validate with template

Stavros kois 2 年之前
父节点
当前提交
60a902e98a
共有 36 个文件被更改,包括 24 次插入6 次删除
  1. 0 0
      charts/ix-chart/2212.0.1/.helmignore
  2. 0 0
      charts/ix-chart/2212.0.1/Chart.lock
  3. 1 1
      charts/ix-chart/2212.0.1/Chart.yaml
  4. 0 0
      charts/ix-chart/2212.0.1/README.md
  5. 0 0
      charts/ix-chart/2212.0.1/app-readme.md
  6. 0 0
      charts/ix-chart/2212.0.1/charts/common-2207.0.0.tgz
  7. 0 2
      charts/ix-chart/2212.0.1/questions.yaml
  8. 0 0
      charts/ix-chart/2212.0.1/templates/NOTES.txt
  9. 0 0
      charts/ix-chart/2212.0.1/templates/_containers.tpl
  10. 0 0
      charts/ix-chart/2212.0.1/templates/_helpers.tpl
  11. 7 0
      charts/ix-chart/2212.0.1/templates/_networking.tpl
  12. 0 0
      charts/ix-chart/2212.0.1/templates/_volumes.tpl
  13. 0 0
      charts/ix-chart/2212.0.1/templates/_workload.tpl
  14. 0 0
      charts/ix-chart/2212.0.1/templates/external-interfaces.yaml
  15. 4 0
      charts/ix-chart/2212.0.1/templates/service.yaml
  16. 0 0
      charts/ix-chart/2212.0.1/templates/tests/deployment-check.yaml
  17. 0 0
      charts/ix-chart/2212.0.1/templates/workload.yaml
  18. 0 0
      charts/ix-chart/2212.0.1/test_values.yaml
  19. 0 0
      test/ix-chart/2212.0.1/.helmignore
  20. 0 0
      test/ix-chart/2212.0.1/Chart.lock
  21. 1 1
      test/ix-chart/2212.0.1/Chart.yaml
  22. 0 0
      test/ix-chart/2212.0.1/README.md
  23. 0 0
      test/ix-chart/2212.0.1/app-readme.md
  24. 0 0
      test/ix-chart/2212.0.1/charts/common-2207.0.0.tgz
  25. 0 2
      test/ix-chart/2212.0.1/questions.yaml
  26. 0 0
      test/ix-chart/2212.0.1/templates/NOTES.txt
  27. 0 0
      test/ix-chart/2212.0.1/templates/_containers.tpl
  28. 0 0
      test/ix-chart/2212.0.1/templates/_helpers.tpl
  29. 7 0
      test/ix-chart/2212.0.1/templates/_networking.tpl
  30. 0 0
      test/ix-chart/2212.0.1/templates/_volumes.tpl
  31. 0 0
      test/ix-chart/2212.0.1/templates/_workload.tpl
  32. 0 0
      test/ix-chart/2212.0.1/templates/external-interfaces.yaml
  33. 4 0
      test/ix-chart/2212.0.1/templates/service.yaml
  34. 0 0
      test/ix-chart/2212.0.1/templates/tests/deployment-check.yaml
  35. 0 0
      test/ix-chart/2212.0.1/templates/workload.yaml
  36. 0 0
      test/ix-chart/2212.0.1/test_values.yaml

+ 0 - 0
charts/ix-chart/2212.0.0/.helmignore → charts/ix-chart/2212.0.1/.helmignore


+ 0 - 0
charts/ix-chart/2212.0.0/Chart.lock → charts/ix-chart/2212.0.1/Chart.lock


+ 1 - 1
charts/ix-chart/2212.0.0/Chart.yaml → charts/ix-chart/2212.0.1/Chart.yaml

@@ -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

+ 0 - 0
charts/ix-chart/2212.0.0/README.md → charts/ix-chart/2212.0.1/README.md


+ 0 - 0
charts/ix-chart/2212.0.0/app-readme.md → charts/ix-chart/2212.0.1/app-readme.md


+ 0 - 0
charts/ix-chart/2212.0.0/charts/common-2207.0.0.tgz → charts/ix-chart/2212.0.1/charts/common-2207.0.0.tgz


+ 0 - 2
test/ix-chart/2212.0.0/questions.yaml → charts/ix-chart/2212.0.1/questions.yaml

@@ -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"

+ 0 - 0
charts/ix-chart/2212.0.0/templates/NOTES.txt → charts/ix-chart/2212.0.1/templates/NOTES.txt


+ 0 - 0
charts/ix-chart/2212.0.0/templates/_containers.tpl → charts/ix-chart/2212.0.1/templates/_containers.tpl


+ 0 - 0
charts/ix-chart/2212.0.0/templates/_helpers.tpl → charts/ix-chart/2212.0.1/templates/_helpers.tpl


+ 7 - 0
test/ix-chart/2212.0.0/templates/_networking.tpl → charts/ix-chart/2212.0.1/templates/_networking.tpl

@@ -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 }}

+ 0 - 0
charts/ix-chart/2212.0.0/templates/_volumes.tpl → charts/ix-chart/2212.0.1/templates/_volumes.tpl


+ 0 - 0
charts/ix-chart/2212.0.0/templates/_workload.tpl → charts/ix-chart/2212.0.1/templates/_workload.tpl


+ 0 - 0
charts/ix-chart/2212.0.0/templates/external-interfaces.yaml → charts/ix-chart/2212.0.1/templates/external-interfaces.yaml


+ 4 - 0
test/ix-chart/2212.0.0/templates/service.yaml → charts/ix-chart/2212.0.1/templates/service.yaml

@@ -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 }}

+ 0 - 0
charts/ix-chart/2212.0.0/templates/tests/deployment-check.yaml → charts/ix-chart/2212.0.1/templates/tests/deployment-check.yaml


+ 0 - 0
charts/ix-chart/2212.0.0/templates/workload.yaml → charts/ix-chart/2212.0.1/templates/workload.yaml


+ 0 - 0
charts/ix-chart/2212.0.0/test_values.yaml → charts/ix-chart/2212.0.1/test_values.yaml


+ 0 - 0
test/ix-chart/2212.0.0/.helmignore → test/ix-chart/2212.0.1/.helmignore


+ 0 - 0
test/ix-chart/2212.0.0/Chart.lock → test/ix-chart/2212.0.1/Chart.lock


+ 1 - 1
test/ix-chart/2212.0.0/Chart.yaml → test/ix-chart/2212.0.1/Chart.yaml

@@ -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

+ 0 - 0
test/ix-chart/2212.0.0/README.md → test/ix-chart/2212.0.1/README.md


+ 0 - 0
test/ix-chart/2212.0.0/app-readme.md → test/ix-chart/2212.0.1/app-readme.md


+ 0 - 0
test/ix-chart/2212.0.0/charts/common-2207.0.0.tgz → test/ix-chart/2212.0.1/charts/common-2207.0.0.tgz


+ 0 - 2
charts/ix-chart/2212.0.0/questions.yaml → test/ix-chart/2212.0.1/questions.yaml

@@ -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"

+ 0 - 0
test/ix-chart/2212.0.0/templates/NOTES.txt → test/ix-chart/2212.0.1/templates/NOTES.txt


+ 0 - 0
test/ix-chart/2212.0.0/templates/_containers.tpl → test/ix-chart/2212.0.1/templates/_containers.tpl


+ 0 - 0
test/ix-chart/2212.0.0/templates/_helpers.tpl → test/ix-chart/2212.0.1/templates/_helpers.tpl


+ 7 - 0
charts/ix-chart/2212.0.0/templates/_networking.tpl → test/ix-chart/2212.0.1/templates/_networking.tpl

@@ -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 }}

+ 0 - 0
test/ix-chart/2212.0.0/templates/_volumes.tpl → test/ix-chart/2212.0.1/templates/_volumes.tpl


+ 0 - 0
test/ix-chart/2212.0.0/templates/_workload.tpl → test/ix-chart/2212.0.1/templates/_workload.tpl


+ 0 - 0
test/ix-chart/2212.0.0/templates/external-interfaces.yaml → test/ix-chart/2212.0.1/templates/external-interfaces.yaml


+ 4 - 0
charts/ix-chart/2212.0.0/templates/service.yaml → test/ix-chart/2212.0.1/templates/service.yaml

@@ -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 }}

+ 0 - 0
test/ix-chart/2212.0.0/templates/tests/deployment-check.yaml → test/ix-chart/2212.0.1/templates/tests/deployment-check.yaml


+ 0 - 0
test/ix-chart/2212.0.0/templates/workload.yaml → test/ix-chart/2212.0.1/templates/workload.yaml


+ 0 - 0
test/ix-chart/2212.0.0/test_values.yaml → test/ix-chart/2212.0.1/test_values.yaml