@@ -101,7 +101,7 @@ func (r *RayClusterReconciler) Reconcile(ctx context.Context, req ctrl.Request)
101
101
return ctrl.Result {}, client .IgnoreNotFound (err )
102
102
}
103
103
104
- isLocalInteractive := annotationBoolVal (logger , & cluster , "sdk.codeflare.dev/local_interactive" )
104
+ isLocalInteractive := annotationBoolVal (ctx , & cluster , "sdk.codeflare.dev/local_interactive" , false )
105
105
ingressDomain := cluster .ObjectMeta .Annotations ["sdk.codeflare.dev/ingress_domain" ]
106
106
isOpenShift , ingressHost := getClusterType (ctx , r .kubeClient , & cluster , ingressDomain )
107
107
@@ -172,7 +172,7 @@ func (r *RayClusterReconciler) Reconcile(ctx context.Context, req ctrl.Request)
172
172
173
173
if isLocalInteractive && ingressDomain != "" {
174
174
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 })
176
176
if err != nil {
177
177
logger .Error (err , "Failed to update RayClient Route" )
178
178
return ctrl.Result {RequeueAfter : requeueTime }, err
@@ -181,15 +181,15 @@ func (r *RayClusterReconciler) Reconcile(ctx context.Context, req ctrl.Request)
181
181
182
182
} else if cluster .Status .State != "suspended" && ! r .isRayDashboardOAuthEnabled () && ! isOpenShift {
183
183
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 })
185
185
if err != nil {
186
186
// This log is info level since errors are not fatal and are expected
187
187
logger .Info ("WARN: Failed to update Dashboard Ingress" , "error" , err .Error (), logRequeueing , true )
188
188
return ctrl.Result {RequeueAfter : requeueTime }, err
189
189
}
190
190
if isLocalInteractive && ingressDomain != "" {
191
191
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 })
193
193
if err != nil {
194
194
logger .Error (err , "Failed to update RayClient Ingress" )
195
195
return ctrl.Result {RequeueAfter : requeueTime }, err
0 commit comments