Skip to content

Search Sharded+LoadBalancing: Code snippets for sharded mongo (internal+external)#809

Draft
lsierant wants to merge 37 commits intosearch/basefrom
search/snippets
Draft

Search Sharded+LoadBalancing: Code snippets for sharded mongo (internal+external)#809
lsierant wants to merge 37 commits intosearch/basefrom
search/snippets

Conversation

@lsierant
Copy link
Copy Markdown
Contributor

@lsierant lsierant commented Feb 18, 2026

Based on PR #817

Chain of upstream PRs as of 2026-03-13

[skip-ci]

Summary

Proof of Work

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?

Copy link
Copy Markdown
Contributor Author

lsierant commented Feb 18, 2026

Warning

This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
Learn more

This stack of pull requests is managed by Graphite. Learn more about stacking.

@lsierant lsierant mentioned this pull request Feb 18, 2026
3 tasks
@lsierant lsierant changed the base branch from search/e2e to graphite-base/809 February 18, 2026 15:55
@lsierant lsierant changed the base branch from graphite-base/809 to search/operator-changes February 18, 2026 15:55
@viveksinghggits viveksinghggits changed the title Search: snippets Multiple Mongot Instances: Code snippets for sharded mongo (internal+external) Feb 18, 2026
@lsierant lsierant changed the title Multiple Mongot Instances: Code snippets for sharded mongo (internal+external) Search: Sharded+LoadBalancing: Code snippets for sharded mongo (internal+external) Feb 19, 2026
@lsierant lsierant changed the title Search: Sharded+LoadBalancing: Code snippets for sharded mongo (internal+external) Search Sharded+LoadBalancing: Code snippets for sharded mongo (internal+external) Feb 19, 2026
@lsierant lsierant changed the base branch from search/operator-changes to graphite-base/809 February 20, 2026 11:06
@lsierant lsierant changed the base branch from graphite-base/809 to search/multiple-mongot February 20, 2026 12:59
@lsierant lsierant force-pushed the search/multiple-mongot branch from 4ae9bfc to 2cedafd Compare February 20, 2026 14:15
@lsierant lsierant force-pushed the search/multiple-mongot branch from 2cedafd to f89d675 Compare February 21, 2026 09:02
@lsierant lsierant force-pushed the search/multiple-mongot branch 2 times, most recently from f599344 to b823e40 Compare February 23, 2026 20:47
@lsierant lsierant force-pushed the search/snippets branch 2 times, most recently from 2f23181 to f1d9e3c Compare February 26, 2026 12:23
@lsierant lsierant force-pushed the search/multiple-mongot branch from 77d6c13 to b292b51 Compare February 26, 2026 12:23
lsierant and others added 21 commits March 16, 2026 20:24
- Fix try_load() by removing the FIXME early-return that was causing
  get_ops_manager() to return unloaded resources (empty status), resulting
  in empty baseUrl in OpsManager connection ConfigMaps on om80 variant
- Fix endpoint template in search-sharded-external-lb.yaml
- Fix username mismatch in enterprise_tls sample_movies_helper
- Fix CRD field name sharded→shardedCluster in sharded_enterprise_external_mongod
- Fix CA configmap and mongodbResourceRef overrides in sharded_enterprise_managed_lb
- Fix username mismatches in sharded_external_mongod_single_mongot
<!-- start git-machete generated -->

# Based on PR #817

## Chain of upstream PRs as of 2026-03-03

* PR #806:
  `master` ← `search/base`

  * PR #816:
    `search/base` ← `search/sharded-cluster`

    * PR #817:
      `search/sharded-cluster` ← `search/multiple-mongot`

      * **PR #853 (THIS ONE)**:
`search/multiple-mongot` ← `search/lsierant/revert-rs-cluster-index`

<!-- end git-machete generated -->
…ss tests (#863)

# Summary

<!-- Enter your PR summary here. Try to emphasize on WHY this change is
needed, followed by what's being done in the PR. -->

## Proof of Work

<!-- Enter your proof that it works here.-->

## 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?
    - use `skip-changelog` label if not needed
- refer to [Changelog files and Release
Notes](https://github.com/mongodb/mongodb-kubernetes/blob/master/CONTRIBUTING.md#changelog-files-and-release-notes)
section in CONTRIBUTING.md for more details
# Summary

Improve managed Envoy proxy: replace custom config types with go-control-plane, support external mongod sources, and add CRD configurability

Replace hand-rolled Envoy config structs with the official envoyproxy/go-control-plane protobuf types for type-safe JSON config generation

Refactor the Envoy controller to share database source resolution with the main search controller via getSearchSource, enabling managed LB support for external mongod sharded sources. Add CRD fields for Envoy image and resource requirements overrides, proper security contexts, and a new e2e test for sharded enterprise with external mongod managed LB.
# Summary

### Why

The managed LB was previously only wired for sharded clusters. RS
deployments with multiple mongot replicas need the same L7 load
balancing, a single mongod opens one long-lived TCP connection. This PR
implements that.

### Changes

Necessary changes to the envoy controller. It is fully topology agnostic
(no different code paths for RS/Sharded topologies), except at a single
point.
Two new e2e tests for RS Managed LB, external and internal db.

I also moved all the building logic + tests in a separate file.

Note: the controller needs full reconcile loop unit tests, that will
come in follow ups PRs.

## Proof of Work

Two new E2E tests pass

## Checklist

- [x] Have you linked a jira ticket and/or is the ticket in the title?
- [x] Have you checked whether your jira ticket required DOCSP changes?
@lsierant lsierant force-pushed the search/multiple-mongot branch from 8df1594 to 2c11635 Compare March 16, 2026 19:25
# Summary 

Introduce Astral's [ty](https://docs.astral.sh/ty/) static type checker
to avoid simple syntactic/type errors in e2e tests.

ty check is applied only to search files for now and is part of
precommit.

<!-- start git-machete generated -->

# Based on PR #817

## Chain of upstream PRs as of 2026-03-16

* PR #806:
  `master` ← `search/base`

  * PR #817:
    `search/base` ← `search/multiple-mongot`

    * **PR #896 (THIS ONE)**:
      `search/multiple-mongot` ← `search/lsierant/mypy`

<!-- end git-machete generated -->
@lsierant lsierant force-pushed the search/multiple-mongot branch 2 times, most recently from e21bef7 to 7008937 Compare March 26, 2026 07:49
Base automatically changed from search/multiple-mongot to search/base March 27, 2026 16:09
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.

3 participants