Skip to content

Commit

Permalink
RHINENG-10032: fix repack job db user
Browse files Browse the repository at this point in the history
  • Loading branch information
Dugowitch authored and psegedy committed Sep 19, 2024
1 parent 8672c46 commit 76650e0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
4 changes: 0 additions & 4 deletions deploy/clowdapp.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
4 changes: 2 additions & 2 deletions tasks/repack/repack.go
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand All @@ -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
Expand Down

0 comments on commit 76650e0

Please sign in to comment.