Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ENH] Add configmap for query service #2120

Merged
merged 1 commit into from
May 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 28 additions & 6 deletions k8s/distributed-chroma/templates/query-service.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,16 @@
{{if .Values.queryService.configFilePath}}
---
apiVersion: v1
kind: ConfigMap
metadata:
name: query-service-config
namespace: {{ .Values.namespace }}
data:
config.yaml: |
{{ (.Files.Get .Values.queryService.configFilePath) | indent 4 }}
---
{{ end }}

---

apiVersion: v1
Expand Down Expand Up @@ -33,16 +46,28 @@ spec:
member-type: query-service
spec:
serviceAccountName: query-service-serviceaccount
{{if .Values.queryService.configFilePath}}
volumes:
- name: query-service-config
configMap:
name: query-service-config
{{ end }}
containers:
- name: query-service
image: "{{ .Values.queryService.image.repository }}:{{ .Values.queryService.image.tag }}"
imagePullPolicy: IfNotPresent
{{if .Values.queryService.configFilePath}}
volumeMounts:
- name: query-service-config
mountPath: /config/
{{ end }}
ports:
- containerPort: 50051
volumeMounts:
- name: chroma
mountPath: /index_data
env:
{{if .Values.queryService.configFilePath}}
- name: CONFIG_PATH
value: /config/config.yaml
{{ end }}
{{ range .Values.queryService.env }}
- name: {{ .name }}
# TODO properly use flow control here to check which type of value we need.
Expand All @@ -59,9 +84,6 @@ spec:
labelSelector:
matchLabels:
member-type: query-service
volumes:
- name: chroma
emptyDir: {}

---

Expand Down
1 change: 1 addition & 0 deletions k8s/distributed-chroma/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ logService:
flags:

queryService:
configFilePath: "configuration/default.yaml"
image:
repository: 'local'
tag: 'query-service'
Expand Down
Loading