Skip to content

Commit

Permalink
[ENH] Add configmap for query service (#2120)
Browse files Browse the repository at this point in the history
## Description of changes

*Summarize the changes made by this PR.*
 - Improvements & Bug fixes
	 - Add configmap for query service - mirroring compaction
 - New functionality
	 - None
	 - 
## Test plan
*How are these changes tested?*
- [x] Tests pass locally with `pytest` for python, `yarn test` for js,
`cargo test` for rust

## Documentation Changes
None
  • Loading branch information
HammadB authored May 2, 2024
1 parent 69fd197 commit 7f10e19
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 6 deletions.
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

0 comments on commit 7f10e19

Please sign in to comment.