diff --git a/quesma/clickhouse/connection.go b/quesma/clickhouse/connection.go index d699a337f..770f7c97a 100644 --- a/quesma/clickhouse/connection.go +++ b/quesma/clickhouse/connection.go @@ -24,8 +24,9 @@ func initDBConnection(c config.QuesmaConfiguration, tlsConfig *tls.Config) *sql. Database: c.ClickHouse.Database, } } - - options.TLS = tlsConfig + if !c.ClickHouse.DisableTLS { + options.TLS = tlsConfig + } info := struct { Name string diff --git a/quesma/config.yaml.template b/quesma/config.yaml.template index ded752c56..832ae4f44 100644 --- a/quesma/config.yaml.template +++ b/quesma/config.yaml.template @@ -13,6 +13,7 @@ connectors: type: "clickhouse-os" # one of [clickhouse, clickhouse-os, hydrolix] #clickhouse: # this config is going to be removed, but for now let's just comment out # url: "clickhouse://localhost:9000" +# disableTLS: true # required for plaintext connections ingestStatistics: true internalTelemetryUrl: "https://api.quesma.com/phone-home" logging: diff --git a/quesma/quesma/config/config.go b/quesma/quesma/config/config.go index 2215ff12b..14b1abd18 100644 --- a/quesma/quesma/config/config.go +++ b/quesma/quesma/config/config.go @@ -62,6 +62,7 @@ type RelationalDbConfiguration struct { Password string `koanf:"password"` Database string `koanf:"database"` AdminUrl *Url `koanf:"adminUrl"` + DisableTLS bool `koanf:"disableTLS"` } type OptimizerConfiguration struct {