Merge pull request #232 from erikwilson/load-balancer-port-name-size-limit-fix

Short port names for service load balancer
This commit is contained in:
Darren Shepherd 2019-03-17 12:59:59 -07:00 committed by GitHub
commit cfc8ab54f6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -272,11 +272,8 @@ func (h *handler) newDeployment(svc *core.Service) (*apps.Deployment, error) {
},
}
for i, port := range svc.Spec.Ports {
portName := port.Name
if portName == "" {
portName = fmt.Sprintf("port-%d", i)
}
for _, port := range svc.Spec.Ports {
portName := fmt.Sprintf("lb-port-%d", port.Port)
container := core.Container{
Name: portName,
Image: image,