|
4 | 4 | "encoding/json" |
5 | 5 | "fmt" |
6 | 6 | "os" |
7 | | - "strconv" |
8 | 7 | "strings" |
9 | 8 |
|
10 | 9 | "github.com/rs/zerolog/log" |
@@ -86,13 +85,6 @@ type ClickhouseConfig struct { |
86 | 85 | ChainBasedConfig map[string]TableOverrideConfig `mapstructure:"chainBasedConfig"` |
87 | 86 | EnableParallelViewProcessing bool `mapstructure:"enableParallelViewProcessing"` |
88 | 87 | MaxQueryTime int `mapstructure:"maxQueryTime"` |
89 | | - |
90 | | - // Readonly configuration for API endpoints |
91 | | - ReadonlyHost string `mapstructure:"readonlyHost"` |
92 | | - ReadonlyPort int `mapstructure:"readonlyPort"` |
93 | | - ReadonlyUsername string `mapstructure:"readonlyUsername"` |
94 | | - ReadonlyPassword string `mapstructure:"readonlyPassword"` |
95 | | - ReadonlyDatabase string `mapstructure:"readonlyDatabase"` |
96 | 88 | } |
97 | 89 |
|
98 | 90 | type PostgresConfig struct { |
@@ -290,35 +282,5 @@ func setCustomJSONConfigs() error { |
290 | 282 | Cfg.Storage.Main.Clickhouse.ChainBasedConfig = orchestratorChainConfig |
291 | 283 | } |
292 | 284 | } |
293 | | - |
294 | | - // Load readonly ClickHouse configuration from environment variables |
295 | | - if readonlyHost := os.Getenv("CLICKHOUSE_HOST_READONLY"); readonlyHost != "" { |
296 | | - if Cfg.Storage.Main.Clickhouse != nil { |
297 | | - Cfg.Storage.Main.Clickhouse.ReadonlyHost = readonlyHost |
298 | | - } |
299 | | - } |
300 | | - if readonlyPort := os.Getenv("CLICKHOUSE_PORT_READONLY"); readonlyPort != "" { |
301 | | - if port, err := strconv.Atoi(readonlyPort); err == nil { |
302 | | - if Cfg.Storage.Main.Clickhouse != nil { |
303 | | - Cfg.Storage.Main.Clickhouse.ReadonlyPort = port |
304 | | - } |
305 | | - } |
306 | | - } |
307 | | - if readonlyUsername := os.Getenv("CLICKHOUSE_USER_READONLY"); readonlyUsername != "" { |
308 | | - if Cfg.Storage.Main.Clickhouse != nil { |
309 | | - Cfg.Storage.Main.Clickhouse.ReadonlyUsername = readonlyUsername |
310 | | - } |
311 | | - } |
312 | | - if readonlyPassword := os.Getenv("CLICKHOUSE_PASSWORD_READONLY"); readonlyPassword != "" { |
313 | | - if Cfg.Storage.Main.Clickhouse != nil { |
314 | | - Cfg.Storage.Main.Clickhouse.ReadonlyPassword = readonlyPassword |
315 | | - } |
316 | | - } |
317 | | - if readonlyDatabase := os.Getenv("CLICKHOUSE_DATABASE_READONLY"); readonlyDatabase != "" { |
318 | | - if Cfg.Storage.Main.Clickhouse != nil { |
319 | | - Cfg.Storage.Main.Clickhouse.ReadonlyDatabase = readonlyDatabase |
320 | | - } |
321 | | - } |
322 | | - |
323 | 285 | return nil |
324 | 286 | } |
0 commit comments