Skip to content

Commit

Permalink
fix(k8s_tagger) Removing k8s tagger warnings, as these have been caus…
Browse files Browse the repository at this point in the history
…ing false alarms and cost concerns (#1681)
  • Loading branch information
rnishtala-sumo authored Oct 3, 2024
1 parent ef1d4d4 commit 5e2bad8
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions .changelog/1681.fixed.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Remove unnecessary warnings from the k8s tagger
4 changes: 2 additions & 2 deletions pkg/processor/k8sprocessor/kube/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -323,7 +323,7 @@ func (c *WatchClient) extractPodAttributes(pod *api_v1.Pod) map[string]string {

if c.Rules.NodeName {
if len(pod.Spec.NodeName) == 0 {
c.logger.Warn("missing Node name for Pod, cache may be out of sync", zap.String("pod", pod.Name))
c.logger.Debug("missing Node name for Pod, cache may be out of sync", zap.String("pod", pod.Name))
}
tags[c.Rules.Tags.NodeName] = pod.Spec.NodeName
}
Expand All @@ -345,7 +345,7 @@ func (c *WatchClient) extractPodAttributes(pod *api_v1.Pod) map[string]string {
cs := pod.Status.ContainerStatuses[0]
if c.Rules.ContainerID {
if len(cs.ContainerID) == 0 {
c.logger.Warn("missing container ID for Pod, cache may be out of sync", zap.String("pod", pod.Name), zap.String("container_name", cs.Name))
c.logger.Debug("missing container ID for Pod, cache may be out of sync", zap.String("pod", pod.Name), zap.String("container_name", cs.Name))
}
tags[c.Rules.Tags.ContainerID] = cs.ContainerID
}
Expand Down
2 changes: 1 addition & 1 deletion pkg/processor/k8sprocessor/kube/owner.go
Original file line number Diff line number Diff line change
Expand Up @@ -621,7 +621,7 @@ func (op *OwnerCache) GetOwners(pod *Pod) []*ObjectOwner {
}
}
// ownerReference may be empty
op.logger.Warn(
op.logger.Debug(
"missing owner data for Pod, cache may be out of sync",
zap.String("pod", pod.Name),
zap.String("owner_id", string(uid)),
Expand Down

0 comments on commit 5e2bad8

Please sign in to comment.