🪣 feat: Init Containers and Custom ConfigMaps Support in Helm Chart (#10525)

This commit is contained in:
Adaptive Garage 2025-11-16 18:03:34 +01:00 committed by GitHub
parent 8c531b921e
commit 0a2f40cc50
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 52 additions and 0 deletions

View file

@ -0,0 +1,26 @@
{{- range $key, $value := .Values.additionalConfigMaps }}
{{- if or .data .binaryData }}
---
apiVersion: v1
kind: ConfigMap
metadata:
name: {{ include "librechat.fullname" $ }}-{{ default "custom" $key }}
{{- with .labels }}
labels:
{{- toYaml . | nindent 4 }}
{{- end }}
{{- with .annotations }}
annotations:
{{- toYaml . | nindent 4 }}
{{- end }}
{{- with .data }}
data:
{{- toYaml . | nindent 2 }}
{{- end }}
{{- with .binaryData }}
binaryData:
{{- toYaml . | nindent 2 }}
immutable: {{ default false .immutable }}
{{- end }}
{{- end }}
{{- end }}

View file

@ -51,6 +51,15 @@ spec:
serviceAccountName: {{ include "librechat.serviceAccountName" . }}
securityContext:
{{- toYaml .Values.podSecurityContext | nindent 8 }}
{{- if .Values.initContainers }}
initContainers:
{{- range $key, $value := .Values.initContainers }}
{{- if . }}
- name: {{ $key }}
{{- toYaml . | nindent 10 }}
{{- end }}
{{- end }}
{{- end }}
containers:
- name: {{ include "librechat.fullname" $ }}
securityContext:

View file

@ -219,6 +219,13 @@ readinessProbe:
path: /health
port: 3080
# Additional init containers on the output Deployment definition.
initContainers: {}
# foo: # the name of the init container
# image: busybox
# command: ['sh', '-c', 'echo The app is starting! && sleep 5']
# # ... add more init containers as needed
# Additional volumes on the output Deployment definition.
volumes: []
# - name: foo
@ -269,6 +276,16 @@ dnsConfig: {}
updateStrategy:
type: RollingUpdate
# Extra ConfigMaps to be created alongside the main ones
additionalConfigMaps: {}
# custom: # suffix of the ConfigMap name
# labels: {}
# annotations: {}
# data: {}
# binaryData: {}
# immutable: false
# # ... add more ConfigMaps as needed
# MongoDB Parameters
mongodb:
enabled: true