service.yaml 472 B

12345678910
  1. {{ $port := .Values.nodePort }}
  2. {{ $ports := list }}
  3. {{ if .Values.certificate }}
  4. {{ $ports = mustAppend $ports (dict "name" "https" "nodePort" $port "targetPort" 443 "port" 443) }}
  5. {{ else }}
  6. {{ $ports = mustAppend $ports (dict "name" "http" "nodePort" $port "targetPort" 9980 "port" 9980) }}
  7. {{ end }}
  8. {{ $params := (. | mustDeepCopy) }}
  9. {{ $_ := set $params "commonService" (dict "ports" $ports "type" "NodePort" ) }}
  10. {{ include "common.classes.service" $params }}