Use regular conf oclib library instead of custom implem to leverage env variable injection fonctionality; Dockerfile refactor

This commit is contained in:
plm
2025-01-14 18:33:51 +01:00
parent 7d78920304
commit 8ddb119899
9 changed files with 31 additions and 27 deletions

View File

@@ -5,6 +5,7 @@ import (
"oc-schedulerd/conf"
"os/exec"
oclib "cloud.o-forge.io/core/oc-lib"
"github.com/rs/zerolog"
)
@@ -30,7 +31,7 @@ func (lm *LocalMonitor) LaunchLocalMonitor() {
}
func (lm *LocalMonitor) execLocalKube() {
args := []string{"-e", lm.ExecutionID, "-u", lm.LokiURL, "-m", conf.GetConfig().MongoUrl, "-d", conf.GetConfig().DBName}
args := []string{"-e", lm.ExecutionID, "-u", lm.LokiURL, "-m", oclib.GetConfig().MongoUrl, "-d", oclib.GetConfig().MongoDatabase}
if lm.Duration > 0 {
args = append(args, "-t", fmt.Sprintf("%d", lm.Duration))
}