mongosync
Helm chartv0.4.0App 1.15.0Verified publisher
Mongo Cluster-to-Cluster Sync
About this chart
mongosync
Mongo Cluster-to-Cluster Sync
This tool is used to sync data from one MongoDB cluster to another. It is designed to be used in a Kubernetes environment.
Homepage: https://github.com/sergelogvinov/helm-charts
Maintainers
| Name | Url | |
|---|---|---|
| sergelogvinov | https://github.com/sergelogvinov |
Source Code
- https://github.com/sergelogvinov/helm-charts/tree/master/charts/mongosync
- https://www.mongodb.com/docs/cluster-to-cluster-sync
Run mongo sync
curl localhost:27182/api/v1/start -XPOST \
--data '{
"source": "cluster0",
"destination": "cluster1",
"enableUserWriteBlocking": true,
"verification": {
"enabled": false
}
}'
Check progress
curl localhost:27182/api/v1/progress -XGET
Finish sync
curl localhost:27182/api/v1/commit -XPOST --data '{ }'
Values
| Key | Type | Default | Description |
|---|---|---|---|
| replicaCount | int | 1 | |
| image.repository | string | "ghcr.io/sergelogvinov/mongosync" | |
| image.pullPolicy | string | "IfNotPresent" | |
| image.tag | string | "" | |
| imagePullSecrets | list | [] | |
| nameOverride | string | "" | |
| fullnameOverride | string | "" | |
| hostAliases | list | [] | |
| config.cluster0 | string | "mongodb://192.0.2.10:27017/admin" | |
| config.cluster1 | string | "mongodb://192.0.2.20:27017/admin" | |
| config.verbosity | string | "INFO" | |
| config.disableTelemetry | bool | true | |
| filters | list | [] | |
| args | list | [] | Mongosqld arguments example: - --verbosity=DEBUG |
| serviceAccount | object | {"annotations":{},"create":true,"name":""} | Pods Service Account. ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/ |
| podAnnotations | object | {} | Annotations for pod. ref: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/ |
| podSecurityContext | object | {"fsGroup":34,"fsGroupChangePolicy":"OnRootMismatch","runAsGroup":34,"runAsNonRoot":true,"runAsUser":34} | Pod Security Context. ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/#set-the-security-context-for-a-pod |
| securityContext | object | {"allowPrivilegeEscalation":false,"capabilities":{"drop":["ALL"]},"readOnlyRootFilesystem":true,"seccompProfile":{"type":"RuntimeDefault"}} | Container Security Context. ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/#set-the-security-context-for-a-pod |
| service | object | {"port":27182,"type":"ClusterIP"} | Service parameters ref: https://kubernetes.io/docs/user-guide/services/ |
| resources | object | {"limits":{"cpu":"500m"},"requests":{"cpu":"100m","memory":"1Gi"}} | Resource requests and limits. ref: https://kubernetes.io/docs/user-guide/compute-resources/ |
| nodeSelector | object | {"kubernetes.io/arch":"amd64"} | Node labels for pod assignment. ref: https://kubernetes.io/docs/user-guide/node-selection/ |
| tolerations | list | [] | Tolerations for pod assignment. ref: https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/ |
| affinity | object | {} | Affinity for pod assignment. ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity |
Deploy mongosync with OpenTenant
Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has mongosync on a Hetzner server. Change the host, add apps from the marketplace, then copy the generated files. Providers and prices are samples, and nothing here is sent anywhere.
- Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
- Place the chartmongosync is pinned at v0.4.0 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
- ApplySave opentenant.yaml and main.tf from the console, then run the commands below.
# opentenant.yaml, main.tf and dns.tf come from the builder below opentenant validate opentenant.yaml terraform init && terraform apply