Skip to content

Commit

Permalink
Use default appProtocol if not specified
Browse files Browse the repository at this point in the history
  • Loading branch information
JacobSMoller committed Sep 2, 2024
1 parent 7de3ac0 commit 4c9a1cd
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion ray-operator/controllers/ray/common/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,11 @@ func BuildServeService(ctx context.Context, rayService rayv1.RayService, rayClus
ports := []corev1.ServicePort{}
for _, port := range serveService.Spec.Ports {
if port.Name == utils.ServingPortName {
svcPort := corev1.ServicePort{Name: port.Name, Port: port.Port, AppProtocol: port.AppProtocol}
appProtocol := utils.DefaultServiceAppProtocol
if port.AppProtocol != nil {
appProtocol = *port.AppProtocol
}
svcPort := corev1.ServicePort{Name: port.Name, Port: port.Port, AppProtocol: &appProtocol}
ports = append(ports, svcPort)
break
}
Expand Down

0 comments on commit 4c9a1cd

Please sign in to comment.