Skip to content

Conversation

AshvinBambhaniya2003
Copy link

@AshvinBambhaniya2003 AshvinBambhaniya2003 commented Sep 25, 2025

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:

  • The "quick start" make core-run method led to an incomplete environment (missing ServiceAccount, RBAC) without proper explanation.
  • The guide for a complete setup (Debugging Locally with Remote KubeVela Environment) lacked the crucial helm install command.

This PR implements the following changes:

  1. Added a :::caution note to the "Run Vela Core" section, explicitly warning that the make core-run quick-start method is incomplete and uses local kubeconfig credentials, not a full in-cluster setup.
  2. Rewrote the Debugging Locally with Remote KubeVela Environment section into a comprehensive, step-by-step guide. This now includes the necessary helm install command, instructions for scaling down the in-cluster controller, and removing webhooks, providing a self-contained and realistic development workflow.

I have:

  • Read and followed KubeVela's contribution process.
  • Update sidebar.js if adding a new page. (Not applicable, existing page modified)
  • Run yarn start to ensure the changes has taken effect.

Related Issue

Special notes for your reviewer

Please pay close attention to the following:

  • The clarity and accuracy of the new :::caution note in the "Run Vela Core" section.
  • The completeness and correctness of the new step-by-step guide in the "Debugging Locally with Remote KubeVela Environment" section, especially the helm install command and the sequence of operations.
  • The technical correction made to the kubectl delete ValidatingWebhookConfiguration and MutatingWebhookConfiguration 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.

  • Bug Fixes
    • Added a caution in "Run Vela Core" explaining that core-run uses your kubeconfig and doesn’t create ServiceAccount/RBAC.
    • Rewrote "Debugging Locally with Remote KubeVela Environment" with Helm install, scaling down the in-cluster controller, removing cluster-scoped webhooks (no -n), and running core-run; noted webhook-dependent features can’t be tested in this mode.

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]>
Copy link

@cubic-dev-ai cubic-dev-ai bot left a 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.
Copy link
Contributor

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

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**
Copy link
Contributor

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

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.
Copy link
Contributor

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

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]>
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.

Docs: Local development guide is confusing and incomplete
2 participants