From 09bb782ff9713f63df232c5db271419236a5bfbc Mon Sep 17 00:00:00 2001 From: Michael Mraka Date: Wed, 22 May 2024 15:57:47 +0200 Subject: [PATCH] RHINENG-9873: move defaults from clowdapp.yaml into code to make easier overrides --- base/core/config.go | 2 +- conf/listener.env | 2 +- conf/test.env | 2 +- deploy/clowdapp.yaml | 4 ++-- listener/listener.go | 4 ++-- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/base/core/config.go b/base/core/config.go index c58bbf5ee..62a7c9c3e 100644 --- a/base/core/config.go +++ b/base/core/config.go @@ -11,7 +11,7 @@ var ( DefaultLimit = 20 DefaultOffset = 0 testSetupRan = false - dbWait = utils.PodConfig.GetString("wait_for_db", "UNSET") + dbWait = utils.PodConfig.GetString("wait_for_db", "empty") ) func ConfigureApp() { diff --git a/conf/listener.env b/conf/listener.env index a60347ef8..59fb149c5 100644 --- a/conf/listener.env +++ b/conf/listener.env @@ -1,4 +1,4 @@ DB_USER=listener DB_PASSWD=listener -POD_CONFIG=allowed_reporters=puptoo,rhsm-system-profile-bridge;excluded_host_types=edge +POD_CONFIG= diff --git a/conf/test.env b/conf/test.env index 722165a75..dc71315fa 100644 --- a/conf/test.env +++ b/conf/test.env @@ -10,4 +10,4 @@ DB_PASSWD=passwd LIMIT_PAGE_SIZE=false # don't put "" or '' around the text otherwise they'll be included into content -POD_CONFIG=label=upload;vmaas_call_max_retries=100;baseline_change_eval=false;update_users;update_db_config;allowed_reporters=puptoo,rhsm-system-profile-bridge;excluded_host_types=edge;use_testing_db +POD_CONFIG=label=upload;vmaas_call_max_retries=100;baseline_change_eval=false;update_users;update_db_config;use_testing_db diff --git a/deploy/clowdapp.yaml b/deploy/clowdapp.yaml index 40a7e0280..325d3163f 100644 --- a/deploy/clowdapp.yaml +++ b/deploy/clowdapp.yaml @@ -522,7 +522,7 @@ parameters: - {name: RES_REQUEST_MEM_LISTENER, value: 192Mi} - {name: ENABLE_PROFILER_LISTENER, value: 'false'} - {name: GOMEMLIMIT_LISTENER, value: '172MiB'} # set to 90% of the default memory limit 192Mi (don't forget `B`) -- {name: LISTENER_CONFIG, value: 'allowed_reporters=puptoo,rhsm-system-profile-bridge;excluded_host_types=edge'} +- {name: LISTENER_CONFIG, value: ''} # Evaluator - {name: GOGC, value: '100'} @@ -590,7 +590,7 @@ parameters: - {name: RES_REQUEST_CPU_DATABASE_ADMIN, value: 100m} - {name: RES_REQUEST_MEM_DATABASE_ADMIN, value: 128Mi} - {name: GOMEMLIMIT_DATABASE_ADMIN, value: '115MiB'} # set to 90% of the default memory limit 128Mi (don't forget `B`) -- {name: DATABASE_ADMIN_CONFIG, value: 'wait_for_db=empty'} # Set 'schema_version=XXX' if need specific database schema +- {name: DATABASE_ADMIN_CONFIG, value: ''} # Set 'schema_version=XXX' if need specific database schema # 'force_schema_version=XXX' to reset the dirty flag to false and force the specific version, it will follow up with the schema upgrade defined by schema_version # Common parameters diff --git a/listener/listener.go b/listener/listener.go index bd17fef7e..528e808ad 100644 --- a/listener/listener.go +++ b/listener/listener.go @@ -52,9 +52,9 @@ func configureListener() { templatesConsumers = utils.PodConfig.GetInt("template_consumers", 1) } // Comma-separated list of reporters to include into processing - allowedReporters = utils.PodConfig.GetStringSet("allowed_reporters", "") + allowedReporters = utils.PodConfig.GetStringSet("allowed_reporters", "puptoo,rhsm-system-profile-bridge") // Comma-separated list of host types to exclude from processing - excludedHostTypes = utils.PodConfig.GetStringSet("excluded_host_types", "") + excludedHostTypes = utils.PodConfig.GetStringSet("excluded_host_types", "edge") // Toggle bypass (fake) messages processing enableBypass = utils.PodConfig.GetBool("bypass", false) // How long to collect upload messages before grouping them and sending to evaluator