chore: Expose all DSN flags in all-in-one
@@ -169,18 +169,8 @@ pub struct Config {
#[clap(flatten)]
object_store_config: ObjectStoreConfig,
- /// Postgres connection string. If not specified, will use an in-memory catalog.
- #[clap(long = "--catalog-dsn", env = "INFLUXDB_IOX_CATALOG_DSN", action)]
- pub dsn: Option<String>,
-
- /// Schema name for PostgreSQL-based catalogs.
- #[clap(
- long = "--catalog-postgres-schema-name",
- env = "INFLUXDB_IOX_CATALOG_POSTGRES_SCHEMA_NAME",
- default_value = iox_catalog::postgres::PostgresConnectionOptions::DEFAULT_SCHEMA_NAME,
- action,
- )]
- pub postgres_schema_name: String,
+ #[clap(flatten)]
+ catalog_dsn: CatalogDsnConfig,
/// The ingester will continue to pull data and buffer it from the write buffer
/// as long as it is below this size. If it hits this size it will pause
@@ -341,8 +331,7 @@ impl Config {
tracing_config,
max_http_request_size,
object_store_config,
- dsn,
- postgres_schema_name,
+ catalog_dsn,
pause_ingest_size_bytes,
persist_memory_threshold_bytes,
persist_partition_size_threshold_bytes,
@@ -370,9 +359,11 @@ impl Config {
};
let write_buffer_config = WriteBufferConfig::new(QUERY_POOL_NAME, database_directory);
- let catalog_dsn = dsn
- .map(|postgres_url| CatalogDsnConfig::new_postgres(postgres_url, postgres_schema_name))
- .unwrap_or_else(CatalogDsnConfig::new_memory);
+ let catalog_dsn = if catalog_dsn.dsn.is_none() {
+ CatalogDsnConfig::new_memory()
+ } else {
+ catalog_dsn
+ };
let router_run_config = RunConfig::new(
logging_config,
