Merge pull request #2 from truenas/new-version
Introduce support for host networking / host ports
This commit is contained in:
commit
4d49433f91
|
@ -15,7 +15,7 @@ type: application
|
||||||
# This is the chart version. This version number should be incremented each time you make changes
|
# 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.
|
# to the chart and its templates, including the app version.
|
||||||
# Versions are expected to follow Semantic Versioning (https://semver.org/)
|
# 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
|
# 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
|
# incremented each time you make changes to the application. Versions are not expected to
|
|
@ -30,6 +30,8 @@ their default values.
|
||||||
| `externalInterfaces` | Add external interfaces in the pod | `null` |
|
| `externalInterfaces` | Add external interfaces in the pod | `null` |
|
||||||
| `dnsPolicy` | Specify DNS Policy for pod | `Default` |
|
| `dnsPolicy` | Specify DNS Policy for pod | `Default` |
|
||||||
| `dnsConfig` | Specify custom DNS configuration which will be applied to the pod | `{"nameservers": [], "searches": []}` |
|
| `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` |
|
| `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` |
|
| `hostPathVolumes` | Specify host paths to be used as hostpath volumes for the workload | `null` |
|
||||||
| `volumes` | Specify `ix_volumes` | `null` |
|
| `volumes` | Specify `ix_volumes` | `null` |
|
|
@ -293,6 +293,36 @@ questions:
|
||||||
schema:
|
schema:
|
||||||
type: string
|
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
|
- variable: portForwardingList
|
||||||
label: "Specify Node ports to forward to workload"
|
label: "Specify Node ports to forward to workload"
|
||||||
group: "Networking"
|
group: "Networking"
|
|
@ -53,11 +53,15 @@ livenessProbe:
|
||||||
Container Ports
|
Container Ports
|
||||||
*/}}
|
*/}}
|
||||||
{{- define "containerPorts" }}
|
{{- define "containerPorts" }}
|
||||||
{{- if .Values.portForwardingList }}
|
{{- if or .Values.portForwardingList .Values.hostPortsList }}
|
||||||
ports:
|
ports:
|
||||||
{{- range $index, $config := .Values.portForwardingList }}
|
{{- range $index, $config := .Values.portForwardingList }}
|
||||||
- containerPort: {{ $config.containerPort }}
|
- containerPort: {{ $config.containerPort }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
{{- range $index, $config := .Values.hostPortsList }}
|
||||||
|
- containerPort: {{ $config.containerPort }}
|
||||||
|
hostPort: {{ $config.hostPort }}
|
||||||
|
{{- end }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|
|
@ -51,6 +51,7 @@ Pod specification
|
||||||
*/}}
|
*/}}
|
||||||
{{- define "podSepc" }}
|
{{- define "podSepc" }}
|
||||||
restartPolicy: {{ template "restartPolicy" . }}
|
restartPolicy: {{ template "restartPolicy" . }}
|
||||||
|
hostNetwork: {{ .Values.hostNetwork }}
|
||||||
containers:
|
containers:
|
||||||
- name: {{ .Chart.Name }}
|
- name: {{ .Chart.Name }}
|
||||||
{{- include "volumeMountsConfiguration" . | indent 2}}
|
{{- include "volumeMountsConfiguration" . | indent 2}}
|
|
@ -13,6 +13,7 @@ spec:
|
||||||
targetPort: {{ $config.containerPort }}
|
targetPort: {{ $config.containerPort }}
|
||||||
protocol: {{ $config.protocol }}
|
protocol: {{ $config.protocol }}
|
||||||
nodePort: {{ $config.nodePort }}
|
nodePort: {{ $config.nodePort }}
|
||||||
|
name: ix-{{ $.Release.Name }}-{{ $config.nodePort }}-{{ $index }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
selector:
|
selector:
|
||||||
{{- include "ix-chart.selectorLabels" . | nindent 4 }}
|
{{- include "ix-chart.selectorLabels" . | nindent 4 }}
|
Loading…
Reference in New Issue