Skip to content

Commit

Permalink
silence member config logs when there's no error (#590)
Browse files Browse the repository at this point in the history
Member-operator was spamming this message in its logs, but there was no
`err` field set.  Check that an error actually exists before logging it.

Signed-off-by: Andy Sadler <[email protected]>
  • Loading branch information
sadlerap authored Aug 1, 2024
1 parent c538d1b commit ba21e2f
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions cmd/webhook/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -148,8 +148,9 @@ func main() {
func reloadMemberConfig(cl client.Client) context.Context {
ctx := ctrl.SetupSignalHandler()
go wait.Until(func() {
_, _, err := configuration.LoadLatest(cl, &toolchainv1alpha1.MemberOperatorConfig{})
setupLog.Error(err, "unable to load latest member config")
if _, _, err := configuration.LoadLatest(cl, &toolchainv1alpha1.MemberOperatorConfig{}); err != nil {
setupLog.Error(err, "unable to load latest member config")
}
}, 5*time.Second, ctx.Done())
return ctx
}

0 comments on commit ba21e2f

Please sign in to comment.