Skip to content

Conversation

@nammn
Copy link
Collaborator

@nammn nammn commented Dec 16, 2025

Summary

This pull request improves the handling of TLS parameters in monitoring configuration, ensuring that TLS-related settings are properly cleared when TLS is disabled. It also adds a dedicated test to verify this behavior.

TLS Parameter Handling Improvements:

  • In deployment.go, when TLS is disabled, the "additionalParams" key is now removed from the monitoring configuration to prevent monitoring agents from referencing non-existent certificate files.
  • In appdbreplicaset_controller.go, the code explicitly clears the AdditionalParams field for each monitoring version when TLS is disabled, further ensuring that leftover TLS settings are not retained.

Testing Enhancements:

  • A new test, TestAddMonitoringTLSDisable, was added to deployment_test.go to verify that enabling and then disabling TLS correctly adds and then removes TLS parameters from the monitoring configuration.

Proof of Work

  • green patch

Checklist

  • Have you linked a jira ticket and/or is the ticket in the title?
  • Have you checked whether your jira ticket required DOCSP changes?
  • Have you added changelog file?

@github-actions
Copy link

⚠️ (this preview might not be accurate if the PR is not rebased on current master branch)

MCK 1.6.2 Release Notes

Bug Fixes

  • Fixed an issue where monitoring agents would fail after disabling TLS on a MongoDB deployment.

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.

2 participants