feat: implement cluster joining for server and worker nodes

Different options get applied to each depending on what is needed for the role.

This also updates how we initialize the cluster to better support how metrics exposure and cross-server networking.
This commit is contained in:
Jose Diaz-Gonzalez committed 2024-01-23 03:00:27 -05:00
1 parent af3009f0da
commit 69e9511666
7 files changed
+593 -29

No files matched your search

+4 -4
View File
@@ -713,24 +713,24 @@ func TriggerSchedulerRun(scheduler string, appName string, envCount int, args []
dokkuRmContainer := os.Getenv("DOKKU_RM_CONTAINER")
if dokkuRmContainer == "" {
appRmContainer, err := common.CallPlugnTrigger(common.PlugnTriggerInput{
resp, err := common.CallPlugnTrigger(common.PlugnTriggerInput{
Trigger: "config-get",
Args: []string{appName, "DOKKU_RM_CONTAINER"},
CaptureOutput: true,
StreamStdio: false,
})
if err != nil {
globalRmContainer, err := common.CallPlugnTrigger(common.PlugnTriggerInput{
resp, err := common.CallPlugnTrigger(common.PlugnTriggerInput{
Trigger: "config-get-global",
Args: []string{"DOKKU_RM_CONTAINER"},
CaptureOutput: true,
StreamStdio: false,
})
if err == nil {
dokkuRmContainer = globalRmContainer.Stdout
dokkuRmContainer = strings.TrimSpace(resp.Stdout)
}
} else {
dokkuRmContainer = appRmContainer.Stdout
dokkuRmContainer = strings.TrimSpace(resp.Stdout)
}
}
if dokkuRmContainer == "" {