@@ -255,6 +255,7 @@ type middlewareUpToDate struct {
255255 currentRevision string
256256 serviceReady string
257257 currentVersion string
258+ serviceUrl string
258259 autoUpdate autoUpdateStatus
259260}
260261
@@ -266,6 +267,7 @@ type middlewareOutdated struct {
266267 serviceReady string
267268 currentVersion string
268269 availableVersion string
270+ serviceUrl string
269271 autoUpdate autoUpdateStatus
270272}
271273
@@ -297,6 +299,7 @@ func (r *FunctionReconciler) checkMiddlewareState(ctx context.Context, function
297299 currentImage : desc .Image ,
298300 currentRevision : desc .Revision ,
299301 serviceReady : desc .Ready ,
302+ serviceUrl : desc .Route ,
300303 currentVersion : desc .Middleware .Version ,
301304 autoUpdate : autoUpdate ,
302305 }, nil
@@ -306,6 +309,7 @@ func (r *FunctionReconciler) checkMiddlewareState(ctx context.Context, function
306309 currentImage : desc .Image ,
307310 currentRevision : desc .Revision ,
308311 serviceReady : desc .Ready ,
312+ serviceUrl : desc .Route ,
309313 currentVersion : desc .Middleware .Version ,
310314 availableVersion : latestVersion ,
311315 autoUpdate : autoUpdate ,
@@ -339,6 +343,8 @@ func (r *FunctionReconciler) handleMiddlewareUpdate(ctx context.Context, functio
339343 function .Status .Middleware .AutoUpdate .Enabled = check .autoUpdate .enabled
340344 function .Status .Middleware .AutoUpdate .Source = check .autoUpdate .source
341345 function .Status .Middleware .PendingRebuild = false
346+ function .Status .Service .URL = check .serviceUrl
347+ function .Status .Service .Ready = check .serviceReady
342348 markServiceStatus (check .serviceReady , function )
343349 function .MarkMiddlewareUpToDate ()
344350
@@ -350,6 +356,8 @@ func (r *FunctionReconciler) handleMiddlewareUpdate(ctx context.Context, functio
350356 function .Status .Middleware .AutoUpdate .Source = check .autoUpdate .source
351357 function .Status .Middleware .Available = ptr .To (check .availableVersion )
352358 function .Status .Middleware .PendingRebuild = false
359+ function .Status .Service .URL = check .serviceUrl
360+ function .Status .Service .Ready = check .serviceReady
353361 markServiceStatus (check .serviceReady , function )
354362
355363 if ! check .autoUpdate .enabled {
@@ -379,6 +387,8 @@ func (r *FunctionReconciler) handleMiddlewareUpdate(ctx context.Context, functio
379387 function .Status .Middleware .LastRebuild = metav1 .Now ()
380388 function .Status .Deployment .ImageBuilt = metav1 .Now ()
381389 function .Status .Middleware .Available = nil
390+ function .Status .Service .URL = desc .Route
391+ function .Status .Service .Ready = desc .Ready
382392 markServiceStatus (desc .Ready , function )
383393
384394 function .RecordHistoryEvent (fmt .Sprintf ("Middleware updated from %q to %q" , check .currentVersion , check .availableVersion ))
0 commit comments