-
Notifications
You must be signed in to change notification settings - Fork 14
Add region playground #206
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
4ac2e04 to
f1e191b
Compare
5df67d4 to
b8c1d8a
Compare
Allows the adding and removal of regions, as well as test scripts.
Depends on kubefleet change.