-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
[kubeapiserver/events] Support namespace labels as tags on kubernetes events #25490
[kubeapiserver/events] Support namespace labels as tags on kubernetes events #25490
Conversation
2c281f7
to
d02573a
Compare
I opened a PR yesterday that implements part of what has been implemented here: #25460 Just the migration of the endpoint to get the namespace labels. |
Test changes on VMUse this command from test-infra-definitions to manually test this PR changes on a VM: inv create-vm --pipeline-id=34031654 --os-family=ubuntu |
Regression DetectorRegression Detector ResultsRun ID: 8626c1f2-763d-4c10-a8db-89e80ac33835 Performance changes are noted in the perf column of each table:
No significant changes in experiment optimization goalsConfidence level: 90.00% There were no significant changes in experiment optimization goals at this confidence level and effect size tolerance.
|
perf | experiment | goal | Δ mean % | Δ mean % CI |
---|---|---|---|---|
✅ | file_to_blackhole | % cpu utilization | -27.01 | [-32.24, -21.78] |
Fine details of change detection per experiment
perf | experiment | goal | Δ mean % | Δ mean % CI |
---|---|---|---|---|
➖ | uds_dogstatsd_to_api_cpu | % cpu utilization | +0.69 | [-2.19, +3.57] |
➖ | idle | memory utilization | +0.67 | [+0.63, +0.71] |
➖ | basic_py_check | % cpu utilization | +0.64 | [-1.77, +3.05] |
➖ | tcp_dd_logs_filter_exclude | ingress throughput | +0.05 | [+0.01, +0.09] |
➖ | trace_agent_msgpack | ingress throughput | +0.00 | [-0.00, +0.00] |
➖ | trace_agent_json | ingress throughput | -0.00 | [-0.01, +0.01] |
➖ | uds_dogstatsd_to_api | ingress throughput | -0.03 | [-0.24, +0.17] |
➖ | otel_to_otel_logs | ingress throughput | -0.21 | [-0.60, +0.18] |
➖ | file_tree | memory utilization | -0.37 | [-0.46, -0.28] |
➖ | pycheck_1000_100byte_tags | % cpu utilization | -1.01 | [-5.71, +3.69] |
➖ | tcp_syslog_to_blackhole | ingress throughput | -5.28 | [-26.16, +15.59] |
✅ | file_to_blackhole | % cpu utilization | -27.01 | [-32.24, -21.78] |
Explanation
A regression test is an A/B test of target performance in a repeatable rig, where "performance" is measured as "comparison variant minus baseline variant" for an optimization goal (e.g., ingress throughput). Due to intrinsic variability in measuring that goal, we can only estimate its mean value for each experiment; we report uncertainty in that value as a 90.00% confidence interval denoted "Δ mean % CI".
For each experiment, we decide whether a change in performance is a "regression" -- a change worth investigating further -- if all of the following criteria are true:
-
Its estimated |Δ mean %| ≥ 5.00%, indicating the change is big enough to merit a closer look.
-
Its 90.00% confidence interval "Δ mean % CI" does not contain zero, indicating that if our statistical model is accurate, there is at least a 90.00% chance there is a difference in performance between baseline and comparison variants.
-
Its configuration does not mark it "erratic".
comp/core/workloadmeta/collectors/internal/kubemetadata/kubemetadata.go
Outdated
Show resolved
Hide resolved
pkg/collector/corechecks/cluster/kubernetesapiserver/events_common_test.go
Outdated
Show resolved
Hide resolved
pkg/collector/corechecks/cluster/kubernetesapiserver/events_common_test.go
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm, great job
/merge |
🚂 MergeQueue Pull request added to the queue. There are 2 builds ahead! (estimated merge in less than 1h) Use |
/merge |
What does this PR do?
Add support for namespace labels as tags on kubernetes events. Use of the namespace
InformerFactory
is also removed now that namespace information is stored inworkloadmeta
.Motivation
Namespace labels as tags is already supported on metrics; as we continue fleshing out the kubernetes events product, it would be good to add namespace labels as tags to emitted events.
Additional Notes
The code path to get namespace labels when the DCA is disabled was removed in this PR. Upon testing the latest version of the agent, it was found that namespace information was not being stored by the node agent (i.e. the paths in
metadata_controller.go
were not hit). As a result, when the DCA was disabled the agent is unable to fetch namespace labels. When the DCA Is enabled, the logic was changed to fetch namespace information fromworkloadmeta
, thus the informer factory for namespaces was removed altogether.Possible Drawbacks / Trade-offs
Describe how to test/QA your changes
kubernetes_namespace_collection_enabled
totrue
(set tofalse
by default)namespaceLabelsAsTags
e.g.
kubectl label namespace default test=qa
prefixing_test:qa