From 2aea7032efb43d6fff4c7280b59fda371030ab4a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20Dugovi=C4=8D?= Date: Thu, 19 Sep 2024 10:56:51 +0200 Subject: [PATCH 1/2] RHINENG-10032: fix repack job db user --- deploy/clowdapp.yaml | 4 ---- tasks/repack/repack.go | 4 ++-- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/deploy/clowdapp.yaml b/deploy/clowdapp.yaml index bbaed01d6..274c6d986 100644 --- a/deploy/clowdapp.yaml +++ b/deploy/clowdapp.yaml @@ -422,10 +422,6 @@ objects: - {name: LOG_LEVEL, value: '${LOG_LEVEL_JOBS}'} - {name: GIN_MODE, value: '${GIN_MODE}'} - {name: DB_DEBUG, value: '${DB_DEBUG_JOBS}'} - - {name: DB_USER, value: vmaas_sync} - - {name: DB_PASSWD, valueFrom: {secretKeyRef: {name: patchman-engine-database-passwords, - key: vmaas-sync-database-password}}} - - {name: PROMETHEUS_PUSHGATEWAY,value: '${PROMETHEUS_PUSHGATEWAY}'} - {name: POD_CONFIG, value: '${JOBS_CONFIG}'} database: diff --git a/tasks/repack/repack.go b/tasks/repack/repack.go index 53a2ca330..9e28ca4e1 100644 --- a/tasks/repack/repack.go +++ b/tasks/repack/repack.go @@ -15,7 +15,7 @@ var pgRepackArgs = []string{ "-d", utils.CoreCfg.DBName, "-h", utils.CoreCfg.DBHost, "-p", fmt.Sprintf("%d", utils.CoreCfg.DBPort), - "-U", utils.CoreCfg.DBUser, + "-U", utils.CoreCfg.DBAdminUser, } func configure() { @@ -29,7 +29,7 @@ func getCmd(table string, args ...string) *exec.Cmd { fullArgs = append(fullArgs, "-I", table) fullArgs = append(fullArgs, args...) cmd := exec.Command("pg_repack", fullArgs...) - cmd.Env = append(os.Environ(), fmt.Sprintf("PGPASSWORD=%s", utils.CoreCfg.DBPassword)) + cmd.Env = append(os.Environ(), fmt.Sprintf("PGPASSWORD=%s", utils.CoreCfg.DBAdminPassword)) cmd.Stdout = os.Stdout cmd.Stderr = os.Stderr return cmd From e3b81eac3d26d384b8b24504233e4fb6cb101c47 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20Dugovi=C4=8D?= Date: Thu, 19 Sep 2024 11:30:24 +0200 Subject: [PATCH 2/2] RHINENG-10032: update repack job schedule --- deploy/clowdapp.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/deploy/clowdapp.yaml b/deploy/clowdapp.yaml index 274c6d986..30367af7c 100644 --- a/deploy/clowdapp.yaml +++ b/deploy/clowdapp.yaml @@ -622,7 +622,7 @@ parameters: - {name: ADVISORY_REFRESH_SCHEDULE, value: '*/15 * * * *'} # Cronjob schedule definition - {name: ADVISORY_REFRESH_SUSPEND, value: 'true'} # Disable cronjob execution # Repack -- {name: REPACK_SCHEDULE, value: '0 11 * * 1'} # Cronjob schedule definition +- {name: REPACK_SCHEDULE, value: '0 11 * * 5'} # Cronjob schedule definition - {name: REPACK_SUSPEND, value: 'false'} # Disable cronjob execution