{{-       else }}
   name: {{ $port.name }}
 {{-       end }}
-{{-       if (eq $serviceType "NodePort") }}
-  nodePort: {{ include "common.nodePortPrefix" (dict "dot" $dot "useNodePortExt" $port.useNodePortExt) }}{{ $port.nodePort }}
-{{-       end }}
 {{-     else }}
 - port: {{ default $port.port $port.plain_port }}
   targetPort: {{ $port.name }}
   name: {{ $port.name }}
 {{-       end }}
 {{-     end }}
+{{-     if (eq $serviceType "NodePort") }}
+  nodePort: {{ include "common.nodePortPrefix" (dict "dot" $dot "useNodePortExt" $port.useNodePortExt) }}{{ $port.nodePort }}
+{{-     end }}
 {{-     if (and (and (include "common.needTLS" $dot) $add_plain_port) $port.plain_port)  }}
 {{-       if (eq $serviceType "ClusterIP")  }}
 - port: {{ $port.plain_port }}
   targetPort: {{ $port.name }}-plain
-{{-       if $port.plain_l4_port_protocol }}
+{{-         if $port.plain_l4_port_protocol }}
   protocol: {{ $port.plain_port_l4_protocol }}
-{{-       else }}
+{{-         else }}
   protocol: {{ default "TCP" $port.l4_protocol  }}
-{{-       end }}
+{{-         end }}
 {{-         if $port.port_protocol }}
   name: {{ printf "%s-%s" $port.port_protocol $port.name }}
 {{-         else }}
 
   # Set to false if you want to disable TLS for NodePorts. Be aware that this
   # will loosen your security.
   # if set this element will force or not tls even if serviceMesh.tls is set.
-  # tlsEnabled: false
+  tlsEnabled: false
 
   # Logging
   # Currently, centralized logging is not in best shape so it's disabled by