mirror of
https://github.com/hyperdxio/hyperdx
synced 2026-04-21 13:37:15 +00:00
fix: add TLS parameters for https ClickHouse endpoints in goose DB string (#1689)
Need to add `secure=true&skip_verify=false` TLS params for https (CHC) Ref: https://github.com/pressly/goose/pull/796/changes
This commit is contained in:
parent
ea56d11f8b
commit
683ec1a80e
2 changed files with 10 additions and 2 deletions
5
.changeset/odd-maps-drive.md
Normal file
5
.changeset/odd-maps-drive.md
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
"@hyperdx/otel-collector": patch
|
||||
---
|
||||
|
||||
fix: add TLS parameters for https ClickHouse endpoints in goose DB string
|
||||
|
|
@ -16,9 +16,12 @@ if [ "$HYPERDX_OTEL_EXPORTER_CREATE_LEGACY_SCHEMA" != "true" ]; then
|
|||
# Build goose connection string from environment variables
|
||||
# CLICKHOUSE_ENDPOINT format: tcp://host:port, http://host:port, or https://host:port
|
||||
# Note: database is not specified here since SQL files use ${DATABASE} prefix explicitly
|
||||
# For https:// endpoints, add secure=true&skip_verify=false for TLS as required by the goose ClickHouse driver
|
||||
case "$CLICKHOUSE_ENDPOINT" in
|
||||
*\?*) GOOSE_DBSTRING="${CLICKHOUSE_ENDPOINT}&username=${DB_USER}&password=${DB_PASSWORD}" ;;
|
||||
*) GOOSE_DBSTRING="${CLICKHOUSE_ENDPOINT}?username=${DB_USER}&password=${DB_PASSWORD}" ;;
|
||||
https://*\?*) GOOSE_DBSTRING="${CLICKHOUSE_ENDPOINT}&username=${DB_USER}&password=${DB_PASSWORD}&secure=true&skip_verify=false" ;;
|
||||
https://*) GOOSE_DBSTRING="${CLICKHOUSE_ENDPOINT}?username=${DB_USER}&password=${DB_PASSWORD}&secure=true&skip_verify=false" ;;
|
||||
*\?*) GOOSE_DBSTRING="${CLICKHOUSE_ENDPOINT}&username=${DB_USER}&password=${DB_PASSWORD}" ;;
|
||||
*) GOOSE_DBSTRING="${CLICKHOUSE_ENDPOINT}?username=${DB_USER}&password=${DB_PASSWORD}" ;;
|
||||
esac
|
||||
|
||||
# Create temporary directory for processed SQL files
|
||||
|
|
|
|||
Loading…
Reference in a new issue