-
Notifications
You must be signed in to change notification settings - Fork 50
Description
Problem
The current Helm chart for the IDE backend does not provide any means of adding initContainers. This is preventing us from adding an initContainer which we use internally to automatically pull secrets from our key vault store and use them as global variables with the environment variable LANGFLOW_VARIABLES_TO_GET_FROM_ENVIRONMENT.
Proposed Change
Add a new key initContainers under .Values.langflow.backend to provide "as is" configuration. By injecting the entirety of .Values.langflow.backend.initContainers there's no need for added abstraction or customization (unless wanted by the maintainers).
langflow:
backend:
initContainers:
- name: init-myservice
image: busybox:1.28
command:
[
"sh",
"-c",
"until nslookup myservice.$(cat /var/run/secrets/kubernetes.io/serviceaccount/namespace).svc.cluster.local; do echo waiting for myservice; sleep 2; done",
]Then in the template itself for the backend stateful set would use toYaml to apply it.
(The example below purposefully removes the many key/value pairs for simplifying the presentation.)
apiVersion: apps/v1
kind: StatefulSet
spec:
template:
spec:
{{- with .Values.langflow.backend.initContainers }}
initContainers:
{{- toYaml . | nindent 8 }}
{{- end }}