1010{{- end -}}
1111{{- end -}}
1212
13+ ### Access
1314
14- {{- if not (or (.Values.ingress).enabled (.Values.route).enabled) -}}
15+ {{ if not (or (.Values.ingress).enabled (.Values.route).enabled) -}}
1516Enable access to your service using port forwarding:
1617```bash
1718kubectl port-forward service/{{ include "chart.fullname" .Subcharts.chromadb }} <port-local>:{{ .Values.chromadb.chromadb.serverHttpPort }}
1819```
19-
20- {{ end }}
20+ {{ else -}}
21+ Your service is available at the following URI:
22+ - {{ $hostname }}
23+ {{ end -}}
2124
2225{{- if .Values.chromadb.chromadb.auth.enabled }}
2326Authentication:
@@ -31,10 +34,13 @@ Authentication:
3134Access to your service is not authenticated.
3235{{- end }}
3336
37+ <details>
38+ <summary> Environment variable setup </summary>
3439Configure the access to your service using environment variables:
3540```bash
3641export CHROMA_SERVER_HOST={{ $hostname }}
3742export CHROMA_SERVER_HTTP_PORT={{ $httpport }}
43+ export CHROMA_SERVER_SSL_ENABLED={{ $ssl }}
3844
3945{{- if .Values.chromadb.chromadb.auth.enabled }}
4046{{- if eq .Values.chromadb.chromadb.auth.type "token" }}
@@ -49,17 +55,28 @@ export CHROMA_CLIENT_AUTH_PROVIDER=chromadb.auth.basic_authn.BasicAuthClientProv
4955{{- end }}
5056{{- end }}
5157```
58+ </details>
59+
60+
61+ ### Clients
62+
63+ <details>
64+ <summary> Python client </summary>
65+ Install the ChromaDB client library first:
66+ ```bash
67+ uv pip install chromadb-client==0.6.3
68+ ```
5269
53- Using Python the variables are used automatically for authentication:
70+ Environment variables are then automatically used for authentication:
5471```python
72+ import os
5573import chromadb
5674from chromadb.config import Settings
5775
5876# Setup client using environment variables
5977client = chromadb.HttpClient(
60- host="{{ $hostname }}",
61- port={{ $httpport }},
62- ssl={{ $ssl }},
78+ host=os.getenv("CHROMA_SERVER_HOST"),
79+ port=int(os.getenv("CHROMA_SERVER_HTTP_PORT")),
6380 settings=Settings()
6481)
6582
@@ -69,3 +86,4 @@ client.get_or_create_collection("test", metadata={"key": "value"})
6986# Print out all existing collections
7087print("This should print ['test']:", client.list_collections())
7188```
89+ </details>
0 commit comments