Skip to content

analytiq-hub/analytiq-charts

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

analytiq-hub Helm Charts

Helm charts published to ghcr.io/analytiq-hub/ as OCI artifacts.

Charts

Chart Description
mongodb-atlas-local MongoDB Community on Kubernetes with Search and Vector Search. Uses the MongoDB Kubernetes Operator to deploy a MongoDBCommunity replica set and MongoDBSearch (mongot). Requires MongoDB 8.2.0+. Suitable for dev/test; Search/Vector Search on Kubernetes is currently a preview feature.

mongodb-atlas-local

This chart renders MongoDBCommunity and MongoDBSearch CRs. The MongoDB Kubernetes Operator must be installed in the cluster first; the operator creates the StatefulSet and Services.

Step 1: Install the MongoDB Kubernetes Operator

helm repo add mongodb https://mongodb.github.io/helm-charts
helm repo update

kubectl create namespace mongodb

helm install mongodb-kubernetes-operator mongodb/mongodb-kubernetes -n mongodb

Verify:

kubectl describe deployment mongodb-kubernetes-operator -n mongodb

Step 2: Install this chart

The operator does not wait for the MongoDB replica set to be ready before starting MongoDBSearch. If both CRs are created at once, the search pod can error and restart until MongoDB is up. To avoid that, use a two-phase install.

Two-phase install (recommended)

Phase 1 — deploy MongoDB only, then wait for it to be ready:

helm install my-mongo ./charts/mongodb-atlas-local -n mongodb \
  --set mongodb.adminPassword=<admin-password> \
  --set mongodb.appUser.password=<app-password> \
  --set search.enabled=false

kubectl -n mongodb wait --for=condition=Ready mongodbcommunity/my-mongo-mongodb-atlas-local --timeout=5m

Phase 2 — enable Search/Vector Search:

helm upgrade my-mongo ./charts/mongodb-atlas-local -n mongodb \
  --set mongodb.adminPassword=<admin-password> \
  --set mongodb.appUser.password=<app-password> \
  --set search.enabled=true

Single-phase install

You can install with search.enabled=true (the default) in one step. The search pod may show Error and restart a few times until the replica set is ready; once MongoDB is Running, search should stabilise.

helm install my-mongo ./charts/mongodb-atlas-local -n mongodb \
  --set mongodb.adminPassword=<admin-password> \
  --set mongodb.appUser.password=<app-password>

Check resources:

kubectl get mongodbcommunity,mongodbsearch,pods -n mongodb

Step 3: Create a vector index (optional)

Connect with mongosh (e.g. port-forward to a pod) and create a vector search index:

db.embeddings.createSearchIndex(
  "vector_index",
  "vectorSearch",
  {
    fields: [
      {
        type: "vector",
        path: "embedding",
        numDimensions: 1536,
        similarity: "cosine"
      }
    ]
  }
);

Query with $vectorSearch:

db.embeddings.aggregate([
  {
    $vectorSearch: {
      index: "vector_index",
      path: "embedding",
      queryVector: [ /* 1536 floats */ ],
      numCandidates: 100,
      limit: 10
    }
  }
]);

Storage (disk size)

Default disk size is 20Gi per replica set member (so 3 members = 3×20Gi total). The size is set when the operator creates the PVCs from the MongoDBCommunity resource.

To use a larger size, set mongodb.storage (and optionally mongodb.storageClassName) at install or upgrade:

helm install my-mongo ./charts/mongodb-atlas-local -n mongodb \
  --set mongodb.adminPassword=<password> \
  --set mongodb.appUser.password=<password> \
  --set mongodb.storage=100Gi

Or in a values file:

mongodb:
  storage: 100Gi
  storageClassName: ""   # or e.g. "fast-ssd" for a specific StorageClass

Note: Existing PVCs are not resized when you change mongodb.storage. The requested size is applied only when the PVC is first created. To get more disk on an already-deployed cluster you need either a new install with the desired size or your cluster’s volume expansion mechanism (e.g. StorageClass with allowVolumeExpansion: true and PVC resize).

Values

Value Description
nameOverride Override the MongoDB resource name (default: release name + chart name).
mongodb.version MongoDB version (must be 8.2.0+ for Search/Vector Search).
mongodb.members Replica set member count (default: 3).
mongodb.storage PVC size per member (default: 20Gi).
mongodb.storageClassName StorageClass for PVCs (empty = default).
mongodb.adminUsername / mongodb.adminPassword Admin user (or use mongodb.existingAdminSecret).
mongodb.appUser.username / mongodb.appUser.password / mongodb.appUser.database App user (or use mongodb.existingAppSecret).
search.enabled Deploy MongoDBSearch for Search/Vector Search (default: true).
search.resources CPU/memory for mongot.
tls.enabled Enable TLS (default: false).

Publishing

Charts are published automatically when a tag of the form <chart-name>/v<version> is pushed:

git tag mongodb-atlas-local/v2.0.0
git push --tags

This triggers the GitHub Actions release workflow, which packages and pushes the chart to ghcr.io/analytiq-hub/<chart-name>:<version>.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors