Skip to content

netbird: db-seed init container fails when database password contains URL-special characters #32

@mikkeldamsgaard

Description

@mikkeldamsgaard

Bug

The db-seed init container in the netbird-server pod fails to connect to PostgreSQL when the database password contains URL-special characters (@, %, !, etc.).

Root Cause

The seed.yaml template in the netbird-server configmap constructs a URL-style connection string:

postgres://postgres:{{ env.DB_PASSWORD }}@host:5432/?sslmode=disable

When DB_PASSWORD contains @, it is parsed as the userinfo/host delimiter, breaking the URI. % is interpreted as percent-encoding. The TCP connectivity check (db-wait) passes because it only tests the socket, not auth/parsing.

Suggested Fix

Either:

  1. URL-encode {{ env.DB_PASSWORD }} before embedding it in the connection URI, or
  2. Switch seed.yaml to a DSN-style connection string (host=... password=...) which does not require encoding.

Environment

  • Chart: netbird-0.2.1
  • initium: 1.2.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions