Unverified Commit eb2bedff authored by Diogo Scudelletti's avatar Diogo Scudelletti Committed by GitHub

Add socket_listener port to Service when it is UDP or TCP (#302)

parent e8b03195
......@@ -57,6 +57,14 @@ spec:
targetPort: {{ trimPrefix ":" $value.service_address | int64 }}
name: "webhooks"
{{- end }}
{{- if eq $key "socket_listener" }}
{{- if or (hasPrefix "udp" $value.service_address) (hasPrefix "tcp" $value.service_address) }}
- port: {{ regexFind "[0-9]+$" $value.service_address | int64 }}
targetPort: {{ regexFind "[0-9]+$" $value.service_address | int64 }}
protocol: {{ upper (substr 0 3 $value.service_address) }}
name: {{ printf "%s-%s" "socket-listener" (regexFind "[0-9]+$" $value.service_address) }}
{{- end }}
{{- end }}
{{- end -}}
{{- end }}
{{- range $objectKey, $objectValue := .Values.config.outputs }}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment