-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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 ContainerHostType on all message payloads to identify host type #5270
Conversation
Gopkg.toml
Outdated
@@ -1,6 +1,6 @@ | |||
[[constraint]] | |||
name = "github.com/DataDog/agent-payload" | |||
version = "=4.29.0" | |||
revision = "c192317fe7c4d65a0a0aafd768c134120637e512" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I will change this to version once the agent-payload PR is merge and versioned.
Gopkg.toml
Outdated
@@ -1,6 +1,6 @@ | |||
[[constraint]] | |||
name = "github.com/DataDog/agent-payload" | |||
version = "=4.29.0" | |||
revision = "79d10f8bc542e3981ee156abe761e0d1398d5ae7" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll change this to version once the payload PR is merged and tagged.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do pod payloads need this too?
Its too bad that we need to add it to all of the. different message types. instead of there being a central place for it.
@kevinconaway I asked and they don't need that, in those environments there's no resource that they are collecting. |
@@ -351,6 +357,17 @@ func NewSystemProbeConfig(loggerName config.LoggerName, yamlPath string) (*Agent | |||
return cfg, nil | |||
} | |||
|
|||
// getContainerHostType uses the fargate library to detect container environment and returns the protobuf version of it | |||
func getContainerHostType() model.ContainerHostType { | |||
switch fargate.GetOrchestrator() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
What does this PR do?
We need to use additional flag to indicate the host type for container collection. This will help the backend pipeline to resolve host in different situations, especially when containers are running in "hostless" environment like fargate in ECS and EKS.
DataDog/agent-payload#49
Motivation
@DataDog/processes
Additional Notes
Anything else we should know when reviewing?