Skip to content

Comments

Mark Pods deployed by k8s collector with "sw.k8s.deployedbycollector"#1242

Merged
etichy merged 5 commits intomasterfrom
markPodsDeployedByK8sCollector
Dec 17, 2025
Merged

Mark Pods deployed by k8s collector with "sw.k8s.deployedbycollector"#1242
etichy merged 5 commits intomasterfrom
markPodsDeployedByK8sCollector

Conversation

@pstranak-sw
Copy link
Contributor

@pstranak-sw pstranak-sw commented Dec 15, 2025

No description provided.

@github-actions github-actions bot added the helm label Dec 15, 2025
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need to test whether this actually works, because the all container metrics (kube_pod_container_*) collected by this collector are marked with sw.entity.noupdate. I think it doesn't actually do anything. But if it does, it would make this change non-functional. But it would also mean that collecting container statuses, images, "init" info, etc. from metrics would not work either.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't understand why do we instrument telemetry by anything at all here? We updated all pods that we deploy and all pods that are deployed by subcharts, so why do we need to update k8sattributes config at all?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need to extract a resource attribute out of the label. There are multiple ways how to achieve that. I used this one as it makes it unified with what I did in the manifest collection pipeline. And it allowed to me to add also the sanity check for to sure the resource attribute is not set in case of incorrect namespace.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok, clarified async. We will keep this backup there until we make sure that event collector and ingenstion of entity state events from manifest cannot be disabled.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes in this file depend on solarwinds/solarwinds-otel-collector-contrib#220

etichy
etichy previously approved these changes Dec 15, 2025
processors:
k8sattributes:
{{ include "common.k8s-instrumentation" . | indent 4 }}
auth_type: "serviceAccount"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't like this copy paste, but probably there's no other way.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd actually prefer to remove most of the deduplicated code, as it only complicates investigations of what each pipeline does and what data it really depends on. Not all of the shared configuration is really used by all of the pipelines, that reference it.

@github-actions github-actions bot added the ci/cd label Dec 17, 2025
@etichy etichy marked this pull request as ready for review December 17, 2025 08:44
@etichy etichy requested a review from a team as a code owner December 17, 2025 08:44
@etichy etichy merged commit e7157d7 into master Dec 17, 2025
18 checks passed
@etichy etichy deleted the markPodsDeployedByK8sCollector branch December 17, 2025 09:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

3 participants