Преглед на файлове

Merge pull request #2 from truenas/new-version

Introduce support for host networking / host ports
Waqar Ahmed преди 4 години
родител
ревизия
4d49433f91

+ 0 - 0
test/ix-chart/2010.0.1/.helmignore → test/ix-chart/2010.0.2/.helmignore


+ 1 - 1
test/ix-chart/2010.0.1/Chart.yaml → test/ix-chart/2010.0.2/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: 2010.0.1
+version: 2010.0.2
 
 # 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

+ 2 - 0
test/ix-chart/2010.0.1/README.md → test/ix-chart/2010.0.2/README.md

@@ -30,6 +30,8 @@ their default values.
 | `externalInterfaces`           | Add external interfaces in the pod                                                                              | `null`                                                               |
 | `dnsPolicy`                    | Specify DNS Policy for pod                                                                                      | `Default`                                                            |
 | `dnsConfig`                    | Specify custom DNS configuration which will be applied to the pod                                               | `{"nameservers": [], "searches": []}`                                |
+| `hostNetwork`                  | Use host network for workload ( similar to docker host networking )                                             | `false`                                                              |
+| `hostPortsList`                | Specify ports of host and workload to forward traffic from host port to workload port.                          | `null`                                                               |
 | `portForwardingList`           | Specify ports of node and workload to forward traffic from node port to workload port                           | `null`                                                               |
 | `hostPathVolumes`              | Specify host paths to be used as hostpath volumes for the workload                                              | `null`                                                               |
 | `volumes`                      | Specify `ix_volumes`                                                                                            | `null`                                                               |

+ 0 - 0
test/ix-chart/2010.0.1/app-readme.md → test/ix-chart/2010.0.2/app-readme.md


+ 30 - 0
test/ix-chart/2010.0.1/questions.yaml → test/ix-chart/2010.0.2/questions.yaml

@@ -293,6 +293,36 @@ questions:
                 schema:
                   type: string
 
+  - variable: hostNetwork
+    label: "Provide access to node network namespace for the workload"
+    group: "Networking"
+    schema:
+      type: boolean
+      default: false
+
+  - variable: hostPortsList
+    label: "Specify host ports for the workload"
+    description: "Only use host ports if scaling of a workload is not required"
+    schema:
+      show_if: [["updateStrategy", "=", "Recreate"]]
+      type: list
+      items:
+        - variable: hostPortConfiguration
+          label: "Host Port Configuration"
+          schema:
+            type: dict
+            attrs:
+              - variable: containerPort
+                label: "Container Port"
+                schema:
+                  type: string
+                  required: true
+              - variable: hostPort
+                label: "Host Port"
+                schema:
+                  type: string
+                  required: true
+
   - variable: portForwardingList
     label: "Specify Node ports to forward to workload"
     group: "Networking"

+ 0 - 0
test/ix-chart/2010.0.1/templates/NOTES.txt → test/ix-chart/2010.0.2/templates/NOTES.txt


+ 5 - 1
test/ix-chart/2010.0.1/templates/_containers.tpl → test/ix-chart/2010.0.2/templates/_containers.tpl

@@ -53,11 +53,15 @@ livenessProbe:
 Container Ports
 */}}
 {{- define "containerPorts" }}
-{{- if .Values.portForwardingList }}
+{{- if or .Values.portForwardingList .Values.hostPortsList }}
 ports:
   {{- range $index, $config := .Values.portForwardingList }}
   - containerPort: {{ $config.containerPort }}
   {{- end }}
+  {{- range $index, $config := .Values.hostPortsList }}
+  - containerPort: {{ $config.containerPort }}
+    hostPort: {{ $config.hostPort }}
+  {{- end }}
 {{- end }}
 {{- end }}
 

+ 0 - 0
test/ix-chart/2010.0.1/templates/_helpers.tpl → test/ix-chart/2010.0.2/templates/_helpers.tpl


+ 0 - 0
test/ix-chart/2010.0.1/templates/_networking.tpl → test/ix-chart/2010.0.2/templates/_networking.tpl


+ 0 - 0
test/ix-chart/2010.0.1/templates/_volumes.tpl → test/ix-chart/2010.0.2/templates/_volumes.tpl


+ 1 - 0
test/ix-chart/2010.0.1/templates/_workload.tpl → test/ix-chart/2010.0.2/templates/_workload.tpl

@@ -51,6 +51,7 @@ Pod specification
 */}}
 {{- define "podSepc" }}
 restartPolicy: {{ template "restartPolicy" . }}
+hostNetwork: {{ .Values.hostNetwork }}
 containers:
 - name: {{ .Chart.Name }}
   {{- include "volumeMountsConfiguration" . | indent 2}}

+ 0 - 0
test/ix-chart/2010.0.1/templates/external-interfaces.yaml → test/ix-chart/2010.0.2/templates/external-interfaces.yaml


+ 1 - 0
test/ix-chart/2010.0.1/templates/service.yaml → test/ix-chart/2010.0.2/templates/service.yaml

@@ -13,6 +13,7 @@ spec:
       targetPort: {{ $config.containerPort }}
       protocol: {{ $config.protocol }}
       nodePort: {{ $config.nodePort }}
+      name: ix-{{ $.Release.Name }}-{{ $config.nodePort }}-{{ $index }}
     {{- end }}
   selector:
     {{- include "ix-chart.selectorLabels" . | nindent 4 }}

+ 0 - 0
test/ix-chart/2010.0.1/templates/workload.yaml → test/ix-chart/2010.0.2/templates/workload.yaml


+ 0 - 0
test/ix-chart/2010.0.1/values.yaml → test/ix-chart/2010.0.2/values.yaml