@@ -251,16 +251,18 @@ type middlewareCheck interface {
251251}
252252
253253type middlewareUpToDate struct {
254- currentImage string
255- serviceReady string
256- currentVersion string
257- autoUpdate autoUpdateStatus
254+ currentImage string
255+ currentRevision string
256+ serviceReady string
257+ currentVersion string
258+ autoUpdate autoUpdateStatus
258259}
259260
260261func (middlewareUpToDate ) middlewareCheck () {}
261262
262263type middlewareOutdated struct {
263264 currentImage string
265+ currentRevision string
264266 serviceReady string
265267 currentVersion string
266268 availableVersion string
@@ -292,15 +294,17 @@ func (r *FunctionReconciler) checkMiddlewareState(ctx context.Context, function
292294
293295 if latestVersion == desc .Middleware .Version {
294296 return middlewareUpToDate {
295- currentImage : desc .Image ,
296- serviceReady : desc .Ready ,
297- currentVersion : desc .Middleware .Version ,
298- autoUpdate : autoUpdate ,
297+ currentImage : desc .Image ,
298+ currentRevision : desc .Revision ,
299+ serviceReady : desc .Ready ,
300+ currentVersion : desc .Middleware .Version ,
301+ autoUpdate : autoUpdate ,
299302 }, nil
300303 }
301304
302305 return middlewareOutdated {
303306 currentImage : desc .Image ,
307+ currentRevision : desc .Revision ,
304308 serviceReady : desc .Ready ,
305309 currentVersion : desc .Middleware .Version ,
306310 availableVersion : latestVersion ,
@@ -330,6 +334,7 @@ func (r *FunctionReconciler) handleMiddlewareUpdate(ctx context.Context, functio
330334 case middlewareUpToDate :
331335 logger .Info ("Function is on latest middleware. No redeploy needed" , "version" , check .currentVersion )
332336 function .Status .Deployment .Image = check .currentImage
337+ function .Status .Deployment .Revision = check .currentRevision
333338 function .Status .Middleware .Current = check .currentVersion
334339 function .Status .Middleware .AutoUpdate .Enabled = check .autoUpdate .enabled
335340 function .Status .Middleware .AutoUpdate .Source = check .autoUpdate .source
@@ -339,6 +344,7 @@ func (r *FunctionReconciler) handleMiddlewareUpdate(ctx context.Context, functio
339344
340345 case middlewareOutdated :
341346 function .Status .Deployment .Image = check .currentImage
347+ function .Status .Deployment .Revision = check .currentRevision
342348 function .Status .Middleware .Current = check .currentVersion
343349 function .Status .Middleware .AutoUpdate .Enabled = check .autoUpdate .enabled
344350 function .Status .Middleware .AutoUpdate .Source = check .autoUpdate .source
0 commit comments