diff --git a/pkg/types/namespacedname.go b/pkg/types/namespacedname.go index 29fb4f950..db18ce1ce 100644 --- a/pkg/types/namespacedname.go +++ b/pkg/types/namespacedname.go @@ -41,7 +41,8 @@ func (n NamespacedName) String() string { // MarshalLog emits a struct containing required key/value pair func (n NamespacedName) MarshalLog() interface{} { return struct { - Name, Namespace string + Name string `json:"name"` + Namespace string `json:"namespace,omitempty"` }{ Name: n.Name, Namespace: n.Namespace,