Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add SECRET_KEY for multi-replica Langflow backend #16

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions charts/langflow-ide/templates/backend-statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,13 @@ spec:
- name: LANGFLOW_NEW_USER_IS_ACTIVE
value: "{{ .Values.langflow.backend.newUserIsActive | default "False" }}"
{{- end }}
{{- if gt (int .Values.langflow.backend.replicaCount) 1 }}
- name: LANGFLOW_SECRET_KEY
valueFrom:
secretKeyRef:
name: {{ include "langflow.fullname" . }}
key: SECRET_KEY
{{- end }}
resources:
{{- toYaml .Values.langflow.backend.resources | nindent 12 }}
{{- with .Values.langflow.backend.nodeSelector }}
Expand Down
9 changes: 9 additions & 0 deletions charts/langflow-ide/templates/secret.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{{- if and (gt (int .Values.langflow.backend.replicaCount) 1) (not (lookup "v1" "Secret" .Release.Namespace "langflow-secrets")) }}
apiVersion: v1
kind: Secret
metadata:
name: {{ include "langflow.fullname" . }}
type: Opaque
data:
SECRET_KEY: {{ randAlphaNum 32 | b64enc | b64enc | quote }}
{{- end }}
2 changes: 1 addition & 1 deletion charts/langflow-ide/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ langflow:
failureThreshold: 3
periodSeconds: 10
timeoutSeconds: 5
initialDelaySeconds: 5
initialDelaySeconds: 35
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I had to increase the delay time in my k8s cluster, not sure if this happen to more people.

env: []
nodeSelector: {}

Expand Down