Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

missing pod metrics on namespaces with pod-security.kubernetes.io/enforce label #42400

Open
danfinn opened this issue Jan 22, 2025 · 2 comments
Labels
needs_team Indicates that the issue/PR needs a Team:* label

Comments

@danfinn
Copy link

danfinn commented Jan 22, 2025

Recently we upgraded from 8.14.x to 8.15.3 to fix a bug related to service account tokens. It seems as though there is a change in 8.15.3 where some pod metrics are not being collected from namespaces that have the pod-security.kubernetes.io/enforce label. Specifically we noticed that the kubernetes.pod.cpu.usage.limit.pct metrics are missing from these namespaces however there might be others.

Here is an example describe on a namespace that is missing the cpu usage limit pct metrics:

Name:         namespace_name
Labels:       bmap-control-plane=true
              kubernetes.io/metadata.name=namespace_name
              pod-security.kubernetes.io/enforce=baseline
              purpose=namespace_name
Annotations:  <none>
Status:       Active

No resource quota.

No LimitRange resource.

and the only difference I can find between all the other namespaces that are still acting normally is the pod-security label.

If I remove this label metricbeat will start to provide the missing metric. Adding the label back causes the metrics to no longer be shipped.

some examples from grafana of working vs not:

Image

Image

@botelastic botelastic bot added the needs_team Indicates that the issue/PR needs a Team:* label label Jan 22, 2025
@botelastic
Copy link

botelastic bot commented Jan 22, 2025

This issue doesn't have a Team:<team> label.

@danfinn
Copy link
Author

danfinn commented Jan 22, 2025

I did try with the latest 8.16.3 docker image and it did not fix the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs_team Indicates that the issue/PR needs a Team:* label
Projects
None yet
Development

No branches or pull requests

1 participant