From 60f50e349790612b21db578672c9f25df3d5209f Mon Sep 17 00:00:00 2001 From: Anton Troshin Date: Tue, 8 Aug 2023 13:47:49 -0500 Subject: [PATCH] Add health and metrics port mapping for placement stand-alone mode (#1323) * Add health and metrics port mapping for placement stand-alone mode Signed-off-by: Anton Troshin * move ports declaration to const Signed-off-by: Anton Troshin * Fix linter check: appendCombine: can combine chain of 3 appends into one (gocritic) Signed-off-by: Anton Troshin --------- Signed-off-by: Anton Troshin Co-authored-by: Artur Souza --- pkg/standalone/standalone.go | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/pkg/standalone/standalone.go b/pkg/standalone/standalone.go index ce84c6a36..bd2761f82 100644 --- a/pkg/standalone/standalone.go +++ b/pkg/standalone/standalone.go @@ -78,6 +78,9 @@ const ( DaprZipkinContainerName = "dapr_zipkin" errInstallTemplate = "please run `dapr uninstall` first before running `dapr init`" + + healthPort = 58080 + metricPort = 59090 ) var ( @@ -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)