Skip to content

Commit a46679d

Browse files
zach593liangyuanpeng
authored andcommitted
let rb status controller onCreate predicate return true
Signed-off-by: zach593 <[email protected]>
1 parent 7bf4a1e commit a46679d

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

pkg/controllers/status/common.go

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,13 @@ import (
4343
)
4444

4545
var bindingPredicateFn = builder.WithPredicates(predicate.Funcs{
46-
CreateFunc: func(event.CreateEvent) bool { return false },
46+
CreateFunc: func(event.CreateEvent) bool {
47+
// Although we don't need to process the ResourceBinding immediately upon its creation,
48+
// but it's necessary to ensure that all existing ResourceBindings are processed
49+
// uniformly once when the component restarts.
50+
// This guarantees that no ResourceBinding is missed after a controller restart.
51+
return true
52+
},
4753
UpdateFunc: func(e event.UpdateEvent) bool {
4854
var oldResourceVersion, newResourceVersion string
4955

0 commit comments

Comments
 (0)