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

Fix container-name and container-image env var counter if container is excluded via annotation #3007

Merged
merged 2 commits into from
Apr 16, 2024

Conversation

luhi-DT
Copy link
Collaborator

@luhi-DT luhi-DT commented Apr 15, 2024

Description

Issue

Currently the initContainer of an injected Pod fails, if there is a second container in the list of containers, which is excluded and in-front of the monitored container, in the list of containers.

How can this be tested?

Deploy Operator -> cloudNativeFullStack -> create a sample pod with 2 containers -> exclude the first container in the list of containers from monitoring via annotation on Dynakube container.inject.dynatrace.com/<container name to exclude>: "false" (important, it has to be the first one)

@luhi-DT luhi-DT added the bug Something isn't working label Apr 15, 2024
@luhi-DT luhi-DT requested a review from a team as a code owner April 15, 2024 14:00
@luhi-DT luhi-DT requested review from gkrenn, 0sewa0, chrismuellner, albertogdd, waodim, StefanHauth and aorcholski and removed request for a team April 15, 2024 14:00
@codecov-commenter
Copy link

codecov-commenter commented Apr 16, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 67.00%. Comparing base (f8de327) to head (290b286).

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

Additional details and impacted files
@@             Coverage Diff              @@
##           release-1.1    #3007   +/-   ##
============================================
  Coverage        67.00%   67.00%           
============================================
  Files              265      265           
  Lines            14445    14445           
============================================
  Hits              9679     9679           
  Misses            3924     3924           
  Partials           842      842           

☔ 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.

tested it and it works 👍

@luhi-DT luhi-DT merged commit 7d0ce39 into release-1.1 Apr 16, 2024
15 checks passed
@luhi-DT luhi-DT deleted the fix/container-injection-annotation branch April 16, 2024 08:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants