mongosqld

by serge.logvinov

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

NameEmailUrl
sergelogvinovhttps://github.com/sergelogvinov

Source Code

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

KeyTypeDefaultDescription
replicaCountint1
image.repositorystring"ghcr.io/sergelogvinov/mongosqld"
image.pullPolicystring"IfNotPresent"
image.tagstring""
imagePullSecretslist[]
nameOverridestring""
fullnameOverridestring""
tlsCertsobject{"create":true}Create tls certs
schemaModestring"memory"Schema store type memory, auto, custom
schemastringnil
configstring""
authobject{"database":"db","host":"mongo-backend-rs0:27017","password":"pass","username":"user"}Mongo connections params
argslist[]Mongosqld arguments example: - --sampleNamespaces=contacts.addresses
serviceAccountobject{"annotations":{},"create":true,"name":""}Pods Service Account. ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/
podAnnotationsobject{}Annotations for pod. ref: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/
podSecurityContextobject{"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
securityContextobject{"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
serviceobject{"ipFamilies":["IPv4"],"port":3306,"type":"ClusterIP"}Service parameters ref: https://kubernetes.io/docs/user-guide/services/
resourcesobject{"requests":{"cpu":"50m","memory":"64Mi"}}Resource requests and limits. ref: https://kubernetes.io/docs/user-guide/compute-resources/
priorityClassNamestringnilPriority Class Name ref: https://kubernetes.io/docs/concepts/configuration/pod-priority-preemption/#priorityclass
nodeSelectorobject{}Node labels for pod assignment. ref: https://kubernetes.io/docs/user-guide/node-selection/
tolerationslist[]Tolerations for pod assignment. ref: https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/
affinityobject{}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.

  1. Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
  2. Place the chartmongosqld is pinned at v0.3.7 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
  3. 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