service.yaml 670 B

1234567891011121314151617181920
  1. {{- if and (.Values.portForwardingList) (eq (include "hostNetworkingConfiguration" .) "false") }}
  2. apiVersion: v1
  3. kind: Service
  4. metadata:
  5. name: {{ include "ix-chart.fullname" . }}
  6. labels:
  7. {{- include "ix-chart.labels" . | nindent 4 }}
  8. spec:
  9. type: NodePort
  10. ports:
  11. {{- range $index, $config := .Values.portForwardingList }}
  12. - port: {{ $config.containerPort }}
  13. targetPort: {{ $config.containerPort }}
  14. protocol: {{ $config.protocol }}
  15. nodePort: {{ $config.nodePort }}
  16. name: ix-{{ $.Release.Name }}-{{ $config.nodePort }}-{{ $index }}
  17. {{- end }}
  18. selector:
  19. {{- include "ix-chart.selectorLabels" . | nindent 4 }}
  20. {{- end }}