feat(open-webui): add optional command args overrides for open-webui copyAppData init container

This commit is contained in:
Blake Driggers 2025-06-12 10:46:36 -05:00
parent ce05f9ee38
commit fab19a9666
3 changed files with 13 additions and 1 deletions

View File

@ -172,6 +172,8 @@ helm upgrade --install open-webui open-webui/open-webui
| command | list | `[]` | Open WebUI container command (overrides default entrypoint) |
| commonEnvVars | list | `[]` | Env vars added to the Open WebUI deployment, common across environments. Most up-to-date environment variables can be found here: https://docs.openwebui.com/getting-started/env-configuration/ (caution: environment variables defined in both `extraEnvVars` and `commonEnvVars` will result in a conflict. Avoid duplicates) |
| containerSecurityContext | object | `{}` | Configure container security context ref: <https://kubernetes.io/docs/tasks/configure-pod-container/security-context/#set-the-security-context-for-a-containe> |
| copyAppData.args | list | `[]` | Open WebUI copy-app-data init container arguments (overrides default) |
| copyAppData.command | list | `[]` | Open WebUI copy-app-data init container command (overrides default) |
| copyAppData.resources | object | `{}` | |
| databaseUrl | string | `""` | Configure database URL, needed to work with Postgres (example: `postgresql://<user>:<password>@<service>:<port>/<database>`), leave empty to use the default sqlite database |
| enableOpenaiApi | bool | `true` | Enables the use of OpenAI APIs |

View File

@ -52,7 +52,12 @@ spec:
image: {{ .repository }}:{{ .tag | default $.Chart.AppVersion }}
imagePullPolicy: {{ .pullPolicy }}
{{- end }}
command: ['sh', '-c', 'cp -R -n /app/backend/data/* /tmp/app-data/']
command:
{{- toYaml (.Values.copyAppData.command | default (list "sh" "-c" "cp -R -n /app/backend/data/* /tmp/app-data/")) | nindent 10 }}
{{- with .Values.copyAppData.args }}
args:
{{- toYaml . | nindent 10 }}
{{- end }}
{{- with .Values.containerSecurityContext }}
securityContext:
{{- toYaml . | nindent 10 }}

View File

@ -181,6 +181,11 @@ startupProbe: {}
resources: {}
copyAppData:
# -- Open WebUI copy-app-data init container command (overrides default)
command: []
# -- Open WebUI copy-app-data init container arguments (overrides default)
args: []
resources: {}
managedCertificate: