mirror of
https://github.com/k3s-io/k3s.git
synced 2024-06-07 19:41:36 +00:00
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:
commit
cfc8ab54f6
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user