Skip to content

Conversation

@anandsyncs
Copy link
Contributor

@anandsyncs anandsyncs commented Sep 11, 2025

Summary

This pull request refactors the TLS configuration for MongoDB Search resources by removing the enabled boolean flag and relying solely on the presence or absence of TLS configuration objects to determine if TLS should be enabled. It also updates the CRD schemas, controller logic, tests, and documentation to reflect this change, and clarifies the usage of CA certificates for external mongod sources.

API and CRD schema changes:

  • Removed the enabled boolean from both spec.security.tls and spec.source.external.tls, making TLS activation dependent on whether the TLS configuration is provided. Updated required fields and descriptions for CA certificates in the CRDs (config/crd/bases/mongodb.com_mongodbsearch.yaml, helm_chart/crds/mongodb.com_mongodbsearch.yaml, public/crds.yaml). [1] [2] [3] [4] [5] [6]
  • Updated the Go API types to remove the Enabled field from ExternalMongodTLS and TLS, clarified CA certificate documentation, and made Security.TLS an optional pointer. (api/v1/search/mongodbsearch_types.go)

Controller logic updates:

  • Refactored controller code to check for the presence of TLS configuration objects instead of the Enabled flag when determining TLS behavior in reconciliation and config generation. (controllers/operator/mongodbsearch_controller.go, controllers/searchcontroller/external_search_source.go, controllers/searchcontroller/mongodbsearch_reconcile_helper.go) [1] [2] [3] [4]

Test and documentation updates:

  • Updated tests and documentation to remove references to the enabled field in TLS configurations and to use the new structure. (docker/mongodb-kubernetes-tests/tests/search/search_community_external_mongod_basic.py, docker/mongodb-kubernetes-tests/tests/search/search_community_external_mongod_tls.py, docker/mongodb-kubernetes-tests/tests/search/search_enterprise_tls.py, docs/search/04-search-external-mongod/README.md, docs/search/04-search-external-mongod/code_snippets/04_0320_create_mongodb_search_resource.sh) [1] [2] [3] [4] [5]

Evergreen build changes:

  • Added a new Evergreen task and included it in the relevant task group to test external mongod search code snippets. (.evergreen-snippets.yml) [1] [2]

Proof of Work

Tests pass

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?

@anandsyncs anandsyncs changed the base branch from master to search/public-preview-operator September 11, 2025 12:19
@github-actions
Copy link

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

MCK 1.3.1 Release Notes

Base automatically changed from search/public-preview-operator to master September 12, 2025 10:35
@anandsyncs anandsyncs added the skip-changelog Use this label in Pull Request to not require new changelog entry file label Sep 12, 2025
@anandsyncs anandsyncs marked this pull request as ready for review September 12, 2025 17:56
@anandsyncs anandsyncs requested a review from a team as a code owner September 12, 2025 17:56
@anandsyncs anandsyncs enabled auto-merge (squash) September 12, 2025 19:22
@anandsyncs anandsyncs merged commit 330c11e into master Sep 15, 2025
35 of 37 checks passed
@anandsyncs anandsyncs deleted the anandsyncs/remove-external-tls branch September 15, 2025 08:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

skip-changelog Use this label in Pull Request to not require new changelog entry file

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants