From f1a226cb3d000ba67fda520af02ac5a31968b7e9 Mon Sep 17 00:00:00 2001 From: Vijay Venkatesh Kumar Date: Tue, 29 Jun 2021 14:08:48 -0400 Subject: [DCAE] Helm charts for SNMPTrap collector Helm deployment support for DCAE transformation common/svc template support for UDP protocol. Added readiness configuration. Change-Id: Idc40c60d95ddd5eb0ef43ba0b11b7b163970a5b1 Signed-off-by: Vijay Venkatesh Kumar Issue-ID: DCAEGEN2-2708 Issue-ID: OOM-2751 Signed-off-by: Vijay Venkatesh Kumar --- kubernetes/common/common/templates/_service.tpl | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) (limited to 'kubernetes/common') diff --git a/kubernetes/common/common/templates/_service.tpl b/kubernetes/common/common/templates/_service.tpl index 8489cc5021..49f1b940a6 100644 --- a/kubernetes/common/common/templates/_service.tpl +++ b/kubernetes/common/common/templates/_service.tpl @@ -13,7 +13,6 @@ # See the License for the specific language governing permissions and # limitations under the License. */}} - {{/* Resolve the name of a chart's service. @@ -122,6 +121,11 @@ labels: {{- include "common.labels" (dict "labels" $labels "dot" $dot) | nindent {{- if (include "common.needTLS" $dot) }} - port: {{ $port.port }} targetPort: {{ $port.name }} +{{- if $port.l4_protocol }} + protocol: {{ $port.l4_protocol }} +{{- else }} + protocol: TCP +{{- end }} {{- if $port.port_protocol }} name: {{ printf "%ss-%s" $port.port_protocol $port.name }} {{- else }} @@ -133,6 +137,11 @@ labels: {{- include "common.labels" (dict "labels" $labels "dot" $dot) | nindent {{- else }} - port: {{ default $port.port $port.plain_port }} targetPort: {{ $port.name }} +{{- if $port.plain_port_l4_protocol }} + protocol: {{ $port.plain_port_l4_protocol }} +{{- else }} + protocol: {{ default "TCP" $port.l4_protocol }} +{{- end }} {{- if $port.port_protocol }} name: {{ printf "%s-%s" $port.port_protocol $port.name }} {{- else }} @@ -143,6 +152,11 @@ labels: {{- include "common.labels" (dict "labels" $labels "dot" $dot) | nindent {{- if (eq $serviceType "ClusterIP") }} - port: {{ $port.plain_port }} targetPort: {{ $port.name }}-plain +{{- if $port.plain_l4_port_protocol }} + protocol: {{ $port.plain_port_l4_protocol }} +{{- else }} + protocol: {{ default "TCP" $port.l4_protocol }} +{{- end }} {{- if $port.port_protocol }} name: {{ printf "%s-%s" $port.port_protocol $port.name }} {{- else }} -- cgit 1.2.3-korg