Skip to content

Commit 5e2bad8

Browse files
fix(k8s_tagger) Removing k8s tagger warnings, as these have been causing false alarms and cost concerns (#1681)
1 parent ef1d4d4 commit 5e2bad8

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

.changelog/1681.fixed.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Remove unnecessary warnings from the k8s tagger

pkg/processor/k8sprocessor/kube/client.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -323,7 +323,7 @@ func (c *WatchClient) extractPodAttributes(pod *api_v1.Pod) map[string]string {
323323

324324
if c.Rules.NodeName {
325325
if len(pod.Spec.NodeName) == 0 {
326-
c.logger.Warn("missing Node name for Pod, cache may be out of sync", zap.String("pod", pod.Name))
326+
c.logger.Debug("missing Node name for Pod, cache may be out of sync", zap.String("pod", pod.Name))
327327
}
328328
tags[c.Rules.Tags.NodeName] = pod.Spec.NodeName
329329
}
@@ -345,7 +345,7 @@ func (c *WatchClient) extractPodAttributes(pod *api_v1.Pod) map[string]string {
345345
cs := pod.Status.ContainerStatuses[0]
346346
if c.Rules.ContainerID {
347347
if len(cs.ContainerID) == 0 {
348-
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))
348+
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))
349349
}
350350
tags[c.Rules.Tags.ContainerID] = cs.ContainerID
351351
}

pkg/processor/k8sprocessor/kube/owner.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -621,7 +621,7 @@ func (op *OwnerCache) GetOwners(pod *Pod) []*ObjectOwner {
621621
}
622622
}
623623
// ownerReference may be empty
624-
op.logger.Warn(
624+
op.logger.Debug(
625625
"missing owner data for Pod, cache may be out of sync",
626626
zap.String("pod", pod.Name),
627627
zap.String("owner_id", string(uid)),

0 commit comments

Comments
 (0)