@@ -256,6 +256,7 @@ type middlewareUpToDate struct {
256256 currentRevision string
257257 serviceReady string
258258 currentVersion string
259+ serviceUrl string
259260 autoUpdate autoUpdateStatus
260261}
261262
@@ -267,6 +268,7 @@ type middlewareOutdated struct {
267268 serviceReady string
268269 currentVersion string
269270 availableVersion string
271+ serviceUrl string
270272 autoUpdate autoUpdateStatus
271273}
272274
@@ -298,6 +300,7 @@ func (r *FunctionReconciler) checkMiddlewareState(ctx context.Context, function
298300 currentImage : desc .Image ,
299301 currentRevision : desc .Revision ,
300302 serviceReady : desc .Ready ,
303+ serviceUrl : desc .Route ,
301304 currentVersion : desc .Middleware .Version ,
302305 autoUpdate : autoUpdate ,
303306 }, nil
@@ -307,6 +310,7 @@ func (r *FunctionReconciler) checkMiddlewareState(ctx context.Context, function
307310 currentImage : desc .Image ,
308311 currentRevision : desc .Revision ,
309312 serviceReady : desc .Ready ,
313+ serviceUrl : desc .Route ,
310314 currentVersion : desc .Middleware .Version ,
311315 availableVersion : latestVersion ,
312316 autoUpdate : autoUpdate ,
@@ -340,6 +344,8 @@ func (r *FunctionReconciler) handleMiddlewareUpdate(ctx context.Context, functio
340344 function .Status .Middleware .AutoUpdate .Enabled = check .autoUpdate .enabled
341345 function .Status .Middleware .AutoUpdate .Source = check .autoUpdate .source
342346 function .Status .Middleware .PendingRebuild = false
347+ function .Status .Service .URL = check .serviceUrl
348+ function .Status .Service .Ready = check .serviceReady
343349 markServiceStatus (check .serviceReady , function )
344350 function .MarkMiddlewareUpToDate ()
345351
@@ -351,6 +357,8 @@ func (r *FunctionReconciler) handleMiddlewareUpdate(ctx context.Context, functio
351357 function .Status .Middleware .AutoUpdate .Source = check .autoUpdate .source
352358 function .Status .Middleware .Available = ptr .To (check .availableVersion )
353359 function .Status .Middleware .PendingRebuild = false
360+ function .Status .Service .URL = check .serviceUrl
361+ function .Status .Service .Ready = check .serviceReady
354362 markServiceStatus (check .serviceReady , function )
355363
356364 if ! check .autoUpdate .enabled {
@@ -380,6 +388,8 @@ func (r *FunctionReconciler) handleMiddlewareUpdate(ctx context.Context, functio
380388 function .Status .Middleware .LastRebuild = metav1 .Now ()
381389 function .Status .Deployment .ImageBuilt = metav1 .Now ()
382390 function .Status .Middleware .Available = nil
391+ function .Status .Service .URL = desc .Route
392+ function .Status .Service .Ready = desc .Ready
383393 markServiceStatus (desc .Ready , function )
384394
385395 function .RecordHistoryEvent (fmt .Sprintf ("Middleware updated from %q to %q" , check .currentVersion , check .availableVersion ))
0 commit comments