-
Notifications
You must be signed in to change notification settings - Fork 212
Docs(contributor): Clarify and improve local development guide #1381
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
base: main
Are you sure you want to change the base?
Docs(contributor): Clarify and improve local development guide #1381
Conversation
The previous guide for setting up a local development environment was confusing for new contributors. It resulted in an incomplete setup that lacked the ServiceAccount and other resources, causing confusion. This commit improves the guide in two ways: 1. A warning note is added to the "quick start" flow to clarify its limitations and explain that it does not create a complete control plane. 2. The section on debugging with a remote environment is rewritten to provide a full, step-by-step workflow, including the necessary Helm command to install all required resources. This provides a clearer and more accurate onboarding experience. Signed-off-by: Ashvin Bambhaniya <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No issues found across 1 file
|
||
:::caution | ||
Note you will not be able to test features relate with validating/mutating webhooks in this way. | ||
By removing the webhooks, you will not be able to test features that rely on the admission controller (like some definition validation or pod injection features) in this mode. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Have we got documentation on how to webhook testing from the local machine? I was curious about it the other day
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's a great point; we don't currently have a doc for local webhook testing, but it's a valuable suggestion for future documentation.
``` | ||
This approach creates a complete and realistic development environment. It involves installing the full KubeVela control plane in your cluster via Helm, and then running the controller code locally to connect to it. | ||
|
||
1. **Install KubeVela using Helm** |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I often use vela install
to quickly setup with the latest code and then scale down
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
address in commit b883364
|
||
3. **Run the Controller Locally** | ||
|
||
Finally, you can use the `make core-run` command to run the controller from your local machine. It will connect to the cluster using your `kubeconfig` and take over from the scaled-down controller. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it'd be useful to briefly capture how to run it within your IDE with cmd/core/main.go
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add in commit b883364
Refines the code contribution guide to provide a clearer and more comprehensive developer experience for running KubeVela locally. This commit introduces several improvements: - Rewrites the 'Debugging Locally with Remote KubeVela Environment' section into a more detailed, step-by-step process. - Recommends using `vela install` and `vela uninstall` for a more consistent CLI experience. - Adds instructions for running and debugging the controller directly from an IDE. - Includes a caution block to clarify the limitations of the basic `make core-install` setup. Signed-off-by: Ashvin Bambhaniya <[email protected]>
Description
This Pull Request addresses the confusion and incompleteness in the local development guide (
docs/contributor/code-contribute.md
), which was causing a suboptimal onboarding experience for new contributors.Specifically, it resolves the issues where:
make core-run
method led to an incomplete environment (missing ServiceAccount, RBAC) without proper explanation.Debugging Locally with Remote KubeVela Environment
) lacked the crucialhelm install
command.This PR implements the following changes:
:::caution
note to the "Run Vela Core" section, explicitly warning that themake core-run
quick-start method is incomplete and uses localkubeconfig
credentials, not a full in-cluster setup.Debugging Locally with Remote KubeVela Environment
section into a comprehensive, step-by-step guide. This now includes the necessaryhelm install
command, instructions for scaling down the in-cluster controller, and removing webhooks, providing a self-contained and realistic development workflow.I have:
sidebar.js
if adding a new page. (Not applicable, existing page modified)yarn start
to ensure the changes has taken effect.Related Issue
Special notes for your reviewer
Please pay close attention to the following:
:::caution
note in the "Run Vela Core" section.helm install
command and the sequence of operations.kubectl delete ValidatingWebhookConfiguration
andMutatingWebhookConfiguration
commands, where the-n vela-system
flag was removed as these are cluster-scoped resources.Summary by cubic
Clarifies the local development guide to prevent incomplete setups. Adds a realistic, step-by-step workflow for running vela-core locally against a Helm-installed cluster.