Open
Conversation
xgerman
reviewed
Dec 30, 2025
documentdb-playground/aks-fleet-deployment/documentdb-resource-crp.yaml
Outdated
Show resolved
Hide resolved
documentdb-playground/fleet-add-region/documentdb-resource-crp.yaml
Outdated
Show resolved
Hide resolved
documentdb-playground/fleet-add-region/documentdb-resource-crp.yaml
Outdated
Show resolved
Hide resolved
042a7a0 to
c1e70a0
Compare
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adds a "region playground" for testing DocumentDB's dynamic region addition and removal capabilities in AKS Fleet environments. It introduces operator support for handling clusters not present in the replication topology and provides comprehensive test scripts for validating multi-region operations.
Changes:
- Added
NotPresentreplication state to handle DocumentDB instances excluded from the fleet cluster list - Refactored physical replication logic to use asynchronous demotion token handling via goroutines
- Created playground scripts for adding/removing regions and validating fleet topology changes
- Simplified Bicep templates by removing hardcoded peering and moving to dynamic generation
Reviewed changes
Copilot reviewed 18 out of 18 changed files in this pull request and generated 20 comments.
Show a summary per file
| File | Description |
|---|---|
| operator/src/internal/utils/util.go | Added DeleteOwnedResources function to clean up Services and CNPG Clusters owned by a DocumentDB instance |
| operator/src/internal/utils/replication_context.go | Introduced NotPresent state for clusters excluded from replication topology |
| operator/src/internal/utils/constants.go | Added new JSON patch path constants for external clusters, managed services, and synchronous configuration |
| operator/src/internal/controller/physical_replication.go | Refactored cluster update logic to separate primary change and replica change operations; moved to async demotion token handling |
| operator/src/internal/controller/documentdb_controller.go | Added early return path when replication context is NotPresent, triggering resource cleanup |
| documentdb-playground/fleet-add-region/remove-region.sh | Script to remove a region from DocumentDB cluster list |
| documentdb-playground/fleet-add-region/add-region.sh | Script to add a region to DocumentDB cluster list |
| documentdb-playground/fleet-add-region/documentdb-three-region.sh | Sets up a three-region DocumentDB configuration |
| documentdb-playground/fleet-add-region/check.sh | Comprehensive validation script for verifying fleet topology and CNPG resources |
| documentdb-playground/fleet-add-region/deploy-four-region.sh | Wrapper script to deploy a four-region fleet |
| documentdb-playground/fleet-add-region/documentdb-resource-crp.yaml | YAML template for DocumentDB multi-region resources |
| documentdb-playground/fleet-add-region/README.md | Documentation for the region playground workflows |
| documentdb-playground/aks-fleet-deployment/parameters.bicepparam | Removed hardcoded parameters file in favor of dynamic parameter passing |
| documentdb-playground/aks-fleet-deployment/main.bicep | Simplified VNet addressing to use index-based ranges and removed hardcoded peering |
| documentdb-playground/aks-fleet-deployment/install-documentdb-operator.sh | Fixed path reference to use SCRIPT_DIR |
| documentdb-playground/aks-fleet-deployment/documentdb-operator-crp.yaml | Removed obsolete backup CRD references |
| documentdb-playground/aks-fleet-deployment/deploy-multi-region.sh | Fixed service naming to include cluster name for uniqueness |
| documentdb-playground/aks-fleet-deployment/deploy-fleet-bicep.sh | Moved VNet peering from Bicep template to dynamic shell script generation |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
5df67d4 to
b8c1d8a
Compare
Signed-off-by: Alexander Laye <alaye@microsoft.com>
8860648 to
343ffc1
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Allows the adding and removal of regions, as well as test scripts.
Depends on kubefleet change.