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.
Description
Pull Request Description
Motivation
This pull request introduces the ability to run the migration as a Kubernetes job within a cluster. This enhancement leverages Kubernetes' internal DNS, eliminating the need to expose services externally and simplifying the deployment process. By running migrations as Kubernetes jobs, users can benefit from the robust orchestration and management capabilities provided by Kubernetes.
Why It Improves the Project
Simplified Deployment: Users can now deploy migrations directly in their Kubernetes clusters using a straightforward
kubectl apply -f kubernetes-job.yaml
command, eliminating the need for complex setup and configuration.Enhanced Security: By using internal Kubernetes DNS, there is no need to expose services externally, reducing the attack surface and enhancing the overall security posture of the deployment.
Scalability and Reliability: Kubernetes' built-in features such as automatic restarts, resource management, and scaling ensure that the migration jobs are handled efficiently and reliably, even in large-scale environments.
Changes Introduced
README.md:
-queue
and-mode
.-queue
: Specifies the integration used to transfer events to the hub pipeline.-mode
: Allows users to choose betweendry-run
andlive
modes.kubernetes-job.yaml:
-mongodb-uri
,-mongodb-source-database
,-mongodb-destination-database
,-username
,-queue
,-start-timestamp
,-end-timestamp
,-timezone
,-pipeline
,-mode
,-batch-size
, and-batch-delay
.uugai/cli:latest
image.Never
to ensure jobs do not restart automatically upon completion.Conclusion
This pull request significantly enhances the usability, security, and scalability of the migration tool by integrating Kubernetes job support. Users can now effortlessly deploy and manage migrations within their Kubernetes clusters, benefiting from the robust orchestration capabilities of Kubernetes.