Skip to content

Commit

Permalink
[CLN]: update helm chart to work with configmap (#2127)
Browse files Browse the repository at this point in the history
## 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.
  • Loading branch information
nicolasgere committed May 3, 2024
1 parent 97dbe40 commit 70eab1e
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 78 deletions.
2 changes: 0 additions & 2 deletions Tiltfile
Original file line number Diff line number Diff line change
Expand Up @@ -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"],
Expand Down
64 changes: 0 additions & 64 deletions k8s/distributed-chroma/configuration/default.yaml

This file was deleted.

10 changes: 5 additions & 5 deletions k8s/distributed-chroma/templates/compaction-service.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{if .Values.compactionService.configFilePath}}
{{if .Values.compactionService.configuration}}
---
apiVersion: v1
kind: ConfigMap
Expand All @@ -7,7 +7,7 @@ metadata:
namespace: {{ .Values.namespace }}
data:
config.yaml: |
{{ (.Files.Get .Values.compactionService.configFilePath) | indent 4 }}
{{ .Values.compactionService.configuration | indent 4 }}
---
{{ end }}

Expand All @@ -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:
Expand All @@ -39,15 +39,15 @@ 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/
{{ end }}
ports:
- containerPort: 50051
env:
{{if .Values.compactionService.configFilePath}}
{{if .Values.compactionService.configuration}}
- name: CONFIG_PATH
value: /config/config.yaml
{{ end }}
Expand Down
10 changes: 5 additions & 5 deletions k8s/distributed-chroma/templates/query-service.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{if .Values.queryService.configFilePath}}
{{if .Values.queryService.configuration}}
---
apiVersion: v1
kind: ConfigMap
Expand All @@ -7,7 +7,7 @@ metadata:
namespace: {{ .Values.namespace }}
data:
config.yaml: |
{{ (.Files.Get .Values.queryService.configFilePath) | indent 4 }}
{{ .Values.queryService.configuration | indent 4 }}
---
{{ end }}

Expand Down Expand Up @@ -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:
Expand All @@ -56,15 +56,15 @@ 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/
{{ end }}
ports:
- containerPort: 50051
env:
{{if .Values.queryService.configFilePath}}
{{if .Values.queryService.configuration}}
- name: CONFIG_PATH
value: /config/config.yaml
{{ end }}
Expand Down
2 changes: 0 additions & 2 deletions k8s/distributed-chroma/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down

0 comments on commit 70eab1e

Please sign in to comment.