Skip to content

Commit 5319c96

Browse files
committed
Add globalStorage config and auto-configure it in the deployer
1 parent 059d810 commit 5319c96

File tree

3 files changed

+13
-1
lines changed

3 files changed

+13
-1
lines changed

charts/langstream/templates/control-plane/control-plane-configmap.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@ metadata:
66
labels:
77
{{- include "langstream.controlPlaneLabels" . | nindent 4 }}
88
data:
9+
APPLICATION_STORAGE_GLOBAL_TYPE: {{ .Values.globalStorage.type }}
10+
{{- range $key, $val := $.Values.globalStorage.configuration }}
11+
APPLICATION_STORAGE_GLOBAL_CONFIGURATION_{{ $key | replace "-" "" | replace "\"" "." | snakecase | upper | replace "." "_" }}: {{ $val | toString | replace "\"" "" | trim | quote }}
12+
{{- end }}
913
APPLICATION_STORAGE_APPS_CONFIGURATION_CONTROLPLANEURL: "http://{{ include "langstream.controlPlaneFullname" . }}.{{ .Release.Namespace }}.svc.cluster.local:{{ .Values.controlPlane.service.port }}"
1014
APPLICATION_STORAGE_APPS_CONFIGURATION_DEPLOYERRUNTIME_IMAGE: "{{ include "langstream.runtimeImage" . }}"
1115
APPLICATION_STORAGE_APPS_CONFIGURATION_DEPLOYERRUNTIME_IMAGE_PULL_POLICY: {{ .Values.runtime.imagePullPolicy }}

charts/langstream/templates/deployer/deployer-configmap.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,11 @@ data:
2323
{{- end }}
2424
DEPLOYER_RUNTIME_IMAGE: "{{ include "langstream.runtimeImage" . }}"
2525
DEPLOYER_RUNTIME_IMAGE_PULL_POLICY: {{ .Values.runtime.imagePullPolicy }}
26+
DEPLOYER_GLOBAL_STORAGE: |
27+
type: {{ .Values.globalStorage.type }}
28+
{{- range $key, $val := $.Values.globalStorage.configuration }}
29+
{{ $key }}: {{ $val | toString | replace "\"" "" | trim | quote }}
30+
{{- end }}
2631

2732
{{- range $key, $val := $.Values.deployer.app.config }}
2833
{{- if eq "codeStorage" $key }}

charts/langstream/values.yaml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ controlPlane:
4646
affinity: {}
4747
app:
4848
config:
49-
application.storage.global.type: kubernetes
49+
{}
5050

5151
client:
5252
replicaCount: 1
@@ -184,6 +184,9 @@ tenants:
184184
storageType: kubernetes
185185
namespacePrefix: langstream-
186186

187+
globalStorage:
188+
type: kubernetes
189+
configuration: {}
187190

188191
codeStorage:
189192
type: none

0 commit comments

Comments
 (0)