mirror of https://github.com/dapr/cli.git
Scheduler: set broadcast address to localhost:50006 in selfhosted (#1480)
* Scheduler: set broadcast address to localhost:50006 in selfhosted Signed-off-by: joshvanl <me@joshvanl.dev> * Set schedulder override flag for edge and dev Signed-off-by: joshvanl <me@joshvanl.dev> --------- Signed-off-by: joshvanl <me@joshvanl.dev>
This commit is contained in:
parent
953c4a2a3f
commit
8ce6b9fed9
|
@ -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)
|
||||
|
@ -696,6 +700,21 @@ func runSchedulerService(wg *sync.WaitGroup, errorChan chan<- error, info initIn
|
|||
errorChan <- nil
|
||||
}
|
||||
|
||||
func schedulerOverrideHostPort(info initInfo) bool {
|
||||
if info.runtimeVersion == "edge" || info.runtimeVersion == "dev" {
|
||||
return true
|
||||
}
|
||||
|
||||
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")
|
||||
|
|
Loading…
Reference in New Issue