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 fails locally with cannot load certificate: open tls.crt: no such file or directory #5636

Open
Tracked by #5637
jbw976 opened this issue Apr 29, 2024 · 3 comments
Labels
bug Something isn't working build test

Comments

@jbw976
Copy link
Member

jbw976 commented Apr 29, 2024

What happened?

When new contributors attempt to follow the guidance to set up their developer environment, they will encounter an error when running make run:

❯ make run
11:44:01 [ .. ] go build linux_arm64
11:44:02 [ OK ] go build linux_arm64
11:44:02 [ .. ] Running Crossplane locally out-of-cluster . . .
./crossplane/crossplane/_output/bin/darwin_arm64/crossplane core start --debug
2024-04-29T11:44:03+02:00	INFO	crossplane	Beta feature enabled	{"flag": "EnableBetaCompositionFunctions"}
2024-04-29T11:44:03+02:00	INFO	crossplane	Beta feature enabled	{"flag": "EnableBetaCompositionFunctionsExtraResources"}
crossplane: error: cannot load client TLS certificates: cannot load certificate: open tls.crt: no such file or directory
make: *** [run] Error 1

@haarchri has a workaround script he uses. Should we document this, or should the process itself be made more easy?
https://gist.github.com/haarchri/6526d1738611cc79c04e88091dfe074a

How can we reproduce it?

Essentially the steps from https://github.com/crossplane/crossplane/tree/master/contributing#establishing-a-development-environment:

# build the project
make

# start a local kind cluster
./cluster/local/kind.sh up

# try to run crossplane locally, which will fail
make run

What environment did it happen in?

Crossplane version: v1.15.2
Kubernetes client: v1.26.2
Kubernetes server: v1.29.1
OS: macoS Sonoma v14.4.1

@phisco
Copy link
Contributor

phisco commented Apr 29, 2024

Making TLS material available would be easy though, the harder part will be to have webhooks actually working and hitting a process external to the cluster, probably that would require something like mirrord or some other networking trick. The easiest thing would be not to setup and configure webhooks in this mode probably.

@negz
Copy link
Member

negz commented May 9, 2024

FWIW I haven't personally used make run in many years. Do folks find it valuable?

Since we added E2E tests I almost never spin up a "dev environment" locally for Crossplane. I just write and/or run the E2E tests, which essentially do the same thing but in a repeatable fashion.

@jbw976
Copy link
Member Author

jbw976 commented May 10, 2024

I can see the value in building an e2e scenario for an intended change.

But I can personally find the value, and I can imagine others would as well, to have a very low barrier to entry means of iterating on my local crossplane code. For folks less familiar with the code base, and with the patterns/expectations of the e2e tests, being able to rapidly iterate over just their code changes pointed at a local cluster is an easier experience to get going.

FWIW, I still use ./cluster/local/kind.sh often too, and make run is a faster/easier version of that 😉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working build test
Projects
Status: No status
Development

No branches or pull requests

3 participants