Skip to content

Commit

Permalink
Add health and metrics port mapping for placement stand-alone mode (#…
Browse files Browse the repository at this point in the history
…1323)

* Add health and metrics port mapping for placement stand-alone mode

Signed-off-by: Anton Troshin <anton@diagrid.io>

* move ports declaration to const

Signed-off-by: Anton Troshin <anton@diagrid.io>

* Fix linter check: appendCombine: can combine chain of 3 appends into one (gocritic)

Signed-off-by: Anton Troshin <anton@diagrid.io>

---------

Signed-off-by: Anton Troshin <anton@diagrid.io>
Co-authored-by: Artur Souza <artursouza.ms@outlook.com>
  • Loading branch information
antontroshin and artursouza authored Aug 8, 2023
1 parent 650fd6f commit 60f50e3
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion pkg/standalone/standalone.go
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,9 @@ const (
DaprZipkinContainerName = "dapr_zipkin"

errInstallTemplate = "please run `dapr uninstall` first before running `dapr init`"

healthPort = 58080
metricPort = 59090
)

var (
Expand Down Expand Up @@ -520,7 +523,10 @@ func runPlacementService(wg *sync.WaitGroup, errorChan chan<- error, info initIn
}

args = append(args,
"-p", fmt.Sprintf("%v:50005", osPort))
"-p", fmt.Sprintf("%v:50005", osPort),
"-p", fmt.Sprintf("%v:8080", healthPort),
"-p", fmt.Sprintf("%v:9090", metricPort),
)
}

args = append(args, image)
Expand Down

0 comments on commit 60f50e3

Please sign in to comment.