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

add ContainerHostType on all message payloads to identify host type #5270

Merged
merged 10 commits into from
Apr 8, 2020

Conversation

shang-wang
Copy link
Contributor

@shang-wang shang-wang commented Apr 3, 2020

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?

@shang-wang shang-wang requested a review from a team as a code owner April 3, 2020 22:42
Gopkg.toml Outdated
@@ -1,6 +1,6 @@
[[constraint]]
name = "github.com/DataDog/agent-payload"
version = "=4.29.0"
revision = "c192317fe7c4d65a0a0aafd768c134120637e512"
Copy link
Contributor Author

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.

@KSerrania KSerrania modified the milestones: 7.19.0, 7.20.0 Apr 6, 2020
Gopkg.toml Outdated
@@ -1,6 +1,6 @@
[[constraint]]
name = "github.com/DataDog/agent-payload"
version = "=4.29.0"
revision = "79d10f8bc542e3981ee156abe761e0d1398d5ae7"
Copy link
Contributor Author

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.

@shang-wang shang-wang changed the title add ContainerHostType on CollectorContainers to identify host type add ContainerHostType on all message payloads to identify host type Apr 6, 2020
Copy link
Contributor

@kevinconaway kevinconaway left a 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.

@shang-wang
Copy link
Contributor Author

@kevinconaway I asked and they don't need that, in those environments there's no resource that they are collecting.

@shang-wang shang-wang modified the milestones: 7.20.0, 7.19.0 Apr 8, 2020
@@ -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() {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@shang-wang shang-wang merged commit b3730c8 into master Apr 8, 2020
@shang-wang shang-wang deleted the shang/container-host-type branch April 8, 2020 14:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants