Skip to content

wip - migration feature branch #800

Draft
nammn wants to merge 10 commits intomasterfrom
vm-migration-feature-branch
Draft

wip - migration feature branch #800
nammn wants to merge 10 commits intomasterfrom
vm-migration-feature-branch

Conversation

@nammn
Copy link
Collaborator

@nammn nammn commented Feb 17, 2026

Summary

This pull request introduces support for two new fields, externalMembers and replicaSetNameOverride, in the MongoDB custom resource definitions (CRDs) and associated Go types, and updates the handling of replica set merging logic to accommodate these changes. The PR also adds a utility method for agent authentication and updates test utilities and test cases to align with the new method signatures and structures.

Key changes:

API and CRD Enhancements

  • Added externalMembers (array of strings) and replicaSetNameOverride (string) fields to the DbCommonSpec Go struct and to the MongoDB and MongoDBMultiCluster CRDs, allowing users to specify external replica set members and override the replica set name. [1] [2] [3] [4] [5]

Deep Copy and Utility Methods

  • Updated the autogenerated DeepCopyInto method for DbCommonSpec to correctly handle the new externalMembers field.
  • Added a GetAutomationUserName method to AgentAuthentication to provide a default username if none is specified.

Deployment and Replica Set Merge Logic

  • Modified the MergeReplicaSet method in the deployment logic to accept an externalMembers parameter, and updated all call sites (including test helpers and sharded cluster merge logic) to pass this new argument. The merge logic now also passes externalMembers to the mergeFrom function. [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13] [14] [15]

Test Updates

  • Updated test cases and utilities to use the new MergeReplicaSet signature and to construct replica sets with the new fields as needed. Also updated test construction of replica sets to use the new argument order for NewReplicaSet. [1] [2] [3] [4] [5] [6]

These changes collectively enhance the flexibility and correctness of MongoDB deployment management, especially in scenarios involving external replica set members or custom replica set names.

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
Collaborator Author

nammn commented Feb 17, 2026

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

@github-actions
Copy link

github-actions bot commented Feb 17, 2026

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

MCK 1.7.1 Release Notes

Other Changes

  • Container images: Merged the init-database and init-appdb init container images into a single init-database image. The init-appdb image will no longer be published and does not affect existing deployments.
  • Helm Chart: Removed operator.baseName Helm value. This value was never intended to be consumed by operator users and was never documented. The value controls the prefix for workload RBAC resource names (mongodb-kubernetes default), but changing it could break the operator and workloads because the operator is not aware of custom prefixes. With this change, the Helm chart will no longer allow customisation and the relevant resources will be deployed with predefined names (ServiceAccount with names mongodb-kubernetes-appdb, mongodb-kubernetes-database-pods, mongodb-kubernetes-ops-manager, Role with name mongodb-kubernetes-appdb and RoleBinding with name mongodb-kubernetes-appdb).

@nammn nammn added the skip-changelog Use this label in Pull Request to not require new changelog entry file label Feb 17, 2026 — with Graphite App
nammn and others added 2 commits February 27, 2026 15:27
# 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

---------

Co-authored-by: Lucian Tosa <[email protected]>
@nammn nammn changed the title make ac configurable wip - migration feature branch Mar 9, 2026
nammn and others added 3 commits March 10, 2026 10:31
# Summary

* changed the ExternalMember struct to include `type`, `hostname` and
`replicaSetName`
* Reverted the previous replica set member id change
* Changed "checkIfHasExcessProcesses" to allow deployments with
`externalMembers`
* Added the vm_migration tests to evergreen CI

## Proof of Work

* CI is green
* vm_migrationt test passes

## 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

<!-- 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

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Evergreen <[email protected]>
Co-authored-by: Julien-Ben <[email protected]>
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.

2 participants