Skip to content

Postgres password readed from secret keys #107

Open
@MarcinRybinski

Description

@MarcinRybinski

Hello Langfuse team,

Context

When deploying Langfuse with your Helm chart, I've encountered a small issue when providing postgres password from secretKey refs:

My configuration for postgres was:

postgresql:
  auth:
    username: postgres
    existingSecret: langfuse-postgresql-auth
    secretKeys:
      userPasswordKey: password

But the deployment was unsuccessfull. When I looked into definition of postgres StatefulSet, I've seen that:

- name: POSTGRES_PASSWORD
  valueFrom:
    secretKeyRef:
      key: postgres-password
      name: langfuse-postgresql-auth

The key was referencing to the postgres-password, but not to the password field.

I've looked into implementation of Postgresql Bitnami Helm Chart how they are creating POSTGRES_PASSWORD env variable and it seems like when the username for postgresql database is postgres, it is reaching out to the adminPasswordKey in secretKeys, but not to the userPasswordKey. If adminPasswordKey is missing in the configuration, it defaults to postgres-password key.
The solution to my problem was to change the userPasswordKey to adminPasswordKey:

postgresql:
  auth:
    username: postgres
    existingSecret: langfuse-postgresql-auth
    secretKeys:
      adminPasswordKey: password

And it worked.

Problem

I'm reaching out to you with this issue because:

  1. Default username in values.yaml is postgres
  2. You're referencing to the secretKeys: userPasswordKey in values.yaml which wont work because postgresql chart expect adminPasswordKey when the username is postgres

Proposed solution

I currently don't know which of the proposed solution would be the best, because I'm familiarized with the repo like you, but from my basic knowledge and understanding what's going on in your Helm chart, I see two options:

  1. Document this in the Readme
  2. Or change the way you set up DATABASE_PASSWORD

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions