|
| 1 | +# CLAUDE.md |
| 2 | + |
| 3 | +This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository. |
| 4 | + |
| 5 | +## Project Overview |
| 6 | + |
| 7 | +This is a Helm chart repository for deploying ChromaDB (a vector database) on Kubernetes. The chart is maintained by Amikos Tech and provides a single-node Chroma database deployment with support for various configuration options including authentication, persistence, and observability. |
| 8 | + |
| 9 | +## Key Commands |
| 10 | + |
| 11 | +### Helm Chart Development |
| 12 | + |
| 13 | +```bash |
| 14 | +# Lint the chart locally |
| 15 | +make lint |
| 16 | +# or directly: |
| 17 | +helm lint charts/chromadb-chart |
| 18 | + |
| 19 | +# Install the chart for local testing (requires Kubernetes cluster) |
| 20 | +helm install chromadb ./charts/chromadb-chart --set chromadb.allowReset=true |
| 21 | + |
| 22 | +# Run Helm tests after installation |
| 23 | +helm test chromadb |
| 24 | + |
| 25 | +# Package the chart |
| 26 | +helm package charts/chromadb-chart |
| 27 | + |
| 28 | +# Update chart dependencies |
| 29 | +helm dependency update charts/chromadb-chart |
| 30 | +``` |
| 31 | + |
| 32 | +### Testing |
| 33 | + |
| 34 | +```bash |
| 35 | +# Run Python integration tests (requires ChromaDB instance running) |
| 36 | +python tests/test_chroma.py |
| 37 | + |
| 38 | +# Run Helm chart tests in Kubernetes |
| 39 | +helm test chromadb |
| 40 | + |
| 41 | +# GitHub Actions integration tests run on: |
| 42 | +# - Kubernetes versions: 1.28.0, 1.33.1, 1.35.1 |
| 43 | +# - Chroma versions: 0.6.3, 1.5.0 |
| 44 | +``` |
| 45 | + |
| 46 | +### Local Development with Minikube |
| 47 | + |
| 48 | +```bash |
| 49 | +# Setup Minikube cluster with ingress |
| 50 | +minikube start --addons=ingress -p chroma |
| 51 | +minikube profile chroma |
| 52 | + |
| 53 | +# Forward service to localhost |
| 54 | +minikube service chromadb --url |
| 55 | +``` |
| 56 | + |
| 57 | +## Architecture & Structure |
| 58 | + |
| 59 | +### Chart Components |
| 60 | + |
| 61 | +The Helm chart (`charts/chromadb-chart/`) contains: |
| 62 | + |
| 63 | +- **StatefulSet Deployment**: Main ChromaDB application deployed as a StatefulSet with persistent storage |
| 64 | +- **Service**: ClusterIP service exposing ChromaDB API on port 8000 |
| 65 | +- **ConfigMap**: Configuration for ChromaDB settings including auth, logging, and telemetry |
| 66 | +- **Secret**: Auto-generated or custom authentication credentials (token/basic auth) |
| 67 | +- **PersistentVolumeClaim**: Storage for ChromaDB data (configurable size and storage class) |
| 68 | +- **Ingress**: Optional ingress for external access |
| 69 | +- **Test Jobs**: Kubernetes Jobs for testing API connectivity and authentication |
| 70 | + |
| 71 | +### Key Configuration Points |
| 72 | + |
| 73 | +The chart supports multiple ChromaDB versions from 0.4.3 to 1.0.x with version-specific features: |
| 74 | + |
| 75 | +- **Authentication**: Supported in versions < 1.0.0 (token auth from 0.4.8+, basic auth from 0.4.7+) |
| 76 | +- **Logging Configuration**: Custom log levels and config maps (versions < 1.0.0) |
| 77 | +- **Cache Management**: LRU cache policy configuration (versions < 1.0.0) |
| 78 | +- **CORS Configuration**: List-based CORS origins (wildcard supported for all versions) |
| 79 | +- **Telemetry**: OTEL telemetry support with configurable endpoints |
| 80 | + |
| 81 | +### GitHub Workflows |
| 82 | + |
| 83 | +- **Lint on PR** (`.github/workflows/lint.yml`): Validates chart syntax on pull requests |
| 84 | +- **Integration Tests** (`.github/workflows/integration-test.yml`): Tests chart installation across multiple Kubernetes and ChromaDB versions |
| 85 | +- **Release** (`.github/workflows/release.yml`): Handles chart packaging and publishing to GitHub Pages |
| 86 | + |
| 87 | +## Important Notes |
| 88 | + |
| 89 | +- Default ChromaDB version is 1.5.0 (as of chart version 0.2.0) |
| 90 | +- Authentication is NOT supported in ChromaDB 1.0.x - use network-level security or API gateway |
| 91 | +- Data persistence is enabled by default at `/data` directory |
| 92 | +- Anonymous telemetry is disabled by default for privacy |
| 93 | +- The chart uses ghcr.io/chroma-core/chroma as the default image repository |
0 commit comments