Skip to content

Latest commit

 

History

History
141 lines (88 loc) · 3.55 KB

CONTRIBUTING.md

File metadata and controls

141 lines (88 loc) · 3.55 KB

Contributing Guidelines

Pull requests, bug reports, and all other forms of contribution are welcomed and highly encouraged!

There are various ways in which you can contribute to this project such as updating docs, reporting bugs, writing patches, fixing typos.

When making any critical change to this repository, please first discuss the change you wish to make via issue, email, or any other method with the owners of this repository before making a change.

Getting Started

Make sure node.js is installed on your system and we prefer visual-studio-code as IDE.

Prerequisites

Please follow the guide to install volcano first.

Install volcano dashboard

Login one node of your kubernetes cluster and execute the following command to install volcano dashboard.

kubectl create ns volcano-system

kubectl apply -f https://raw.githubusercontent.com/volcano-sh/dashboard/main/deployment/volcano-dashboard.yaml

Then use the following command to map the traffic to node.

kubectl port-forward svc/volcano-dashboard 8080:80 -n volcano-system --address 0.0.0.0

Access the dashboard by navigate to http://$YOUR_NODE_IP:8080 in your browser.

If running locally navigate to http://localhost:8080

Development

  1. First of all, fork this repo.

  2. Next -> clone your branch.

    git clone https://github.com/<your-user-name>/dashboard.git

    note: replace <your-user-name> with your github username.

  3. Move to cloned dir and if you want to make changes to our codebase then create new branch

    cd dashboard/
    
    git checkout -b <your-branch-name>
  4. Install nvm

  5. Use similar version

    nvm use
  6. Install the dependencies

    npm ci
  7. Run the dev script

    npm run dev

Inside kubernetes cluster

You can build the volcano dashboard images locally. Please use the following command to build docker images of volcano dashboard.

Build images.

// build frontend image.
docker build -t frontend:dev . -f deployment/build/frontend/Dockerfile
// build backend image.
docker build -t backend:dev . -f deployment/build/backend/Dockerfile

After that you can replace the images in volcano-dashboard.yaml to verify the result.

kubectl apply -f deployment/volcano-dashboard.yaml

Code Style and Standards

  • Run prettier to format the code before commiting changes:

    npm run format

Submitting Pull Requests

We are assuming that you have made the changes in the code by following above guidelines.

When contributing changes, you need to ensure that your commits are properly signed off. This helps maintain accountability and ensures compliance with contribution policies.

How to signoff your commit(s)?

  1. Commit Your Changes

    git commit -s -m "Your commit message here"
  2. Verify Your Commit

    To check if your commit includes a sign-off, run:

    git log -1

    You should see a line like:

    Signed-off-by: Your Name <[email protected]>

    If you forgot to sign off, amend the commit with:

    git commit --amend -s
  3. Push Your Changes

    git push origin <your-branch>