Thank you for your interest in contributing to Cloudness! We welcome contributions from the community and are grateful for your support.
This project adheres to a Code of Conduct. By participating, you are expected to uphold this code. Please report unacceptable behavior to the project maintainers.
Before creating bug reports, please check the issue tracker to avoid duplicates. When you create a bug report, include as many details as possible:
- Use a clear and descriptive title
- Describe the exact steps to reproduce the problem
- Provide specific examples (code snippets, screenshots, etc.)
- Describe the behavior you observed and what you expected
- Include your environment details (OS, Go version, Kubernetes version, etc.)
Bug Report Template:
**Description:**
A clear description of the bug.
**Steps to Reproduce:**
1. Go to '...'
2. Click on '...'
3. See error
**Expected Behavior:**
What you expected to happen.
**Actual Behavior:**
What actually happened.
**Environment:**
- OS: [e.g., Ubuntu 22.04]
- Go Version: [e.g., 1.21.5]
- Cloudness Version: [e.g., v1.0.0]
- Kubernetes Version: [e.g., 1.28.0]
**Additional Context:**
Add any other context, logs, or screenshots.Enhancement suggestions are tracked as GitHub issues. When creating an enhancement suggestion:
- Use a clear and descriptive title
- Provide a detailed description of the suggested enhancement
- Explain why this enhancement would be useful
- List examples of how it would be used
We actively welcome your pull requests:
- Fork the repository and create your branch from
main - Follow the development setup outlined below
- Make your changes following our coding standards
- Add tests if applicable
- Ensure all tests pass
- Update documentation if needed
- Submit a pull request
Pull Request Guidelines:
- Keep PRs focused on a single feature or bug fix
- Write clear, descriptive commit messages
- Reference related issues in your PR description
- Ensure CI checks pass
- Request review from maintainers
- Be responsive to feedback
- Go 1.21 or higher
- Node.js (latest stable version)
- Docker (for local testing)
- Kubernetes cluster (for integration testing)
- Clone the repository:
git clone https://github.com/cloudness-io/cloudness.git
cd cloudness- Install dependencies:
make dep
make tools- Run the development server:
make dev- Access the UI:
Open your browser at http://localhost:7331
- Follow Effective Go guidelines
- Use
make formatto format your code - Run
go vetto catch common mistakes - Use meaningful variable and function names
- Add comments for exported functions and complex logic
- Keep functions small and focused
Example:
// ProcessDeployment handles the deployment of an application to Kubernetes.
// It validates the deployment spec, creates necessary resources, and monitors
// the deployment status.
func ProcessDeployment(ctx context.Context, spec *DeploymentSpec) error {
if err := spec.Validate(); err != nil {
return fmt.Errorf("invalid deployment spec: %w", err)
}
// Implementation...
return nil
}- Follow Templ best practices for Go templates
- Use
make formatto format template files - Write semantic HTML in templ components
- Use Tailwind CSS utility classes consistently
- Keep components small and reusable
- Use Alpine.js for interactive elements when needed
Example:
package components
import "github.com/cloudness-io/cloudness/types"
// DeploymentCard renders a deployment card component
templ DeploymentCard(deployment *types.Deployment) {
<div class="bg-white rounded-lg shadow p-4">
<h3 class="text-lg font-semibold">{ deployment.Name }</h3>
<p class="text-gray-600">{ deployment.Status }</p>
</div>
}Use clear and meaningful commit messages following the Conventional Commits format:
<type>(<scope>): <subject>
<body>
<footer>
Types:
feat: New featurefix: Bug fixdocs: Documentation changesstyle: Code style changes (formatting, etc.)refactor: Code refactoringtest: Adding or updating testschore: Maintenance tasks
Examples:
feat(api): add endpoint for deployment rollback
Add new API endpoint to support rolling back deployments to previous versions.
Includes validation and error handling.
Closes #123
fix(auth): resolve token expiration issue
Fixed bug where JWT tokens were not properly validated after expiration.
Updated token validation logic to check expiry timestamp.
Fixes #456
# Run all tests
make test
# Run specific package tests
go test ./app/auth/...
# Run with coverage
make test-coverage- Write unit tests for all new functionality
- Aim for >80% code coverage
- Use table-driven tests where appropriate
- Mock external dependencies
Example:
func TestProcessDeployment(t *testing.T) {
tests := []struct {
name string
spec *DeploymentSpec
wantErr bool
}{
{
name: "valid deployment",
spec: &DeploymentSpec{
Name: "test-app",
Image: "nginx:latest",
},
wantErr: false,
},
{
name: "invalid deployment - missing name",
spec: &DeploymentSpec{Image: "nginx:latest"},
wantErr: true,
},
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
err := ProcessDeployment(context.Background(), tt.spec)
if (err != nil) != tt.wantErr {
t.Errorf("ProcessDeployment() error = %v, wantErr %v", err, tt.wantErr)
}
})
}
}- Update README.md if you change functionality
- Add comments to exported functions and templ components
- Update API documentation if you add/modify endpoints
- Include examples in documentation
- Regenerate templ files after changes:
templ generate
- Automated Checks: All PRs must pass CI checks (build, tests, linting)
- Code Review: At least one maintainer must approve the PR
- Testing: Ensure changes are tested (unit tests, integration tests)
- Documentation: Verify documentation is updated if needed
- Merge: Once approved and passing all checks, a maintainer will merge
- Join our GitHub Discussions
- Ask questions, share ideas, and help others
- Be respectful and constructive in all interactions
By contributing to Cloudness, you agree that your contributions will be licensed under the Apache License 2.0.
If you have questions about contributing, feel free to:
- Open a discussion
- Reach out to the maintainers
- Check existing issues and PRs
Thank you for contributing to Cloudness! 🎉