Skip to content

Commit 7a2ac73

Browse files
authored
Fix wrong conditional check (#451)
Condition should be `!=` instead of `==` as logging is needed when `template.Render` fails. Signed-off-by: Jeesmon Jacob <[email protected]>
1 parent 377758c commit 7a2ac73

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

config-reloader/datasource/kube_informer.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -375,7 +375,7 @@ func (d *kubeInformerConnection) handlePodChange(ctx context.Context, obj interf
375375
buf := new(strings.Builder)
376376
if err := template.Render(buf, configdata, map[string]string{
377377
"Namespace": mObj.GetNamespace(),
378-
}); err == nil {
378+
}); err != nil {
379379
logrus.Errorf("failed to render config in namespace: %v", mObj.GetNamespace())
380380
}
381381
configdata = buf.String()

0 commit comments

Comments
 (0)