Skip to content

Commit

Permalink
fix bug
Browse files Browse the repository at this point in the history
  • Loading branch information
bearslyricattack committed Sep 6, 2024
1 parent 8e5710b commit a16b923
Showing 1 changed file with 6 additions and 10 deletions.
16 changes: 6 additions & 10 deletions controllers/devbox/internal/controller/devbox_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -493,16 +493,12 @@ func (r *DevboxReconciler) syncService(ctx context.Context, devbox *devboxv1alph
}
var servicePorts []corev1.ServicePort
for _, port := range runtimecr.Spec.Config.Ports {
if port.Name == "devbox-ssh-port" {
servicePorts = []corev1.ServicePort{
{
Name: "tty",
Port: port.ContainerPort,
TargetPort: intstr.FromInt32(port.ContainerPort),
Protocol: port.Protocol,
},
}
}
servicePorts = append(servicePorts, corev1.ServicePort{
Name: port.Name,
Port: port.ContainerPort,
TargetPort: intstr.FromInt32(port.ContainerPort),
Protocol: port.Protocol,
})
}
if len(servicePorts) == 0 {
//use the default value
Expand Down

0 comments on commit a16b923

Please sign in to comment.