Contributing to KubeFleet

Welcome Contributors! 🚀

Thank you for your interest in contributing to KubeFleet! We're excited to have you join our community. This guide will help you get started with contributing to the project.

Whether you're fixing bugs, adding features, improving documentation, or sharing ideas, every contribution is valuable and appreciated.

How to Contribute

Report Bugs

Found a bug? Report it with detailed steps to reproduce.

Suggest Features

Have an idea? Open a feature request and discuss it with the community.

Submit Code

Fix bugs, add features, or improve existing code.

Improve Docs

Help improve documentation, tutorials, and examples.

Development Setup

1. Fork and Clone

# Fork the repository on GitHub
# Then clone your fork
git clone https://github.com/YOUR_USERNAME/kubefleet.git
cd kubefleet

# Add the original repository as upstream
git remote add upstream https://github.com/thekubefleet/kubefleet.git

2. Install Dependencies

# Install Go dependencies
go mod tidy

# Install Node.js dependencies
cd dashboard
npm install
cd ..

3. Generate Protobuf Code

protoc --go_out=. --go_opt=paths=source_relative \
       --go-grpc_out=. --go-grpc_opt=paths=source_relative \
       proto/agent.proto

4. Run Tests

# Run Go tests
go test ./...

# Run React tests
cd dashboard
npm test
cd ..

Code Style & Standards

Go Code

  • Follow Effective Go guidelines
  • Use gofmt for code formatting
  • Run golint and golangci-lint
  • Write tests for new functionality
  • Use meaningful variable and function names

TypeScript/React Code

  • Follow TypeScript best practices
  • Use functional components with hooks
  • Write unit tests with Jest and React Testing Library
  • Use Material-UI components consistently
  • Follow the existing code structure and patterns

Commit Messages

Follow conventional commit format:

type(scope): description

feat(agent): add support for custom metrics collection
fix(dashboard): resolve memory leak in chart component
docs(readme): update installation instructions
test(server): add unit tests for health endpoint

Pull Request Process

Before Submitting

  • Ensure your code follows the style guidelines
  • Write or update tests as needed
  • Update documentation if required
  • Test your changes thoroughly
  • Make sure all tests pass

Creating a Pull Request

  1. Create a new branch for your feature/fix
  2. Make your changes and commit them
  3. Push your branch to your fork
  4. Create a pull request against the main branch
  5. Fill out the pull request template

Pull Request Template

Description

Brief description of the changes

Type of Change

  • • Bug fix
  • • New feature
  • • Documentation update
  • • Performance improvement

Testing

How have you tested these changes?

Checklist

  • • Code follows style guidelines
  • • Tests added/updated
  • • Documentation updated
  • • All tests pass

Issue Guidelines

Bug Reports

When reporting a bug, please include:

  • Clear and descriptive title
  • Steps to reproduce the issue
  • Expected vs actual behavior
  • Environment details (OS, Go version, Node version)
  • Screenshots or logs if applicable

Feature Requests

When requesting a feature, please include:

  • Clear description of the feature
  • Use case and motivation
  • Proposed implementation approach (if any)
  • Alternative solutions considered

Community

Code of Conduct

We are committed to providing a welcoming and inspiring community for all. Please read our Code of Conduct to understand the standards we uphold.

Getting Help

GitHub Issues

Report bugs and request features

Discussions

Ask questions and share ideas

Contributor Recognition

Thank You! 🙏

All contributors will be recognized in our:

  • Contributors list on GitHub
  • Release notes for significant contributions
  • Project documentation where appropriate

Your contributions help make KubeFleet better for everyone in the Kubernetes community!