Skip to content

Commit

Permalink
allow customize metrics and health port when run local
Browse files Browse the repository at this point in the history
  • Loading branch information
stuggi committed Oct 17, 2023
1 parent 53eb700 commit 74b9e9e
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -157,10 +157,12 @@ build: generate fmt vet ## Build manager binary.
go build -o bin/manager main.go

.PHONY: run
run: export ENABLES_WEBHOOKS?=false
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.
Expand Down Expand Up @@ -371,6 +373,8 @@ golangci-lint:
# $oc delete -n openstack mutatingwebhookconfiguration/mmanila.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)"

0 comments on commit 74b9e9e

Please sign in to comment.