@@ -101,7 +101,7 @@ func (r *RayClusterReconciler) Reconcile(ctx context.Context, req ctrl.Request)
101101 return ctrl.Result {}, client .IgnoreNotFound (err )
102102 }
103103
104- isLocalInteractive := annotationBoolVal (logger , & cluster , "sdk.codeflare.dev/local_interactive" )
104+ isLocalInteractive := annotationBoolVal (ctx , & cluster , "sdk.codeflare.dev/local_interactive" , false )
105105 ingressDomain := cluster .ObjectMeta .Annotations ["sdk.codeflare.dev/ingress_domain" ]
106106 isOpenShift , ingressHost := getClusterType (ctx , r .kubeClient , & cluster , ingressDomain )
107107
@@ -172,7 +172,7 @@ func (r *RayClusterReconciler) Reconcile(ctx context.Context, req ctrl.Request)
172172
173173 if isLocalInteractive && ingressDomain != "" {
174174 logger .Info ("Creating RayClient Route" )
175- _ , err := r .routeClient .Routes (cluster .Namespace ).Apply (ctx , createRayClientRoute (& cluster , ingressDomain ), metav1.ApplyOptions {FieldManager : controllerName , Force : true })
175+ _ , err := r .routeClient .Routes (cluster .Namespace ).Apply (ctx , desiredRayClientRoute (& cluster , ingressDomain ), metav1.ApplyOptions {FieldManager : controllerName , Force : true })
176176 if err != nil {
177177 logger .Error (err , "Failed to update RayClient Route" )
178178 return ctrl.Result {RequeueAfter : requeueTime }, err
@@ -181,15 +181,15 @@ func (r *RayClusterReconciler) Reconcile(ctx context.Context, req ctrl.Request)
181181
182182 } else if cluster .Status .State != "suspended" && ! r .isRayDashboardOAuthEnabled () && ! isOpenShift {
183183 logger .Info ("Creating Dashboard Ingress" )
184- _ , err := r .kubeClient .NetworkingV1 ().Ingresses (cluster .Namespace ).Apply (ctx , createIngressApplyConfiguration (& cluster , ingressHost ), metav1.ApplyOptions {FieldManager : controllerName , Force : true })
184+ _ , err := r .kubeClient .NetworkingV1 ().Ingresses (cluster .Namespace ).Apply (ctx , desiredClusterIngress (& cluster , ingressHost ), metav1.ApplyOptions {FieldManager : controllerName , Force : true })
185185 if err != nil {
186186 // This log is info level since errors are not fatal and are expected
187187 logger .Info ("WARN: Failed to update Dashboard Ingress" , "error" , err .Error (), logRequeueing , true )
188188 return ctrl.Result {RequeueAfter : requeueTime }, err
189189 }
190190 if isLocalInteractive && ingressDomain != "" {
191191 logger .Info ("Creating RayClient Ingress" )
192- _ , err := r .kubeClient .NetworkingV1 ().Ingresses (cluster .Namespace ).Apply (ctx , createRayClientIngress (& cluster , ingressDomain ), metav1.ApplyOptions {FieldManager : controllerName , Force : true })
192+ _ , err := r .kubeClient .NetworkingV1 ().Ingresses (cluster .Namespace ).Apply (ctx , desiredRayClientIngress (& cluster , ingressDomain ), metav1.ApplyOptions {FieldManager : controllerName , Force : true })
193193 if err != nil {
194194 logger .Error (err , "Failed to update RayClient Ingress" )
195195 return ctrl.Result {RequeueAfter : requeueTime }, err
0 commit comments