TrueChartsClone/charts/ix-chart/2012.0.0/templates/service.yaml

20 lines
608 B
YAML

{{- 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 }}
name: ix-{{ $.Release.Name }}-{{ $config.nodePort }}-{{ $index }}
{{- end }}
selector:
{{- include "ix-chart.selectorLabels" . | nindent 4 }}
{{- end }}