Skip to content

Commit 993ab2e

Browse files
committed
chore(release): sync main for chart 0.2.0
# Conflicts: # .github/workflows/integration-test.yml # README.md # charts/chromadb-chart/Chart.yaml # charts/chromadb-chart/templates/_helpers.tpl # charts/chromadb-chart/templates/config.yaml # charts/chromadb-chart/templates/statefulset.yaml # charts/chromadb-chart/values.yaml
2 parents 5a08568 + 0caceec commit 993ab2e

16 files changed

Lines changed: 860 additions & 107 deletions

File tree

.github/workflows/integration-test.yml

Lines changed: 29 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,26 +7,28 @@ on:
77
paths:
88
- charts/**
99
- tests/**
10+
- .github/workflows/integration-test.yml
1011
pull_request:
1112
branches:
1213
- main
1314
- '**'
1415
paths:
1516
- charts/**
1617
- tests/**
18+
- .github/workflows/integration-test.yml
1719
workflow_dispatch:
1820

1921
env:
20-
LATEST_VERSION: "1.0.10"
22+
LATEST_VERSION: "1.5.0"
2123
jobs:
2224
integration-test:
2325
strategy:
2426
matrix:
25-
kubernetes-version: [1.23.0, 1.33.1]
27+
kubernetes-version: [1.28.0, 1.33.1, 1.35.1]
2628
chroma-version:
2729
[
2830
0.6.3,
29-
1.0.10,
31+
1.5.0,
3032
]
3133
runs-on: ubuntu-latest
3234
steps:
@@ -43,32 +45,51 @@ jobs:
4345
kubernetes-version: ${{ matrix.kubernetes-version }}
4446
- name: Install chromadb
4547
run: |
46-
set -e
48+
set -euo pipefail
4749
sleep 20
50+
EXTRA_ARGS=()
51+
if [ "${{ matrix.chroma-version }}" = "${{ env.LATEST_VERSION }}" ]; then
52+
EXTRA_ARGS+=(
53+
--set chromadb.extraConfig.scorecard_enabled=true
54+
--set chromadb.extraConfig.circuit_breaker.requests=500
55+
)
56+
fi
4857
helm install chromadb ./charts/chromadb-chart \
4958
--set chromadb.isPersistent=true \
5059
--set chromadb.allowReset=true \
51-
--set chromadb.apiVersion=${{ matrix.chroma-version }}
60+
--set "chromadb.apiVersion=${{ matrix.chroma-version }}" \
61+
"${EXTRA_ARGS[@]}"
5262
- name: Wait for deployment to be ready
5363
run: |
64+
set -euo pipefail
5465
kubectl wait \
5566
--for=condition=ready pod \
5667
--selector=app.kubernetes.io/name=chromadb \
5768
--timeout=120s
69+
- name: Verify extraConfig is present in v1-config
70+
if: ${{ matrix.chroma-version == env.LATEST_VERSION }}
71+
run: |
72+
set -euo pipefail
73+
config="$(kubectl get configmap v1-config -o go-template='{{ index .data "config.yaml" }}')"
74+
printf '%s\n' "$config"
75+
printf '%s\n' "$config" | grep -q '^scorecard_enabled: true$'
76+
printf '%s\n' "$config" | grep -q '^circuit_breaker:$'
77+
printf '%s\n' "$config" | grep -q '^ requests: 500$'
5878
- name: Test
5979
run: |
60-
set -e
80+
set -euo pipefail
6181
kubectl get pods -A
6282
kubectl get svc -A
6383
helm test chromadb
6484
- name: Debug
6585
if: failure()
6686
run: |
87+
set -euo pipefail
6788
kubectl get pods -A
6889
kubectl get svc -A
69-
kubectl logs --selector=app.kubernetes.io/name=chromadb --previous
90+
kubectl logs --selector=app.kubernetes.io/name=chromadb --previous || true
7091
- name: Setup tmate session
71-
if: failure()
92+
if: failure() && github.event_name == 'workflow_dispatch'
7293
uses: mxschmitt/action-tmate@v3
7394
with:
7495
limit-access-to-actor: true

.github/workflows/lint.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ on:
66
- '**'
77
paths:
88
- charts/**
9+
- tests/**
10+
- .github/workflows/lint.yml
911
workflow_dispatch:
1012
env:
1113
REGISTRY: ghcr.io
@@ -28,6 +30,28 @@ jobs:
2830
- name: Install Helm
2931
uses: azure/setup-helm@v4.2.0
3032

33+
- name: Setup Go
34+
uses: actions/setup-go@v5
35+
with:
36+
go-version: "1.24.x"
37+
38+
- name: Install yq
39+
run: |
40+
set -euo pipefail
41+
YQ_VERSION="v4.44.6"
42+
GOBIN_DIR="$(mktemp -d)"
43+
cleanup() {
44+
rm -rf "${GOBIN_DIR}"
45+
}
46+
trap cleanup EXIT
47+
48+
GOBIN="${GOBIN_DIR}" go install "github.com/mikefarah/yq/v4@${YQ_VERSION}"
49+
sudo install -m 0755 "${GOBIN_DIR}/yq" /usr/local/bin/yq
50+
yq --version
51+
52+
- name: Run v1 config template tests
53+
run: bash tests/test_v1_config.sh
54+
3155
- name: Lint chart
3256
id: helm-lint
3357
uses: helm/chart-testing-action@v2.6.1

.gitignore

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,4 +89,7 @@ dmypy.json
8989
cython_debug/
9090

9191
# macOS temporary files
92-
.DS_Store
92+
.DS_Store
93+
94+
# Auto-generated working files
95+
ISSUE_CONTEXT.md

CLAUDE.md

Lines changed: 93 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,93 @@
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

Makefile

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1-
.PHONY: lint
1+
.PHONY: lint ci-smoke
22
lint:
3-
helm lint charts/chromadb-chart
3+
helm lint charts/chromadb-chart
4+
5+
ci-smoke:
6+
bash tests/ci_smoke.sh

0 commit comments

Comments
 (0)