service.yaml 475 B

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