Skip to content

Commit

Permalink
Merge pull request #59 from stuggi/metrics_health_port
Browse files Browse the repository at this point in the history
allow customize metrics and health port when run local
  • Loading branch information
openshift-ci[bot] authored Oct 18, 2023
2 parents 56484f8 + 681f0e7 commit f7d34da
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -131,10 +131,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 --zap-time-encoding=iso8601
go run ./main.go --zap-time-encoding=iso8601 -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 @@ -318,6 +320,8 @@ operator-lint: gowork ## Runs operator-lint
# $oc delete -n openstack mutatingwebhookconfiguration/mswift.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 f7d34da

Please sign in to comment.