File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed
components/node-labeler/cmd Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -284,9 +284,21 @@ func workspaceFilter() predicate.Predicate {
284
284
return predicate.Funcs {
285
285
CreateFunc : func (e event.CreateEvent ) bool {
286
286
ws := e .Object .(* workspacev1.Workspace )
287
+ if ws .Status .Runtime == nil {
288
+ log .WithField ("workspace" , ws .Name ).Info ("workspace not ready yet" )
289
+ return false
290
+ }
291
+
287
292
return ws .Status .Runtime != nil && ws .Status .Runtime .NodeName != ""
288
293
},
289
294
UpdateFunc : func (e event.UpdateEvent ) bool {
295
+ wsOld := e .ObjectOld .(* workspacev1.Workspace )
296
+ ws := e .ObjectNew .(* workspacev1.Workspace )
297
+ if wsOld .Status .Runtime == nil && ws .Status .Runtime != nil {
298
+ return true
299
+ }
300
+
301
+ // if we've seen runtime info before, there's no need to reconcile again
290
302
return false
291
303
},
292
304
DeleteFunc : func (e event.DeleteEvent ) bool {
You can’t perform that action at this time.
0 commit comments