From 70eab1edebe3fab0bd9d35e970d855c647980e0f Mon Sep 17 00:00:00 2001 From: nicolasgere Date: Fri, 3 May 2024 12:00:37 -0700 Subject: [PATCH] [CLN]: update helm chart to work with configmap (#2127) ## Description of changes *Summarize the changes made by this PR.* - Improvements & Bug fixes - Fix config map configuration. We will use the set-file option from helm to inject the content of a file as a variable value. --- Tiltfile | 2 - .../configuration/default.yaml | 64 ------------------- .../templates/compaction-service.yaml | 10 +-- .../templates/query-service.yaml | 10 +-- k8s/distributed-chroma/values.yaml | 2 - 5 files changed, 10 insertions(+), 78 deletions(-) delete mode 100644 k8s/distributed-chroma/configuration/default.yaml diff --git a/Tiltfile b/Tiltfile index 5e481aae581..4ca750d1aee 100644 --- a/Tiltfile +++ b/Tiltfile @@ -124,8 +124,6 @@ k8s_resource( 'test-memberlist-reader-binding:ClusterRoleBinding', 'lease-watcher:role', 'logservice-serviceaccount-rolebinding:rolebinding', - 'compaction-service-config:configmap', - 'query-service-config:configmap' ], new_name='k8s_setup', labels=["infrastructure"], diff --git a/k8s/distributed-chroma/configuration/default.yaml b/k8s/distributed-chroma/configuration/default.yaml deleted file mode 100644 index 95eb1924932..00000000000 --- a/k8s/distributed-chroma/configuration/default.yaml +++ /dev/null @@ -1,64 +0,0 @@ -# Default configuration for query and compaction service -# In the long term, every service should have an entry in this file -# and this can become the global configuration file for Chroma -# for now we nest it in the worker directory - -query_service: - my_ip: "10.244.0.9" - my_port: 50051 - assignment_policy: - RendezvousHashing: - hasher: Murmur3 - memberlist_provider: - CustomResource: - kube_namespace: "chroma" - memberlist_name: "query-service-memberlist" - queue_size: 100 - sysdb: - Grpc: - host: "sysdb.chroma" - port: 50051 - storage: - S3: - bucket: "chroma-storage" - credentials: "Minio" - log: - Grpc: - host: "logservice.chroma" - port: 50051 - dispatcher: - num_worker_threads: 4 - dispatcher_queue_size: 100 - worker_queue_size: 100 - -compaction_service: - my_ip: "10.244.0.9" - my_port: 50051 - assignment_policy: - RendezvousHashing: - hasher: Murmur3 - memberlist_provider: - CustomResource: - kube_namespace: "chroma" - memberlist_name: "compaction-service-memberlist" - queue_size: 100 - sysdb: - Grpc: - host: "sysdb.chroma" - port: 50051 - storage: - S3: - bucket: "chroma-storage" - credentials: "Minio" - log: - Grpc: - host: "logservice.chroma" - port: 50051 - dispatcher: - num_worker_threads: 4 - dispatcher_queue_size: 100 - worker_queue_size: 100 - compactor: - compaction_manager_queue_size: 1000 - max_concurrent_jobs: 100 - compaction_interval_sec: 60 diff --git a/k8s/distributed-chroma/templates/compaction-service.yaml b/k8s/distributed-chroma/templates/compaction-service.yaml index 9ac4d931798..6973a81c247 100644 --- a/k8s/distributed-chroma/templates/compaction-service.yaml +++ b/k8s/distributed-chroma/templates/compaction-service.yaml @@ -1,4 +1,4 @@ -{{if .Values.compactionService.configFilePath}} +{{if .Values.compactionService.configuration}} --- apiVersion: v1 kind: ConfigMap @@ -7,7 +7,7 @@ metadata: namespace: {{ .Values.namespace }} data: config.yaml: | -{{ (.Files.Get .Values.compactionService.configFilePath) | indent 4 }} +{{ .Values.compactionService.configuration | indent 4 }} --- {{ end }} @@ -29,7 +29,7 @@ spec: member-type: compaction-service spec: serviceAccountName: compaction-service-serviceaccount - {{if .Values.compactionService.configFilePath}} + {{if .Values.compactionService.configuration}} volumes: - name: compaction-service-config configMap: @@ -39,7 +39,7 @@ spec: - name: compaction-service image: "{{ .Values.compactionService.image.repository }}:{{ .Values.compactionService.image.tag }}" imagePullPolicy: IfNotPresent - {{if .Values.compactionService.configFilePath}} + {{if .Values.compactionService.configuration}} volumeMounts: - name: compaction-service-config mountPath: /config/ @@ -47,7 +47,7 @@ spec: ports: - containerPort: 50051 env: - {{if .Values.compactionService.configFilePath}} + {{if .Values.compactionService.configuration}} - name: CONFIG_PATH value: /config/config.yaml {{ end }} diff --git a/k8s/distributed-chroma/templates/query-service.yaml b/k8s/distributed-chroma/templates/query-service.yaml index 220366a2f41..1b47e5546be 100644 --- a/k8s/distributed-chroma/templates/query-service.yaml +++ b/k8s/distributed-chroma/templates/query-service.yaml @@ -1,4 +1,4 @@ -{{if .Values.queryService.configFilePath}} +{{if .Values.queryService.configuration}} --- apiVersion: v1 kind: ConfigMap @@ -7,7 +7,7 @@ metadata: namespace: {{ .Values.namespace }} data: config.yaml: | -{{ (.Files.Get .Values.queryService.configFilePath) | indent 4 }} +{{ .Values.queryService.configuration | indent 4 }} --- {{ end }} @@ -46,7 +46,7 @@ spec: member-type: query-service spec: serviceAccountName: query-service-serviceaccount - {{if .Values.queryService.configFilePath}} + {{if .Values.queryService.configuration}} volumes: - name: query-service-config configMap: @@ -56,7 +56,7 @@ spec: - name: query-service image: "{{ .Values.queryService.image.repository }}:{{ .Values.queryService.image.tag }}" imagePullPolicy: IfNotPresent - {{if .Values.queryService.configFilePath}} + {{if .Values.queryService.configuration}} volumeMounts: - name: query-service-config mountPath: /config/ @@ -64,7 +64,7 @@ spec: ports: - containerPort: 50051 env: - {{if .Values.queryService.configFilePath}} + {{if .Values.queryService.configuration}} - name: CONFIG_PATH value: /config/config.yaml {{ end }} diff --git a/k8s/distributed-chroma/values.yaml b/k8s/distributed-chroma/values.yaml index bd4e5143c3b..d09668ff96b 100644 --- a/k8s/distributed-chroma/values.yaml +++ b/k8s/distributed-chroma/values.yaml @@ -52,14 +52,12 @@ logService: flags: queryService: - configFilePath: "configuration/default.yaml" image: repository: 'local' tag: 'query-service' env: compactionService: - configFilePath: "configuration/default.yaml" image: repository: 'local' tag: 'compaction-service'