Repository navigation
include InitContainers in Kubernetes Service Discovery - #5598
Conversation
Includes InitContainers in the ServiceDiscovery Signed-off-by: sh0rez <[email protected]>
|
Is there a metadata label or something to distinguish these? |
|
At least we should have a metadata label differentiating regular containers from init containers. |
Adds a label that shows whether the container is an init container or not Signed-off-by: sh0rez <[email protected]>
Adds the new container_is_init label to the current tests to make them pass again Signed-off-by: sh0rez <[email protected]>
I've added a new metadata label Tests have been adapted. |
|
Can you add a test that where the label is |
Adds a test to check whether an InitContainer is included in the discovery Signed-off-by: sh0rez <[email protected]>
Signed-off-by: sh0rez <[email protected]>
Addressed these |
Signed-off-by: sh0rez <[email protected]>
Removes 'is' keyword to comply style guide Signed-off-by: sh0rez <[email protected]>
|
@brian-brazil can this one be merged, please? Or are there any blockers I am not aware of? We need this over at grafana/loki as InitContainers are critical for logs. |
|
While in this instance it makes sense for prometheus to have this, I'm not sure this will always hold true for things that external projects need. I don't think that's generally a justification. |
Of course not! But as this one makes sense for Prometheus and has been approved, I wondered whether it can be merged, to benefit both projects. I just wanted to mention Loki because it was the original motivation for this change :) |
|
lgtm 👍 |
@brian-brazil This PR adds support for InitContainers in Kubernetes SD. Closes #5563
Signed-off-by: sh0rez [email protected]