Skip to content

Commit

Permalink
fix: svc with multiple ports must have names
Browse files Browse the repository at this point in the history
  • Loading branch information
motoki317 committed Jun 14, 2023
1 parent 643da24 commit 0d64ee4
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions pkg/infrastructure/backend/k8simpl/synchronize_runtime.go
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,7 @@ func (b *k8sBackend) runtimeSpec(app *domain.RuntimeDesiredState) (*appsv1.State
Selector: appSelector(app.App.ID),
Ports: ds.Map(cont.Ports, func(port v1.ContainerPort) v1.ServicePort {
return v1.ServicePort{
Name: fmt.Sprintf("%v-%v", port.Protocol, port.ContainerPort),
Protocol: port.Protocol,
Port: port.ContainerPort,
TargetPort: intstr.FromInt(int(port.ContainerPort)),
Expand Down

0 comments on commit 0d64ee4

Please sign in to comment.