Open mad01 opened 1 month ago
Unfortunately the steps there are outdated with some recent work.
Here is how I am currently testing/debugging locally (may not be the optimal way, but works fine):
# Creates a kind cluster named "local-dev", deploys crossplane, deploys a locally built provider-kubernetes
make local-deploy
# Stop Crossplane
kubectl -n crossplane-system scale deploy crossplane --replicas=0
# Stop provider-kubernetes running inside the cluster
kubectl -n crossplane-system scale deploy provider-kubernetes-provider-kub --replicas=0
# Fetch generated certs from cluster
./provider-kubernetes-fetch-certs.sh
# Start the provider
export TLS_CLIENT_CERTS_DIR=/tmp/provider-kubernetes/client-certs
export TLS_SERVER_CERTS_DIR=/tmp/provider-kubernetes/server-certs
go run cmd/provider/main.go -d
Right, I think I introduced this bug with the conversion webhook, and either didnt notice or forgot about it.
Thanks @turkenh for the workaround. If I get free cycles I can take a look at incorporating that in the make run somehow
here is a gist to how i use it. I had to add some notes on starting a port forward and the provider config setup that is in the readme. At the last step before starting the controller this is where you can pick goland or any other idea and start it from there instead if you like
https://gist.github.com/mad01/7f687b43c72357a0c88bb1b9f45b0f58
breadcrumbs to https://github.com/crossplane/crossplane/issues/5636 which looks related (similar error in make run
)
What happened?
We are missing the tls path that is expected when running controller locally.
How can we reproduce it?
run make target
make run
from main