[GH-ISSUE #257] [question/request] CloudNative Postgres (CNPG) Support? #90

Closed
opened 2026-10-18 21:05:51 +00:00 by bsakaguchi · 2 comments
Owner

Originally created by @chr0n1x on GitHub (Jun 21, 2025).
Original GitHub issue: https://github.com/open-webui/helm-charts/issues/257

Hello,

I see in the workload manager that there's an option to inject a postgres DB URL.

I personally use CNPG to manage application databases: https://github.com/cloudnative-pg/charts

This chart/operator spins up a DB/cluster, pvc, replicas, etc AND has init container/configs that allow me to auto-generate user accounts + passwords, writing those secrets to a namespace.

I'm wondering -- are there any plans on supporting k8s secrets in the db config for this chart? I'm not too familiar with the open-webui container env-vars and am wondering if instead of using DATABASE_URL if it is, or would eventually be, possible to do something like this instead:

# somewhere in workload-manager.yaml
spec:
    template:
        metadata:
            spec:
            # ...
            containers:
            # ...
            - name: {{ .Chart.Name }}
              # ...
              env:
                - name: DATABASE_USER
                   valueFrom:
                     secretKeyRef:
                       name: {{ .Values.postgres.auth.secret.name }}
                       key: {{ .Values.postgres.auth.secret.userKey }}
                - name: DATABASE_PASSWORD
                     secretKeyRef:
                       name: {{ .Values.postgres.auth.secret.name }}
                       key: {{ .Values.postgres.auth.secret.passwordKey }}
                - name: DATABASE_URL
                   value: my-cnpg-db-cluster-svc.openwebui.svc.cluster.local
                - name: DATABASE_PORT
                   value: 5432
Originally created by @chr0n1x on GitHub (Jun 21, 2025). Original GitHub issue: https://github.com/open-webui/helm-charts/issues/257 Hello, I see in [the workload manager](https://github.com/open-webui/helm-charts/blob/main/charts/open-webui/templates/workload-manager.yaml#L240-L243) that there's an option to inject a postgres DB URL. I personally use CNPG to manage application databases: https://github.com/cloudnative-pg/charts This chart/operator spins up a DB/cluster, pvc, replicas, etc _AND_ has init container/configs that allow me to auto-generate user accounts + passwords, writing those secrets to a namespace. I'm wondering -- are there any plans on supporting k8s secrets in the db config for this chart? I'm not too familiar with the open-webui container env-vars and am wondering if instead of using `DATABASE_URL` if it is, or would eventually be, possible to do something like this instead: ```yaml # somewhere in workload-manager.yaml spec: template: metadata: spec: # ... containers: # ... - name: {{ .Chart.Name }} # ... env: - name: DATABASE_USER valueFrom: secretKeyRef: name: {{ .Values.postgres.auth.secret.name }} key: {{ .Values.postgres.auth.secret.userKey }} - name: DATABASE_PASSWORD secretKeyRef: name: {{ .Values.postgres.auth.secret.name }} key: {{ .Values.postgres.auth.secret.passwordKey }} - name: DATABASE_URL value: my-cnpg-db-cluster-svc.openwebui.svc.cluster.local - name: DATABASE_PORT value: 5432 ```
Author
Owner

@ryanmrodriguez commented on GitHub (Jul 3, 2025):

Related: https://github.com/open-webui/open-webui/pull/15491

<!-- gh-comment-id:3031956223 --> @ryanmrodriguez commented on GitHub (Jul 3, 2025): Related: https://github.com/open-webui/open-webui/pull/15491
Author
Owner

@james-westbrook commented on GitHub (Jul 25, 2025):

Hey @chr0n1x, the best way to do this currently would be using extraEnvFrom (https://github.com/open-webui/helm-charts/blob/main/charts/open-webui/values.yaml#L366), which allows you to set values to existing secrets.

<!-- gh-comment-id:3119681927 --> @james-westbrook commented on GitHub (Jul 25, 2025): Hey @chr0n1x, the best way to do this currently would be using `extraEnvFrom` (https://github.com/open-webui/helm-charts/blob/main/charts/open-webui/values.yaml#L366), which allows you to set values to existing secrets.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
open-webui/helm-charts#90
No description provided.