Skip to content

sqlEndpointNew incorrectly put options directly after port #186

@stdrc

Description

@stdrc

When metaStore.passSQLCredentialsLegacyMode is false (by default), risingwave.sqlEndpoint will be defined as risingwave.sqlEndpointNew. The latter is constructed in the format of:

{{- printf "%s:%d?%s"
    .Values.metaStore.postgresql.host (.Values.metaStore.postgresql.port | int)
    (include "common.convertConnectionOptions" .Values.metaStore.postgresql.options) }}

when postgresql.options is given (in https://github.com/risingwavelabs/helm-charts/blob/996e70f7747b4bc12c6aa0979759370a62a61355/charts/risingwave/templates/_helpers.tpl). This will generate endpoint url like host:1234?sslmode=require. The url will then be assigned to RW_SQL_ENDPOINT, and passed to META node via this match arm:

Image

causing the meta node to use sql endpoint like postgres://user:pass@host:1234?sslmode=require/dbname.

While on the other hand when legacy mode is true, the _helpers.tpl will construct the endpoint url correctly to something like postgres://user:pass@host:1234/dbname?sslmode=require and pass it to META via this match arm:

Image

In this case everything will work.

Metadata

Metadata

Assignees

No one assigned

    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