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

Add annotation to exclude containers from injection. #2587

Merged
merged 15 commits into from
Jan 29, 2024

Conversation

StefanHauth
Copy link
Collaborator

Description

Allow to exclude containers from injection based on their names with annotations on Dynakube or pod level.

How can this be tested?

Deploy a Dynakube and an application.
Add annotation container.inject.dynatrace.com/<containername> = false to exclude app containers from injection.
Check that code modules are not injected into containers.

Checklist

  • Unit tests have been updated/added
  • PR is labeled accordingly with a single label
  • I have read and understood the contribution guidelines

@StefanHauth StefanHauth requested a review from a team as a code owner January 17, 2024 14:33
@codecov-commenter
Copy link

codecov-commenter commented Jan 17, 2024

Codecov Report

Attention: 15 lines in your changes are missing coverage. Please review.

Comparison is base (b9a31b3) 65.18% compared to head (6fda155) 65.17%.

Files Patch % Lines
...tion/pod_mutator/dataingest_mutation/containers.go 53.84% 4 Missing and 2 partials ⚠️
pkg/webhook/mutation/pod_mutator/pod_mutator.go 63.63% 3 Missing and 1 partial ⚠️
...tation/pod_mutator/oneagent_mutation/containers.go 84.21% 2 Missing and 1 partial ⚠️
pkg/webhook/util/container.go 80.00% 2 Missing ⚠️

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2587      +/-   ##
==========================================
- Coverage   65.18%   65.17%   -0.02%     
==========================================
  Files         251      252       +1     
  Lines       16470    16508      +38     
==========================================
+ Hits        10736    10759      +23     
- Misses       4904     4915      +11     
- Partials      830      834       +4     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

@waodim waodim left a comment

Choose a reason for hiding this comment

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

See comment below

pkg/webhook/config.go Show resolved Hide resolved
pkg/webhook/util/container.go Outdated Show resolved Hide resolved
@StefanHauth StefanHauth merged commit cba1d6d into main Jan 29, 2024
17 checks passed
@StefanHauth StefanHauth deleted the feature/container-level-injection-rules branch January 29, 2024 07:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants