@@ -473,6 +473,12 @@ func generateService(instance *v1beta1.Notebook) *corev1.Service {
473473 return svc
474474}
475475
476+ func ingressPath (instance * v1beta1.Notebook ) string {
477+ name := instance .Name
478+ namespace := instance .Namespace
479+ return fmt .Sprintf ("/notebook/%s/%s/" , namespace , name )
480+ }
481+
476482func virtualServiceName (kfName string , namespace string ) string {
477483 return fmt .Sprintf ("notebook-%s-%s" , namespace , kfName )
478484}
@@ -481,7 +487,7 @@ func generateVirtualService(instance *v1beta1.Notebook) (*unstructured.Unstructu
481487 name := instance .Name
482488 namespace := instance .Namespace
483489 clusterDomain := "cluster.local"
484- prefix := fmt . Sprintf ( "/notebook/%s/%s/" , namespace , name )
490+ prefix := ingressPath ( instance )
485491
486492 // unpack annotations from Notebook resource
487493 annotations := make (map [string ]string )
@@ -580,7 +586,7 @@ func generateVirtualService(instance *v1beta1.Notebook) (*unstructured.Unstructu
580586func generateHTTPRoute (instance * v1beta1.Notebook ) (* gwapiv1beta1.HTTPRoute , error ) {
581587 name := instance .Name
582588 namespace := instance .Namespace
583- pathPrefix := fmt . Sprintf ( "/notebook/%s/%s" , namespace , name )
589+ pathPrefix := ingressPath ( instance )
584590
585591 // unpack annotations from Notebook resource
586592 annotations := make (map [string ]string )
0 commit comments