From 955ebbaddd8effb0ae7e09ba72c97c3bd39a859d Mon Sep 17 00:00:00 2001 From: Martin Schuppert Date: Tue, 17 Oct 2023 11:42:07 +0200 Subject: [PATCH] allow customize metrics and health port when run local --- Makefile | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index e8a5534d..b48740f5 100644 --- a/Makefile +++ b/Makefile @@ -127,10 +127,12 @@ build: generate fmt vet ## Build manager binary. go build -o bin/manager main.go .PHONY: run +run: export METRICS_PORT?=8080 +run: export HEALTH_PORT?=8081 run: export ENABLE_WEBHOOKS?=false run: manifests generate fmt vet ## Run a controller from your host. /bin/bash hack/clean_local_webhook.sh - go run ./main.go + go run ./main.go -metrics-bind-address ":$(METRICS_PORT)" -health-probe-bind-address ":$(HEALTH_PORT)" .PHONY: docker-build docker-build: test ## Build docker image with the manager. @@ -334,6 +336,8 @@ operator-lint: gowork ## Runs operator-lint # $oc delete mutatingwebhookconfiguration/movnnorthd.kb.io SKIP_CERT ?=false .PHONY: run-with-webhook +run-with-webhook: export METRICS_PORT?=8080 +run-with-webhook: export HEALTH_PORT?=8081 run-with-webhook: manifests generate fmt vet ## Run a controller from your host. /bin/bash hack/configure_local_webhook.sh - go run ./main.go + go run ./main.go -metrics-bind-address ":$(METRICS_PORT)" -health-probe-bind-address ":$(HEALTH_PORT)"