feat(open-webui): Make it possible to configure Google Cloud Storage Application Credentials JSON file via k8s secrets

Signed-off-by: Mario Trangoni <mjtrangoni@gmail.com>
This commit is contained in:
Mario Trangoni 2025-05-06 09:05:00 +02:00
parent e6c33ca07c
commit 86e42681ca
3 changed files with 25 additions and 3 deletions

View File

@ -51,6 +51,15 @@ helm upgrade --install open-webui open-webui/open-webui
| persistence.azure.keyExistingSecret | string | `""` | Set the access key for Azure Storage from existing secret | | persistence.azure.keyExistingSecret | string | `""` | Set the access key for Azure Storage from existing secret |
| persistence.azure.keyExistingSecretKey | string | `""` | Set the access key for Azure Storage from existing secret key | | persistence.azure.keyExistingSecretKey | string | `""` | Set the access key for Azure Storage from existing secret key |
### Google Cloud Storage configuration
| Key | Type | Default | Description |
|-----|------|---------|-------------|
| persistence.gcs.appCredentialsJson | string | `""` | Contents of Google Application Credentials JSON file (ignored if appCredentialsJsonExistingSecret is set). Optional - if not provided, credentials will be taken from the environment. User credentials if run locally and Google Metadata server if run on a Google Compute Engine. File can be generated for a service account following this guide: https://developers.google.com/workspace/guides/create-credentials#service-account |
| persistence.gcs.appCredentialsJsonExistingSecret | string | `""` | Set the Google Application Credentials JSON file for Google Cloud Storage from existing secret |
| persistence.gcs.appCredentialsJsonExistingSecretKey | string | `""` | Set the Google Application Credentials JSON file for Google Cloud Storage from existing secret key |
| persistence.gcs.bucket | string | `""` | Sets the bucket name for Google Cloud Storage. Bucket must already exist |
### SSO Configuration ### SSO Configuration
| Key | Type | Default | Description | | Key | Type | Default | Description |
@ -165,8 +174,6 @@ helm upgrade --install open-webui open-webui/open-webui
| persistence.annotations | object | `{}` | | | persistence.annotations | object | `{}` | |
| persistence.enabled | bool | `true` | | | persistence.enabled | bool | `true` | |
| persistence.existingClaim | string | `""` | Use existingClaim if you want to re-use an existing Open WebUI PVC instead of creating a new one | | persistence.existingClaim | string | `""` | Use existingClaim if you want to re-use an existing Open WebUI PVC instead of creating a new one |
| persistence.gcs.appCredentialsJson | string | `""` | Contents of Google Application Credentials JSON file. Optional - if not provided, credentials will be taken from the environment. User credentials if run locally and Google Metadata server if run on a Google Compute Engine. File can be generated for a service account following this guide: https://developers.google.com/workspace/guides/create-credentials#service-account |
| persistence.gcs.bucket | string | `""` | Sets the bucket name for Google Cloud Storage. Bucket must already exist |
| persistence.provider | string | `"local"` | Sets the storage provider, availables values are `local`, `s3`, `gcs` or `azure` | | persistence.provider | string | `"local"` | Sets the storage provider, availables values are `local`, `s3`, `gcs` or `azure` |
| persistence.s3.accessKey | string | `""` | Sets the access key ID for S3 storage | | persistence.s3.accessKey | string | `""` | Sets the access key ID for S3 storage |
| persistence.s3.bucket | string | `""` | Sets the bucket name for S3 storage | | persistence.s3.bucket | string | `""` | Sets the bucket name for S3 storage |

View File

@ -172,7 +172,14 @@ spec:
- name: "STORAGE_PROVIDER" - name: "STORAGE_PROVIDER"
value: {{ .Values.persistence.provider }} value: {{ .Values.persistence.provider }}
- name: "GOOGLE_APPLICATION_CREDENTIALS_JSON" - name: "GOOGLE_APPLICATION_CREDENTIALS_JSON"
{{- if .Values.persistence.gcs.appCredentialsJsonExistingSecret }}
valueFrom:
secretKeyRef:
name: {{ .Values.persistence.gcs.appCredentialsJsonExistingSecret }}
key: {{ .Values.persistence.gcs.appCredentialsJsonExistingSecretKey }}
{{- else }}
value: {{ .Values.persistence.gcs.appCredentialsJson }} value: {{ .Values.persistence.gcs.appCredentialsJson }}
{{- end }}
- name: "GCS_BUCKET_NAME" - name: "GCS_BUCKET_NAME"
value: {{ .Values.persistence.gcs.bucket }} value: {{ .Values.persistence.gcs.bucket }}
{{- else if eq .Values.persistence.provider "azure" }} {{- else if eq .Values.persistence.provider "azure" }}

View File

@ -227,9 +227,17 @@ persistence:
# -- Sets the key prefix for a S3 object # -- Sets the key prefix for a S3 object
keyPrefix: "" keyPrefix: ""
gcs: gcs:
# -- Contents of Google Application Credentials JSON file. Optional - if not provided, credentials will be taken from the environment. User credentials if run locally and Google Metadata server if run on a Google Compute Engine. File can be generated for a service account following this guide: https://developers.google.com/workspace/guides/create-credentials#service-account # -- Contents of Google Application Credentials JSON file (ignored if appCredentialsJsonExistingSecret is set). Optional - if not provided, credentials will be taken from the environment. User credentials if run locally and Google Metadata server if run on a Google Compute Engine. File can be generated for a service account following this guide: https://developers.google.com/workspace/guides/create-credentials#service-account
# @section -- Google Cloud Storage configuration
appCredentialsJson: "" appCredentialsJson: ""
# -- Set the Google Application Credentials JSON file for Google Cloud Storage from existing secret
# @section -- Google Cloud Storage configuration
appCredentialsJsonExistingSecret: ""
# -- Set the Google Application Credentials JSON file for Google Cloud Storage from existing secret key
# @section -- Google Cloud Storage configuration
appCredentialsJsonExistingSecretKey: ""
# -- Sets the bucket name for Google Cloud Storage. Bucket must already exist # -- Sets the bucket name for Google Cloud Storage. Bucket must already exist
# @section -- Google Cloud Storage configuration
bucket: "" bucket: ""
azure: azure:
# -- Sets the endpoint URL for Azure Storage # -- Sets the endpoint URL for Azure Storage