Skip to content

Commit

Permalink
fix: fix container names annotations for sdk, apache, nginx (#3307)
Browse files Browse the repository at this point in the history
* fix: fix container names for sdk, apache, nginx

Found through code inspection, the ApacheHttpd, Nginx and SDK
injectors do not honor their container-names annotations.

This is a breaking change if anyone is using the enablement flag with
container names for these 3 injectors, which I believe would work as
truthy would treat a list of container names as true.

Signed-off-by: Alan Clucas <[email protected]>

* chore: add changelog entry

Signed-off-by: Alan Clucas <[email protected]>

---------

Signed-off-by: Alan Clucas <[email protected]>
  • Loading branch information
Joibel authored Sep 30, 2024
1 parent e82f595 commit 8af4383
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 3 deletions.
16 changes: 16 additions & 0 deletions .chloggen/container-names.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix'
change_type: bug_fix

# The name of the component, or a single word describing the area of concern, (e.g. collector, target allocator, auto-instrumentation, opamp, github action)
component: auto-instrumentation

# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`).
note: Fix ApacheHttpd, Nginx and SDK injectors to honour their container-names annotations.

# One or more tracking issues related to the change
issues: [3313]

# (Optional) One or more lines of additional information to render under the primary note.
# These lines will be padded with 2 spaces and then inserted directly into the document.
# Use pipe (|) for multiline entries.
subtext: This is a breaking change if anyone is accidentally using the enablement flag with container names for these 3 injectors.
6 changes: 3 additions & 3 deletions pkg/instrumentation/podmutator.go
Original file line number Diff line number Diff line change
Expand Up @@ -232,15 +232,15 @@ func (langInsts *languageInstrumentations) setLanguageSpecificContainers(ns meta
},
{
iwc: &langInsts.ApacheHttpd,
annotation: annotationInjectApacheHttpd,
annotation: annotationInjectApacheHttpdContainersName,
},
{
iwc: &langInsts.Nginx,
annotation: annotationInjectNginx,
annotation: annotationInjectNginxContainersName,
},
{
iwc: &langInsts.Sdk,
annotation: annotationInjectSdk,
annotation: annotationInjectSdkContainersName,
},
}

Expand Down

0 comments on commit 8af4383

Please sign in to comment.