Skip to content
This repository was archived by the owner on Nov 27, 2023. It is now read-only.

Commit 7b03b04

Browse files
authored
Merge pull request #1916 from mikesir87/allow-unspecified-protocol-on-port
Allow unspecified protocol on exposed port in kube backend
2 parents f09336e + e62bfc8 commit 7b03b04

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

kube/resources/kube.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,12 +92,13 @@ func mapToService(project *types.Project, service types.ServiceConfig) *core.Ser
9292
if p.Published != 0 {
9393
serviceType = core.ServiceTypeLoadBalancer
9494
}
95+
protocol := toProtocol(p.Protocol)
9596
ports = append(ports,
9697
core.ServicePort{
97-
Name: fmt.Sprintf("%d-%s", p.Published, strings.ToLower(p.Protocol)),
98+
Name: fmt.Sprintf("%d-%s", p.Published, strings.ToLower(string(protocol))),
9899
Port: int32(p.Published),
99100
TargetPort: intstr.FromInt(int(p.Target)),
100-
Protocol: toProtocol(p.Protocol),
101+
Protocol: protocol,
101102
})
102103
}
103104
if len(ports) == 0 { // headless service

0 commit comments

Comments
 (0)