From dd7589323e673d0bc36d5028756d60f52e332f43 Mon Sep 17 00:00:00 2001 From: Jose Diaz-Gonzalez Date: Wed, 23 Jul 2025 20:47:46 -0400 Subject: [PATCH] feat: implement fetching the process-specific kustomize root path --- plugins/scheduler-k3s/functions.go | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/plugins/scheduler-k3s/functions.go b/plugins/scheduler-k3s/functions.go index 10328d9d2..16b9a1ab6 100644 --- a/plugins/scheduler-k3s/functions.go +++ b/plugins/scheduler-k3s/functions.go @@ -1500,7 +1500,17 @@ func getStartCommand(input StartCommandInput) (StartCommandOutput, error) { } func getProcessSpecificKustomizeRootPath(appName string) string { - return "" + if !hasKustomizeDirectory(appName) { + return "" + } + + directory := getKustomizeDirectory(appName) + processSpecificDirectory := fmt.Sprintf("%s.%s", directory, os.Getenv("DOKKU_PID")) + if common.DirectoryExists(processSpecificDirectory) { + return processSpecificDirectory + } + + return directory } func hasKustomizeDirectory(appName string) bool {