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] 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