-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
[receiver/k8scluster] add support for observing resources for a specific namespace #35727
base: main
Are you sure you want to change the base?
[receiver/k8scluster] add support for observing resources for a specific namespace #35727
Conversation
Signed-off-by: Florian Bacher <florian.bacher@dynatrace.com>
Signed-off-by: Florian Bacher <florian.bacher@dynatrace.com>
Signed-off-by: Florian Bacher <florian.bacher@dynatrace.com>
Signed-off-by: Florian Bacher <florian.bacher@dynatrace.com>
Signed-off-by: Florian Bacher <florian.bacher@dynatrace.com>
Signed-off-by: Florian Bacher <florian.bacher@dynatrace.com>
Signed-off-by: Florian Bacher <florian.bacher@dynatrace.com>
Signed-off-by: Florian Bacher <florian.bacher@dynatrace.com>
…b.com/bacherfl/opentelemetry-collector-contrib into feat/9401/namespaced-cluster-receiver
Signed-off-by: Florian Bacher <florian.bacher@dynatrace.com>
Signed-off-by: Florian Bacher <florian.bacher@dynatrace.com>
…s been specified Signed-off-by: Florian Bacher <florian.bacher@dynatrace.com>
Signed-off-by: Florian Bacher <florian.bacher@dynatrace.com>
Signed-off-by: Florian Bacher <florian.bacher@dynatrace.com>
Signed-off-by: Florian Bacher <florian.bacher@dynatrace.com>
…ble resources instead Signed-off-by: Florian Bacher <florian.bacher@dynatrace.com>
yes i think part of the flakiness might be due to the addition of the cronjob object which causes multiple pods to spin up during the duration of the test, leading to a varying number of metrics received in the sink |
Signed-off-by: Florian Bacher <florian.bacher@dynatrace.com>
Signed-off-by: Florian Bacher <florian.bacher@dynatrace.com>
Signed-off-by: Florian Bacher <florian.bacher@dynatrace.com>
Sounds plausible, we should restrict the number of active jobs/pods to 1 to avoid having scheduling/timing related flakiness: https://github.com/open-telemetry/opentelemetry-collector-contrib/pull/36114/files#diff-c08d5cc648ae8a9f364187a6dbf9a8b1e01070249b7a8669537009ccc56e701fR147. I will try to send a PR for this. |
Signed-off-by: Florian Bacher <florian.bacher@dynatrace.com>
Signed-off-by: Florian Bacher <florian.bacher@dynatrace.com>
Signed-off-by: Florian Bacher <florian.bacher@dynatrace.com>
Signed-off-by: Florian Bacher <florian.bacher@dynatrace.com>
Signed-off-by: Florian Bacher <florian.bacher@dynatrace.com>
Signed-off-by: Florian Bacher <florian.bacher@dynatrace.com>
Signed-off-by: Florian Bacher <florian.bacher@dynatrace.com>
Signed-off-by: Florian Bacher <florian.bacher@dynatrace.com>
Signed-off-by: Florian Bacher <florian.bacher@dynatrace.com>
Signed-off-by: Florian Bacher <florian.bacher@dynatrace.com>
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.
Let's wait for #36235 to get merged and re-base this one. Meanwhile I'm a bit worried about the changes to the existing tests.
agree, i did some changes in the meantime and got the tests working on this PR, but some changes may have been unneccessary - I will try out everything after rebasing and keep the changes as minimal as possible |
…to 1 (#36235) <!--Ex. Fixing a bug - Describe the bug and how this fixes the issue. Ex. Adding a feature - Explain what this achieves.--> #### Description Fixes what was described at #35727 (comment). After #36114 the `k8scluster` receiver's e2e tests started showing some flakiness ([example](https://github.com/open-telemetry/opentelemetry-collector-contrib/actions/runs/11701936581/job/32589392145)). With this change we ensure that only 1 active job/pod of the cronjob will be present for the whole lifetime of the test to avoid hitting timing/scheduling related flakiness. @bacherfl could you also take a look here? <!-- Issue number (e.g. #1234) or full URL to issue, if applicable. --> #### Link to tracking issue Fixes <!--Describe what testing was performed and which tests were added.--> #### Testing <!--Describe the documentation added.--> #### Documentation <!--Please delete paragraphs that you did not use before submitting.--> Signed-off-by: ChrsMark <chrismarkou92@gmail.com>
…to 1 (open-telemetry#36235) <!--Ex. Fixing a bug - Describe the bug and how this fixes the issue. Ex. Adding a feature - Explain what this achieves.--> #### Description Fixes what was described at open-telemetry#35727 (comment). After open-telemetry#36114 the `k8scluster` receiver's e2e tests started showing some flakiness ([example](https://github.com/open-telemetry/opentelemetry-collector-contrib/actions/runs/11701936581/job/32589392145)). With this change we ensure that only 1 active job/pod of the cronjob will be present for the whole lifetime of the test to avoid hitting timing/scheduling related flakiness. @bacherfl could you also take a look here? <!-- Issue number (e.g. open-telemetry#1234) or full URL to issue, if applicable. --> #### Link to tracking issue Fixes <!--Describe what testing was performed and which tests were added.--> #### Testing <!--Describe the documentation added.--> #### Documentation <!--Please delete paragraphs that you did not use before submitting.--> Signed-off-by: ChrsMark <chrismarkou92@gmail.com>
# Conflicts: # receiver/k8sclusterreceiver/testdata/e2e/cluster-scoped/expected.yaml
Signed-off-by: Florian Bacher <florian.bacher@dynatrace.com>
Signed-off-by: Florian Bacher <florian.bacher@dynatrace.com>
Alright this should now be ready again - @ChrsMark I reverted the changes I made earlier in the |
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. Left a nit comment. Thank's @bacherfl!
(it will need a make generate
to make the CI happy)
Signed-off-by: Florian Bacher <florian.bacher@dynatrace.com>
Description
This PR extends the k8scluster receiver with an option to limit the observed resources to a specific namespace.
Link to tracking issue
Fixes #9401
Testing
added unit and e2e tests
Documentation
Added section about how to make use of Roles and RoleBindings instead of ClusterRoles and ClusterRoleBindings