{{ $svc := .Values.embyServerHttp }}
{{ $ports := list }}
{{ if .Values.hostNetwork }}
{{ $ports = mustAppend $ports (dict "name" "http" "port" 8096 "targetPort" 8096) }}
{{ else }}
{{ $ports = mustAppend $ports (dict "name" "http" "port" $svc.port "nodePort" $svc.port "targetPort" 8096) }}
{{ end }}
{{ $params := . }}
{{ $_ := set $params "commonService" (dict "ports" $ports ) }}
{{ if .Values.hostNetwork }}
{{ $_ := set $params.commonService "nameSuffix" "tcp-cluster-ip" }}
{{ $_1 := set $params.commonService "type" "ClusterIP" }}
{{ else }}
{{ $_ := set $params.commonService "nameSuffix" "tcp" }}
{{ $_1 := set $params.commonService "type" "NodePort" }}
{{ end }}
{{ include "common.classes.service" $params }}
