[question/request] CloudNative Postgres (CNPG) Support? #90

Closed
opened 2026-02-15 19:16:10 -05:00 by yindo · 2 comments
Owner

Originally created by @chr0n1x on GitHub (Jun 21, 2025).

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). 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 ```
yindo closed this issue 2026-02-15 19:16:11 -05:00
Author
Owner

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

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

@ryanmrodriguez commented on GitHub (Jul 3, 2025): Related: https://github.com/open-webui/open-webui/pull/15491
Author
Owner

@westbrook-ai 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.

@westbrook-ai 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.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: open-webui/helm-charts#90