Skip to content

Make make run working with the latest changes#5745

Closed
ytsarev wants to merge 1 commit intocrossplane:masterfrom
ytsarev:fix-make-run
Closed

Make make run working with the latest changes#5745
ytsarev wants to merge 1 commit intocrossplane:masterfrom
ytsarev:fix-make-run

Conversation

@ytsarev
Copy link
Copy Markdown
Member

@ytsarev ytsarev commented May 28, 2024

Description of your changes

Fixes #5636

I have:

Need help with this checklist? See the cheat sheet.

@ytsarev ytsarev requested a review from a team as a code owner May 28, 2024 14:01
@ytsarev ytsarev requested review from haarchri and phisco May 28, 2024 14:01
Copy link
Copy Markdown
Member

@haarchri haarchri left a comment

Choose a reason for hiding this comment

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

* Make `make run` operable again to enable fast feedback dev loop
* Retrieve TLS certificates from the runtime cluster secrets
* Disable webhooks for local out-of-cluster scenario

Signed-off-by: Yury Tsarev <yury@upbound.io>
@negz
Copy link
Copy Markdown
Member

negz commented May 28, 2024

I was planning to merge #5711 today, which removes the Makefile entirely.

Copy link
Copy Markdown
Member

@jbw976 jbw976 left a comment

Choose a reason for hiding this comment

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

Thanks for jumping on this quickly @ytsarev and getting a local dev experience working again 😉

Given the transition from make -> earthly, let's see what comes out of the discussion on #5711 (comment) before merging this effort, as it may just be entirely replaced 🙇‍♂️

run: go.build
@$(INFO) Getting TLS certificates from the cluster...
@mkdir -p $(TLS_SERVER_CERTS_DIR)
@kubectl get secret crossplane-tls-server -n $(CROSSPLANE_NAMESPACE) -o jsonpath="{.data.tls\.crt}" | base64 --decode > "$(TLS_SERVER_CERTS_DIR)/tls.crt"
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

instead of directly invoking kubectl, I think you'd want to use $(KUBECTL) instead, so the cached tool/version is used instead of whatever is on your local machine 😉

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

good catch 💯

@ytsarev
Copy link
Copy Markdown
Member Author

ytsarev commented May 28, 2024

if the Earthly is the way to go, I can reimplement it after the merge of #5711

@negz
Copy link
Copy Markdown
Member

negz commented Jun 4, 2024

Closing for now. Please do take a shot at porting this to Earthly, and let me know how you like working with it.

Given we need to run Crossplane against a cluster, I'm wondering if this could be some argument to the +hack target that does a go run instead of building the image.

@negz negz closed this Jun 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

make run fails locally with cannot load certificate: open tls.crt: no such file or directory

4 participants