Commit a88f0ad2 authored by Waqar Ahmed's avatar Waqar Ahmed

Add service to specify port forwarding

parent 38ef0b46
......@@ -274,6 +274,37 @@ questions:
schema:
type: string
- variable: portForwardingList
label: "Specify Node ports to forward to workload"
group: "Networking"
description: "Specify ports of node and workload to forward traffic from node port to workload port"
schema:
type: list
items:
- variable: portForwarding
label: "Port Forwarding Configuration"
schema:
type: dict
attrs:
- variable: containerPort
label: "Container Port"
schema:
type: string
required: true
- variable: nodePort
label: "Node Port"
schema:
type: string
required: true
- variable: protocol
label: "Protocol"
schema:
type: string
default: "TCP"
enum:
- "TCP"
- "UDP"
# Storage Options
# Host path based volumes
- variable: hostPathVolumes
......
{{- if .Values.portForwardingList }}
apiVersion: v1
kind: Service
metadata:
name: {{- include "ix-chart.fullname" . }}
labels:
{{- include "ix-chart.labels" . | nindent 4 }}
spec:
type: NodePort
ports:
{{- range $index, $config := .Values.portForwardingList }}
- port: {{ $config.containerPort }}
targetPort: {{ $config.containerPort }}
protocol: {{ $config.protocol }}
nodePort: {{ $config.nodePort }}
{{- end }}
selector:
{{- include "ix-chart.selectorLabels" . | nindent 4 }}
{{- end }}
\ No newline at end of file
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment