Cherry-pick #18979 to 7.x: Fix metrics hints builder to avoid wrong container metadata usage when port is not exposed#19233
Conversation
…n port is not exposed (elastic#18979) (cherry picked from commit 2f7b501)
|
Pinging @elastic/integrations-platforms (Team:Platforms) |
💔 Tests FailedExpand to view the summary
Build stats
Test stats 🧪
Test errorsExpand to view the tests failures
--------------------- >> end captured stdout << ---------------------- Steps errorsExpand to view the steps failures
Log outputExpand to view the last 100 lines of log output
|
|
jenkins, run the tests please |
Cherry-pick of PR #18979 to 7.x branch. Original message:
Type of PR
What does this PR do?
I have enhanced the emitEvent to generate a pod level event with no port. The hints builder checks to see if there is a port or not. If not then it uses the pod level metadata to monitor
data.host:<port>annotations. This ensures that we dont use the wrong container metadata to start up a metricbeat module or do it multiple times as well.Why is it important?
The way that things exist today is that when ports arent exposed, the container meta is non-deterministic
Checklist
CHANGELOG.next.asciidocorCHANGELOG-developer.next.asciidoc.Author's Checklist
How to test this PR locally
Related issues
Use cases
Screenshots
Logs
Fixes: #12011
Co-Authored-By: Vijay Samuel vjsamuel@ebay.com