diff --git a/k8s/distributed-chroma/templates/query-service.yaml b/k8s/distributed-chroma/templates/query-service.yaml index 485af9afaa3..220366a2f41 100644 --- a/k8s/distributed-chroma/templates/query-service.yaml +++ b/k8s/distributed-chroma/templates/query-service.yaml @@ -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 @@ -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. @@ -59,9 +84,6 @@ spec: labelSelector: matchLabels: member-type: query-service - volumes: - - name: chroma - emptyDir: {} --- diff --git a/k8s/distributed-chroma/values.yaml b/k8s/distributed-chroma/values.yaml index 221cce60d9c..bd4e5143c3b 100644 --- a/k8s/distributed-chroma/values.yaml +++ b/k8s/distributed-chroma/values.yaml @@ -52,6 +52,7 @@ logService: flags: queryService: + configFilePath: "configuration/default.yaml" image: repository: 'local' tag: 'query-service'