Skip to content

KUBE-170: Add replica-set multi-cluster Search snippets#1379

Open
anandsyncs wants to merge 1 commit into
anandsyncs-simplify-shared-search-query-snippetsfrom
anandsyncs-kube-170-rs-multicluster-search-snippets
Open

KUBE-170: Add replica-set multi-cluster Search snippets#1379
anandsyncs wants to merge 1 commit into
anandsyncs-simplify-shared-search-query-snippetsfrom
anandsyncs-kube-170-rs-multicluster-search-snippets

Conversation

@anandsyncs

@anandsyncs anandsyncs commented Jul 15, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Add the complete replica-set multi-cluster Search snippet scenario and its kind runner/context.
  • Add reusable multi-cluster kind setup and teardown with the required image and kubectl-mongodb plugin dependencies.
  • Register only the replica-set task in the new multi-cluster snippet task group and private variant.

Customer/internal split

  • Customer-facing: scenario 12 README, environment contract, and public steps for attaching Search to an existing multi-cluster replica set.
  • Internal CI: internal_ source-deployment steps, private E2E overrides, kind runner/context, and Evergreen task wiring.

Validation

  • bash -n and ShellCheck for all changed shell files.
  • Evergreen validate and evaluate; the evaluated variant retains all 11 inherited dependencies and resolves to only the replica-set task.
  • git diff --check, exact pinned-source content/mode comparison, and changed-path allowlist.

Evergreen proof

Full-stack Search snippets patch passed all nine Search snippet tasks: seven single-cluster and two multi-cluster.

Tracking

@anandsyncs
anandsyncs requested a review from a team as a code owner July 15, 2026 14:29
@anandsyncs
anandsyncs requested review from fealebenpae and lsierant and removed request for a team July 15, 2026 14:29
@anandsyncs anandsyncs added the skip-changelog Use this label in Pull Request to not require new changelog entry file label Jul 15, 2026
@anandsyncs
anandsyncs force-pushed the anandsyncs-kube-170-rs-multicluster-search-snippets branch from f9fe967 to fca5325 Compare July 16, 2026 12:06
@anandsyncs
anandsyncs requested a review from Copilot July 17, 2026 08:52

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Adds a new end-to-end, CI-runnable multi-cluster MongoDB Search code-snippet scenario for an Ops Manager–managed replica set (docs/search scenario 12), along with the supporting kind multi-cluster context/runner and Evergreen wiring.

Changes:

  • Introduces scenario 12-search-rs-multi-cluster (public README/env contract + internal CI-only source-deployment steps).
  • Adds a new kind multi-cluster snippets test runner (test_kind_search_rs_multi_cluster_snippets.sh) and a private multi-cluster kind context.
  • Wires a new Evergreen task + task group + private build variant for multi-cluster snippets.

Reviewed changes

Copilot reviewed 29 out of 29 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
scripts/dev/contexts/private_kind_multi_cluster_code_snippets Adds a private kind multi-cluster context for running snippet E2Es.
scripts/code_snippets/tests/test_kind_search_rs_multi_cluster_snippets.sh New multi-phase CI runner for scenario 12 + shared query scenario execution.
docs/search/12-search-rs-multi-cluster/test.sh Scenario 12 snippet orchestration (runs snippets in order).
docs/search/12-search-rs-multi-cluster/README.md Customer-facing instructions + prerequisites for multi-cluster Search on an existing RS.
docs/search/12-search-rs-multi-cluster/env_variables.sh Public environment contract for multi-cluster Search scenario 12.
docs/search/12-search-rs-multi-cluster/env_variables_internal.sh CI-only variables for provisioning a simulated external multi-cluster RS.
docs/search/12-search-rs-multi-cluster/env_variables_e2e_private.sh Private E2E overrides for multi-cluster kind + Ops Manager integration.
docs/search/12-search-rs-multi-cluster/code_snippets/12_0040_validate_env.sh Validates required env vars and kube contexts for scenario 12.
docs/search/12-search-rs-multi-cluster/code_snippets/12_0045_create_namespaces.sh Creates/labels namespaces in both clusters.
docs/search/12-search-rs-multi-cluster/code_snippets/12_0046_internal_create_image_pull_secrets.sh CI-only image pull secret creation in both clusters.
docs/search/12-search-rs-multi-cluster/code_snippets/12_0100_install_operator.sh Multi-cluster kubectl-mongodb setup + operator install in multi-cluster mode.
docs/search/12-search-rs-multi-cluster/code_snippets/12_0300_internal_create_ops_manager_resources.sh CI-only Ops Manager Secret/ConfigMap wiring.
docs/search/12-search-rs-multi-cluster/code_snippets/12_0301_install_cert_manager.sh Installs cert-manager on the central cluster.
docs/search/12-search-rs-multi-cluster/code_snippets/12_0302_internal_configure_tls_prerequisites.sh CI-only TLS issuer/CA bootstrap for testing.
docs/search/12-search-rs-multi-cluster/code_snippets/12_0302a_internal_configure_tls_prerequisites_mongod.sh CI-only CA ConfigMap creation in both clusters for mongod trust.
docs/search/12-search-rs-multi-cluster/code_snippets/12_0304_internal_generate_tls_certificates.sh CI-only RS TLS certificate generation.
docs/search/12-search-rs-multi-cluster/code_snippets/12_0310_internal_create_mongodb_mc_rs.sh CI-only simulated external RS creation via MongoDBMultiCluster.
docs/search/12-search-rs-multi-cluster/code_snippets/12_0315_internal_wait_for_rs.sh Waits for the simulated multi-cluster RS to be Running.
docs/search/12-search-rs-multi-cluster/code_snippets/12_0315a_internal_create_mongodb_users.sh CI-only user Secrets + MongoDBUser CRs for test flows.
docs/search/12-search-rs-multi-cluster/code_snippets/12_0316_create_search_sync_secret.sh Creates Search sync password Secret on central cluster.
docs/search/12-search-rs-multi-cluster/code_snippets/12_0316a_create_mongot_tls_certificates.sh Requests mongot TLS cert via cert-manager (central cluster).
docs/search/12-search-rs-multi-cluster/code_snippets/12_0316b_create_lb_tls_certificates.sh Requests managed Envoy LB server/client certs for both clusters (central cluster).
docs/search/12-search-rs-multi-cluster/code_snippets/12_0317_replicate_search_secrets.sh Replicates required Secrets from central to member cluster(s).
docs/search/12-search-rs-multi-cluster/code_snippets/12_0320_create_mongodb_search_resource.sh Creates the MongoDBSearch resource targeting the external RS + per-cluster managed LB.
docs/search/12-search-rs-multi-cluster/code_snippets/12_0325_wait_for_search_resource.sh Waits for MongoDBSearch readiness and prints mongot pods per cluster.
docs/search/12-search-rs-multi-cluster/code_snippets/12_0326_internal_verify_envoy_deployment.sh CI-only verification of per-cluster managed Envoy resources.
docs/search/12-search-rs-multi-cluster/code_snippets/12_0330_show_running_pods.sh Displays pods/services across clusters + MongoDBSearch resources.
docs/search/12-search-rs-multi-cluster/code_snippets/12_9010_internal_delete_namespace.sh CI-only cleanup helper to delete namespaces in all clusters.
.evergreen-snippets.yml Adds multi-cluster kind setup group, task, task group, and private build variant.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread docs/search/12-search-rs-multi-cluster/env_variables_e2e_private.sh
Add the replica-set multi-cluster Search scenario, its kind runner and context, and RS-only Evergreen task wiring.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@anandsyncs
anandsyncs force-pushed the anandsyncs-kube-170-rs-multicluster-search-snippets branch from fca5325 to 2c1ec16 Compare July 17, 2026 09:12
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.

3 participants