Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Scheduler: set broadcast address to localhost:50006 in selfhosted #1480

Merged
merged 2 commits into from
Jan 27, 2025
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions pkg/standalone/standalone.go
Original file line number Diff line number Diff line change
Expand Up @@ -683,6 +683,10 @@ func runSchedulerService(wg *sync.WaitGroup, errorChan chan<- error, info initIn
args = append(args, image, "--etcd-data-dir=/var/lock/dapr/scheduler")
}

if schedulerOverrideHostPort(info) {
args = append(args, "--override-broadcast-host-port=localhost:50006")
}

_, err = utils.RunCmdAndWait(runtimeCmd, args...)
if err != nil {
runError := isContainerRunError(err)
Expand All @@ -696,6 +700,17 @@ func runSchedulerService(wg *sync.WaitGroup, errorChan chan<- error, info initIn
errorChan <- nil
}

func schedulerOverrideHostPort(info initInfo) bool {
JoshVanL marked this conversation as resolved.
Show resolved Hide resolved
runV, err := semver.NewVersion(info.runtimeVersion)
if err != nil {
return true
}

v115rc5, _ := semver.NewVersion("1.15.0-rc.5")

return runV.GreaterThan(v115rc5)
}

func moveDashboardFiles(extractedFilePath string, dir string) (string, error) {
// Move /release/os/web directory to /web.
oldPath := path_filepath.Join(path_filepath.Dir(extractedFilePath), "web")
Expand Down
Loading