add flow configmaps to helm chart
This commit is contained in:
parent
638e2d4c56
commit
2bf88d8f5c
6 changed files with 85 additions and 0 deletions
|
|
@ -0,0 +1,12 @@
|
||||||
|
{{- if .Values.langflow.flows.loadDefaults }}
|
||||||
|
apiVersion: v1
|
||||||
|
kind: ConfigMap
|
||||||
|
metadata:
|
||||||
|
name: {{ include "openrag.fullname" . }}-flow-agent
|
||||||
|
namespace: {{ include "openrag.namespace" . }}
|
||||||
|
labels:
|
||||||
|
{{- include "openrag.labels" . | nindent 4 }}
|
||||||
|
data:
|
||||||
|
openrag_agent.json: |-
|
||||||
|
{{ .Files.Get "flows/openrag_agent.json" | indent 4 }}
|
||||||
|
{{- end }}
|
||||||
|
|
@ -0,0 +1,12 @@
|
||||||
|
{{- if .Values.langflow.flows.loadDefaults }}
|
||||||
|
apiVersion: v1
|
||||||
|
kind: ConfigMap
|
||||||
|
metadata:
|
||||||
|
name: {{ include "openrag.fullname" . }}-flow-ingestion
|
||||||
|
namespace: {{ include "openrag.namespace" . }}
|
||||||
|
labels:
|
||||||
|
{{- include "openrag.labels" . | nindent 4 }}
|
||||||
|
data:
|
||||||
|
ingestion_flow.json: |-
|
||||||
|
{{ .Files.Get "flows/ingestion_flow.json" | indent 4 }}
|
||||||
|
{{- end }}
|
||||||
|
|
@ -0,0 +1,12 @@
|
||||||
|
{{- if .Values.langflow.flows.loadDefaults }}
|
||||||
|
apiVersion: v1
|
||||||
|
kind: ConfigMap
|
||||||
|
metadata:
|
||||||
|
name: {{ include "openrag.fullname" . }}-flow-nudges
|
||||||
|
namespace: {{ include "openrag.namespace" . }}
|
||||||
|
labels:
|
||||||
|
{{- include "openrag.labels" . | nindent 4 }}
|
||||||
|
data:
|
||||||
|
openrag_nudges.json: |-
|
||||||
|
{{ .Files.Get "flows/openrag_nudges.json" | indent 4 }}
|
||||||
|
{{- end }}
|
||||||
|
|
@ -0,0 +1,12 @@
|
||||||
|
{{- if .Values.langflow.flows.loadDefaults }}
|
||||||
|
apiVersion: v1
|
||||||
|
kind: ConfigMap
|
||||||
|
metadata:
|
||||||
|
name: {{ include "openrag.fullname" . }}-flow-url
|
||||||
|
namespace: {{ include "openrag.namespace" . }}
|
||||||
|
labels:
|
||||||
|
{{- include "openrag.labels" . | nindent 4 }}
|
||||||
|
data:
|
||||||
|
openrag_url_mcp.json: |-
|
||||||
|
{{ .Files.Get "flows/openrag_url_mcp.json" | indent 4 }}
|
||||||
|
{{- end }}
|
||||||
|
|
@ -30,6 +30,29 @@ spec:
|
||||||
imagePullSecrets:
|
imagePullSecrets:
|
||||||
{{- toYaml . | nindent 8 }}
|
{{- toYaml . | nindent 8 }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
{{- if .Values.langflow.flows.loadDefaults }}
|
||||||
|
initContainers:
|
||||||
|
- name: load-default-flows
|
||||||
|
image: busybox:1.36
|
||||||
|
command:
|
||||||
|
- /bin/sh
|
||||||
|
- -c
|
||||||
|
- |
|
||||||
|
FLOWS_DIR="{{ .Values.langflow.persistence.mountPath }}/{{ .Values.langflow.persistence.flowsSubPath }}"
|
||||||
|
mkdir -p "$FLOWS_DIR"
|
||||||
|
if [ -z "$(ls -A $FLOWS_DIR 2>/dev/null)" ]; then
|
||||||
|
echo "Loading default flows..."
|
||||||
|
cp /default-flows/*.json "$FLOWS_DIR/"
|
||||||
|
echo "Flows loaded: $(ls $FLOWS_DIR)"
|
||||||
|
else
|
||||||
|
echo "Flows already exist, skipping."
|
||||||
|
fi
|
||||||
|
volumeMounts:
|
||||||
|
- name: langflow-data
|
||||||
|
mountPath: {{ .Values.langflow.persistence.mountPath }}
|
||||||
|
- name: default-flows
|
||||||
|
mountPath: /default-flows
|
||||||
|
{{- end }}
|
||||||
containers:
|
containers:
|
||||||
- name: langflow
|
- name: langflow
|
||||||
image: "{{ .Values.langflow.image.repository }}:{{ .Values.langflow.image.tag | default .Values.global.imageTag }}"
|
image: "{{ .Values.langflow.image.repository }}:{{ .Values.langflow.image.tag | default .Values.global.imageTag }}"
|
||||||
|
|
@ -196,6 +219,19 @@ spec:
|
||||||
{{- else }}
|
{{- else }}
|
||||||
emptyDir: {}
|
emptyDir: {}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
{{- if .Values.langflow.flows.loadDefaults }}
|
||||||
|
- name: default-flows
|
||||||
|
projected:
|
||||||
|
sources:
|
||||||
|
- configMap:
|
||||||
|
name: {{ include "openrag.fullname" . }}-flow-ingestion
|
||||||
|
- configMap:
|
||||||
|
name: {{ include "openrag.fullname" . }}-flow-agent
|
||||||
|
- configMap:
|
||||||
|
name: {{ include "openrag.fullname" . }}-flow-nudges
|
||||||
|
- configMap:
|
||||||
|
name: {{ include "openrag.fullname" . }}-flow-url
|
||||||
|
{{- end }}
|
||||||
{{- with .Values.nodeSelector }}
|
{{- with .Values.nodeSelector }}
|
||||||
nodeSelector:
|
nodeSelector:
|
||||||
{{- toYaml . | nindent 8 }}
|
{{- toYaml . | nindent 8 }}
|
||||||
|
|
|
||||||
|
|
@ -71,6 +71,7 @@ langflow:
|
||||||
|
|
||||||
# Flow configuration (UUIDs for Langflow workflows)
|
# Flow configuration (UUIDs for Langflow workflows)
|
||||||
flows:
|
flows:
|
||||||
|
loadDefaults: true # Load default OpenRAG flows on first deployment
|
||||||
chatFlowId: "1098eea1-6649-4e1d-aed1-b77249fb8dd0"
|
chatFlowId: "1098eea1-6649-4e1d-aed1-b77249fb8dd0"
|
||||||
ingestFlowId: "5488df7c-b93f-4f87-a446-b67028bc0813"
|
ingestFlowId: "5488df7c-b93f-4f87-a446-b67028bc0813"
|
||||||
urlIngestFlowId: "72c3d17c-2dac-4a73-b48a-6518473d7830"
|
urlIngestFlowId: "72c3d17c-2dac-4a73-b48a-6518473d7830"
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue