Skip to content

Add cert watcher for target allocator TLS config #290

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

Merged
merged 14 commits into from
Jun 13, 2025
Merged

Conversation

musa-asad
Copy link

@musa-asad musa-asad commented Mar 17, 2025

Description of the issue

The Target Allocator manager from the Prometheus receiver doesn't have a mechanism to reload the HTTP client when one of the TLS certificates (CAFile, CertFile, or KeyFile) change due to a refresh. This causes an error when the Target Allocator refreshes its credentials and the OTel Collector doesn't restart since it has a static HTTP client with old credentials.

Description of changes

  • Move httpClient initialization to setHTTPClient() function so that it can be called repeatedly.
  • Implement the setupTLSWatchers() function to call the setHTTPClient() function every time there is a change in one of the credentials.

License

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

Tests

Before

Target Allocator

Note: This occurs even after repetitively restarting the pod.

Screenshot 2025-03-18 at 2 51 22 AM

OTel Collector

Screenshot 2025-03-18 at 2 51 56 AM

After

Target Allocator

Note: This occurs even after repetitively restarting the pod.

Screenshot 2025-03-18 at 2 57 16 AM

OTel Collector

Screenshot 2025-03-18 at 2 57 00 AM

@musa-asad musa-asad marked this pull request as ready for review March 18, 2025 06:58
Copy link

github-actions bot commented May 5, 2025

This PR was marked stale due to lack of activity. It will be closed in 14 days.

@github-actions github-actions bot added the Stale label May 5, 2025
Copy link

Closed as inactive. Feel free to reopen if this PR is still being worked on.

@github-actions github-actions bot closed this May 20, 2025
@musa-asad musa-asad reopened this May 20, 2025
@github-actions github-actions bot removed the Stale label May 21, 2025
Copy link

github-actions bot commented Jun 7, 2025

This PR was marked stale due to lack of activity. It will be closed in 14 days.

@github-actions github-actions bot added the Stale label Jun 7, 2025
sky333999
sky333999 previously approved these changes Jun 13, 2025
@github-actions github-actions bot removed the Stale label Jun 13, 2025
TravisStark
TravisStark previously approved these changes Jun 13, 2025
@musa-asad musa-asad dismissed stale reviews from TravisStark and sky333999 via 244eed8 June 13, 2025 16:31
@musa-asad musa-asad merged commit 3ab9974 into aws-cwa-dev Jun 13, 2025
150 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants