Skip to content

Commit 3bba22d

Browse files
committed
[chromadb] Removing yq reference in NOTES and exposing token and password
1 parent f8491c6 commit 3bba22d

File tree

4 files changed

+33
-6
lines changed

4 files changed

+33
-6
lines changed

charts/chromadb/Chart.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,12 @@ sources:
1212
- https://github.com/chroma-core/chroma
1313
- https://github.com/amikos-tech/chromadb-chart/
1414
type: application
15-
version: 1.0.0
15+
version: 1.0.1
1616
appVersion: "0.6.3"
1717
dependencies:
1818
- name: chromadb
1919
version: 0.1.23
2020
repository: https://amikos-tech.github.io/chromadb-chart
2121
- name: library-chart
22-
version: 1.5.44
22+
version: 1.6.12
2323
repository: https://inseefrlab.github.io/helm-charts-interactive-services

charts/chromadb/templates/NOTES.txt

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,20 +19,33 @@ kubectl port-forward service/{{ include "chart.fullname" .Subcharts.chromadb }}
1919

2020
{{ end -}}
2121

22+
{{- if .Values.chromadb.chromadb.auth.enabled -}}
23+
{{- if eq .Values.chromadb.chromadb.auth.type "token" }}
24+
Your token: **{{ .Values.chromadb.chromadb.auth.token.value }}**
25+
{{- else }}
26+
Your username: **{{ .Values.chromadb.chromadb.auth.basic.username }}**
27+
Your password: **{{ .Values.chromadb.chromadb.auth.basic.password }}**
28+
{{- end -}}
29+
{{- else }}
30+
Access to your service is not authenticated.
31+
{{- end }}
32+
2233
Configure the access to your service using environment variables:
2334
```bash
2435
export CHROMA_SERVER_HOST={{ $hostname }}
2536
export CHROMA_SERVER_HTTP_PORT={{ $httpport }}
2637

27-
{{- if .Values.chromadb.chromadb.auth.enabled -}}
38+
{{- if .Values.chromadb.chromadb.auth.enabled }}
2839
{{- if eq .Values.chromadb.chromadb.auth.type "token" }}
29-
export CHROMA_CLIENT_AUTH_CREDENTIALS=$(kubectl get secret chromadb-auth -o jsonpath="{.data.token}" | base64 --decode)
40+
export CHROMA_CLIENT_AUTH_CREDENTIALS=$(kubectl get secret chromadb-auth -o jsonpath="{.data.token}" | base64 -d)
3041
export CHROMA_CLIENT_AUTH_PROVIDER=chromadb.auth.token_authn.TokenAuthClientProvider
3142
export CHROMA_AUTH_TOKEN_TRANSPORT_HEADER={{ .Values.chromadb.chromadb.auth.token.headerType }}
3243
{{- else }}
33-
export CHROMA_CLIENT_AUTH_CREDENTIALS=$(kubectl get secret chromadb-auth -o jsonpath="{.data}" | yq '(.username|@base64d)+":"+(.password|@base64d)')
44+
export CHROMA_CLIENT_AUTH_USERNAME=$(kubectl get secret chromadb-auth -o jsonpath="{.data.username}" | base64 -d)
45+
export CHROMA_CLIENT_AUTH_PASSWORD=$(kubectl get secret chromadb-auth -o jsonpath="{.data.password}" | base64 -d)
46+
export CHROMA_CLIENT_AUTH_CREDENTIALS="${CHROMA_CLIENT_AUTH_USERNAME}:${CHROMA_CLIENT_AUTH_PASSWORD}"
3447
export CHROMA_CLIENT_AUTH_PROVIDER=chromadb.auth.basic_authn.BasicAuthClientProvider
35-
{{- end -}}
48+
{{- end }}
3649
{{- end }}
3750
```
3851

charts/chromadb/values.schema.json

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,19 @@
132132
"value": false,
133133
"path": "chromadb/chromadb/auth/enabled"
134134
}
135+
},
136+
"value": {
137+
"title": "Service token",
138+
"type": "string",
139+
"default": "changeme",
140+
"render": "password",
141+
"x-onyxia": {
142+
"overwriteDefaultWith": "{{project.password}}"
143+
},
144+
"hidden": {
145+
"value": false,
146+
"path": "chromadb/chromadb/auth/enabled"
147+
}
135148
}
136149
}
137150
}

charts/chromadb/values.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ chromadb:
1414
password: changeme
1515
token:
1616
headerType: Authorization # possible values: Authorization, X-Chroma-Token
17+
value: changeme
1718
serviceAccount:
1819
create: false # Not properly implemented
1920
ingress:

0 commit comments

Comments
 (0)