Skip to content

Commit

Permalink
endpoint: fix k8sNamespace log field when ep gets deleted
Browse files Browse the repository at this point in the history
Currently, the log field k8sNamespace contains the name of the pod
instead of the actual namespace when an endpoint gets deleted. This
commit fixes this and adds the k8s namespace.

Signed-off-by: Marco Hofstetter <marco.hofstetter@isovalent.com>
  • Loading branch information
mhofstetter authored and julianwiedmann committed Mar 29, 2023
1 parent 17419c9 commit 772f4a0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions daemon/cmd/endpoint.go
Original file line number Diff line number Diff line change
Expand Up @@ -702,14 +702,14 @@ func (d *Daemon) DeleteEndpoint(id string) (int, error) {
logfields.IPv6: ep.GetIPv6Address(),
logfields.EndpointID: ep.ID,
logfields.K8sPodName: ep.GetK8sPodName(),
logfields.K8sNamespace: ep.GetK8sPodName(),
logfields.K8sNamespace: ep.GetK8sNamespace(),
}).Info(msg)
default:
log.WithFields(logrus.Fields{
logfields.ContainerID: containerID,
logfields.EndpointID: ep.ID,
logfields.K8sPodName: ep.GetK8sPodName(),
logfields.K8sNamespace: ep.GetK8sPodName(),
logfields.K8sNamespace: ep.GetK8sNamespace(),
}).Info(msg)
}
return d.deleteEndpoint(ep), nil
Expand Down

0 comments on commit 772f4a0

Please sign in to comment.