[STRIMZI] External Kafka Access via Ingress
[oom.git] / kubernetes / common / common / templates / _service.tpl
index 20d2ebe..3db0139 100644 (file)
@@ -126,6 +126,9 @@ labels: {{- include "common.labels" (dict "labels" $labels "dot" $dot) | nindent
 {{-       else }}
   protocol: TCP
 {{-       end }}
+{{-       if $port.app_protocol }}
+  appProtocol: {{ $port.app_protocol }}
+{{-       end }}
 {{-       if $port.port_protocol }}
   name: {{ printf "%ss-%s" $port.port_protocol $port.name }}
 {{-       else }}
@@ -139,6 +142,9 @@ labels: {{- include "common.labels" (dict "labels" $labels "dot" $dot) | nindent
 {{-       else }}
   protocol: {{ default "TCP" $port.l4_protocol  }}
 {{-       end }}
+{{-       if $port.app_protocol }}
+  appProtocol: {{ $port.app_protocol }}
+{{-       end }}
 {{-       if $port.port_protocol }}
   name: {{ printf "%s-%s" $port.port_protocol $port.name }}
 {{-       else }}
@@ -157,6 +163,9 @@ labels: {{- include "common.labels" (dict "labels" $labels "dot" $dot) | nindent
 {{-         else }}
   protocol: {{ default "TCP" $port.l4_protocol  }}
 {{-         end }}
+{{-       if $port.app_protocol }}
+  appProtocol: {{ $port.app_protocol }}
+{{-       end }}
 {{-         if $port.port_protocol }}
   name: {{ printf "%s-%s" $port.port_protocol $port.name }}
 {{-         else }}
@@ -241,7 +250,7 @@ spec:
 {{-   $both_tls_and_plain:= default false $dot.Values.service.both_tls_and_plain }}
 {{-   $labels := default (dict) .labels -}}
 {{-   $matchLabels := default (dict) .matchLabels -}}
-{{-   if and (include "common.onServiceMesh" $dot) (eq $serviceType "NodePort") }}
+{{-   if and (include "common.ingressEnabled" $dot) (eq $serviceType "NodePort") -}}
 {{-     $serviceType = "ClusterIP" }}
 {{-   end }}