Skip to content

Commit 07d1819

Browse files
committed
Handle controller-runtime failing to add BadgerGC
Signed-off-by: leigh capili <[email protected]>
1 parent b5a31b9 commit 07d1819

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

main.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,11 @@ func main() {
233233
}
234234

235235
if badgerGC != nil {
236-
mgr.Add(badgerGC)
236+
err := mgr.Add(badgerGC)
237+
if err != nil {
238+
setupLog.Error(err, "unable to add GC to manager")
239+
os.Exit(1)
240+
}
237241
}
238242

239243
probes.SetupChecks(mgr, setupLog)

0 commit comments

Comments
 (0)