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

Fix container collect all assignment #811

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion components/datadog/agent/kubernetes_helm.go
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ func NewHelmInstallation(e config.CommonEnvironment, args HelmInstallationArgs,
linuxInstallName += "-linux"
}

values := buildLinuxHelmValues(installName, agentImagePath, agentImageTag, clusterAgentImagePath, clusterAgentImageTag, randomClusterAgentToken.Result, !args.DisableLogsContainerCollectAll)
values := buildLinuxHelmValues(installName, agentImagePath, agentImageTag, clusterAgentImagePath, clusterAgentImageTag, randomClusterAgentToken.Result, args.DisableLogsContainerCollectAll)
Copy link
Contributor

Choose a reason for hiding this comment

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

Are you sure this is what we want? The buildLinuxHelmValues has a parameter named logsContainerCollectAll that will enable collection of all container logs when enabled. If you change that when DisableLogsContainer is true we will enable logs collection.

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 thought so too, but after experimenting with the initial configuration, I found that the previous method set container_collect_all to true in the agent when WithoutLogsContainerCollectAll was applied, whereas with this configuration container_collect_all is correctly set to off.

Copy link
Contributor

Choose a reason for hiding this comment

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

I think it was because I missed this: #814
The disableContainerCollectAll was never passed so no matter if you used WithoutLogsContainerCollectAll the default value was passed to buildLinuxHelmValues (ie !false) and I think that's why it was always enabled

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ohh okay gotcha, thanks for the clarification.

values.configureImagePullSecret(imgPullSecret)
values.configureFakeintake(e, args.Fakeintake)

Expand Down