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

Fixes issues related to TLS #37675

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

sonalgaud12
Copy link

Description

Fixes the issue where TLS settings were not being applied correctly for Unix socket connections to a containerd daemon. The HTTP connection layer was assuming the connection was over HTTP, causing malformed responses. This change correctly applies the TLS configuration and ensures secure connections.

Link to tracking issue

Fixes #33557

@sonalgaud12 sonalgaud12 requested a review from a team as a code owner February 4, 2025 14:13
@github-actions github-actions bot requested a review from jamesmoessis February 4, 2025 14:14
@sonalgaud12 sonalgaud12 changed the title Fixes two issues related to TLS Fixes issues related to TLS Feb 4, 2025
Copy link
Member

@crobert-1 crobert-1 left a comment

Choose a reason for hiding this comment

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

We should add some testing with this change to ensure it's working as expected 👍

receiver/dockerstatsreceiver/config.go Outdated Show resolved Hide resolved
TLS struct {
Enabled bool `mapstructure:"enabled"`
CAFile string `mapstructure:"ca_file"`
CertFile string `mapstructure:"cert_file"`
Copy link
Contributor

@jamesmoessis jamesmoessis Feb 4, 2025

Choose a reason for hiding this comment

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

Any new config fields should be covered by tests in config_test.go which uses config under testdata directory.

Ideally, there's also a new test in receiver_test.go that ensures TLS works

@sonalgaud12 sonalgaud12 reopened this Feb 7, 2025
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.

[receiver/dockerstatsreceiver] Does not support setting TLS settings
3 participants