Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Make]Run kubefwd when operator runs outside of OCP #608

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -357,7 +357,7 @@ run-with-webhook: export HEALTH_PORT?=24601
run-with-webhook: manifests generate fmt vet update-nova-csv ## 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_kubefwd.sh

KUTTL_SUITE ?= default
KUTTL_NAMESPACE ?= nova-kuttl-$(KUTTL_SUITE)
Expand Down
23 changes: 23 additions & 0 deletions hack/run_with_kubefwd.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#!/bin/bash
set -ex

pushd bin
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is there a reason you choose to do it this way instead of using a make target like we have for operator-lint or the SDK?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no specific reason, it is started as a hack :)

wget https://github.com/txn2/kubefwd/releases/latest/download/kubefwd_Linux_x86_64.tar.gz
tar xvf kubefwd_Linux_x86_64.tar.gz
rm kubefwd_Linux_x86_64.tar.gz
popd


function cleanup()
{
sudo pkill kubefwd
}

trap cleanup SIGINT SIGTERM EXIT

sudo -E ./bin/kubefwd services -n openstack &

# wait for the port forwarding to start up
sleep 5

go run ./main.go -metrics-bind-address ":$(METRICS_PORT)" -health-probe-bind-address ":$(HEALTH_PORT)"
Loading