-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve automated support for local webhooks
- Loading branch information
1 parent
d4cca7c
commit e6705df
Showing
2 changed files
with
44 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -346,14 +346,20 @@ operator-lint: gowork ## Runs operator-lint | |
GOBIN=$(LOCALBIN) go install github.com/gibizer/[email protected] | ||
go vet -vettool=$(LOCALBIN)/operator-lint ./... ./api/... | ||
|
||
# Used for webhook testing | ||
# The configure_local_webhook.sh script below will remove any OLM webhooks | ||
# for the operator and also scale its deployment replicas down to 0 so that | ||
# the operator can run locally. | ||
# We will attempt to catch SIGINT/SIGTERM and clean up the local webhooks, | ||
# but it may be necessary to manually run ./hack/clean_local_webhook.sh | ||
# before deploying with OLM again for other untrappable signals. | ||
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 scale-down-placement-controller-csv ## Run a controller from your host. | ||
run-with-webhook: manifests generate fmt vet ## Run a controller from your host. | ||
/bin/bash hack/clean_local_webhook.sh | ||
/bin/bash hack/configure_local_webhook.sh | ||
go run ./main.go -metrics-bind-address ":$(METRICS_PORT)" -health-probe-bind-address ":$(HEALTH_PORT)" | ||
/bin/bash hack/run_with_local_webhook.sh | ||
|
||
.PHONY: tidy | ||
tidy: ## Run go mod tidy on every mod file in the repo | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters