From ea75a5b9d8b5c439c2db73b79529d9e966b1ead2 Mon Sep 17 00:00:00 2001 From: Martin Schuppert Date: Tue, 17 Oct 2023 11:23:11 +0200 Subject: [PATCH] allow customize metrics and health port when run local --- Makefile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index cc42c10c..6bd09820 100644 --- a/Makefile +++ b/Makefile @@ -113,10 +113,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 - OPERATOR_TEMPLATES=./templates go run ./main.go + OPERATOR_TEMPLATES=./templates go run ./main.go -metrics-bind-address ":$(METRICS_PORT)" -health-probe-bind-address ":$(HEALTH_PORT)" # If you wish built the manager image targeting other platforms you can use the --platform flag. # (i.e. podman build --platform linux/arm64 ). However, you must enable podman buildKit for it.