mongosqld
Helm chartv0.3.7App 2.14.23Verified publisher
Mongo to SQL bridge
About this chart
mongosqld
Mongo to SQL bridge
MongoSQLD is a MongoDB connector for BI tools. It allows you to use SQL queries to access MongoDB data. It supports pre-defined or dynamic schemas.
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/mongosqld
- https://www.mongodb.com/docs/bi-connector/current/reference/mongosqld
MongoDB Connector for BI
Create user
db.createUser({user: 'mongosql', pwd:"mongosql", roles: [{ 'role': 'read', 'db': 'db' },{ 'role': 'readWrite', 'db': 'dbSchema' }] })
Deploy chart
# Predefined schema
schemaMode: custom
schema:
- db: db
tables:
- table: table
collection: table
pipeline: []
columns:
- Name: _id
MongoType: bson.ObjectId
SqlName: _id
SqlType: objectid
auth:
host: mongo-rs0:27017
username: mongosql
password: mongosql
database: db
Values
| Key | Type | Default | Description |
|---|---|---|---|
| replicaCount | int | 1 | |
| image.repository | string | "ghcr.io/sergelogvinov/mongosqld" | |
| image.pullPolicy | string | "IfNotPresent" | |
| image.tag | string | "" | |
| imagePullSecrets | list | [] | |
| nameOverride | string | "" | |
| fullnameOverride | string | "" | |
| tlsCerts | object | {"create":true} | Create tls certs |
| schemaMode | string | "memory" | Schema store type memory, auto, custom |
| schema | string | nil | |
| config | string | "" | |
| auth | object | {"database":"db","host":"mongo-backend-rs0:27017","password":"pass","username":"user"} | Mongo connections params |
| args | list | [] | Mongosqld arguments example: - --sampleNamespaces=contacts.addresses |
| 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":65534,"fsGroupChangePolicy":"OnRootMismatch","runAsGroup":65534,"runAsNonRoot":true,"runAsUser":65534} | 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"]},"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 | {"ipFamilies":["IPv4"],"port":3306,"type":"ClusterIP"} | Service parameters ref: https://kubernetes.io/docs/user-guide/services/ |
| resources | object | {"requests":{"cpu":"50m","memory":"64Mi"}} | Resource requests and limits. ref: https://kubernetes.io/docs/user-guide/compute-resources/ |
| priorityClassName | string | nil | Priority Class Name ref: https://kubernetes.io/docs/concepts/configuration/pod-priority-preemption/#priorityclass |
| nodeSelector | object | {} | 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 mongosqld with OpenTenant
Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has mongosqld 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 chartmongosqld is pinned at v0.3.7 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