Thank you for contributing to Stellar-K8s! This guide explains how to work with the project, keep your pull requests ready for review, and follow our commit and merge conventions.
If you run into issues, jump to the relevant section below:
We use a fork-and-pull-request model. The basic flow is:
- Fork the repository on GitHub.
- Clone your fork locally:
git clone https://github.com/YOUR_USERNAME/stellar-k8s.git cd stellar-k8s - Add the upstream remote:
git remote add upstream https://github.com/OtowoOrg/Stellar-K8s.git
- Sync from upstream before creating a branch:
git fetch upstream git checkout main git merge upstream/main
- Create a new branch for your work.
- Make focused commits.
- Run local checks before pushing.
- Push your branch to your fork.
- Open a Pull Request against the upstream
mainbranch.
Use clear, descriptive branch names. Recommended prefixes:
feat/for new features (e.g.feat/auto-mtls)fix/for bug fixes (e.g.fix/panic-on-startup)docs/for documentation updates (e.g.docs/update-architecture)chore/for maintenance or dependency changes (e.g.chore/bump-kube-rs)test/for test-related work (e.g.test/e2e-service-mesh)
- Always branch from the latest
main. - Do not work directly on
main. - Keep each branch scoped to a single feature, bug fix, or documentation item.
- Rebase or merge
maininto your branch before opening a PR ifmainhas advanced.
We prefer a clean history. When your PR is approved, maintainers will typically merge it using:
- Squash and merge for feature and fix branches
- Rebase and merge only when preserving a linear history is important
If your PR contains multiple logical changes, split it into separate branches and PRs.
Before opening a PR, confirm the following:
- The code or documentation change is complete and focused.
- The PR targets the
mainbranch. - Your branch is up to date with
main. - You have run tests locally.
- You have run formatting and lint checks.
- You have added or updated documentation, if needed.
- Commit messages are clear, accurate, and follow our conventions.
- Every commit includes a DCO sign-off.
- The PR description is filled out completely using the template.
- The PR includes links to any related issues or design discussions.
Before submitting, run the contributor health gates via make (not raw
cargo — Make targets set the workspace feature flags so results match CI):
make health # Format + lint + tests + docs
make ci-local # Full local CI gate (includes audit + link-check)The full checklist, command rationale, and per-step details live in the
Canonical Repository Health Checklist.
If your change adds shell scripts, also run make shellcheck.
We follow Conventional Commits.
Correct examples:
feat(cli): add support for --dry-run mode
fix(webhook): handle nil admission review objects
docs(contributing): clarify PR checklist and branch strategy
test(integration): add end-to-end service mesh coverage
chore(deps): bump kube-rs to 0.1.0
When to use each type:
feat:new functionalityfix:bug fixesdocs:documentation-only changeschore:maintenance tasks and dependency updatesrefactor:code changes that do not add features or fix bugstest:adding or updating tests
Example with body and footer:
fix(metrics): avoid panic when metrics registry is empty
This change adds a guard around metric registration so operator startup
continues even if no collector is present.
Signed-off-by: Alice Doe <alice@example.com>
All commits must include a Signed-off-by line.
Add this automatically with:
git commit -s -m "fix: your fix description"The sign-off must match the commit author. Unsigned commits may fail CI and block merge.
A PR template is provided in .github/PULL_REQUEST_TEMPLATE.md and will populate the PR description when you open a PR.
Fill out every section fully. Do not leave the template blank or remove required checklist items.
The template ensures your change includes:
- tests and validation
- documentation updates when required
- formatting and linting checks
- DCO sign-off
- Rust stable (1.88+)
- Kubernetes local cluster (
kind,minikube, etc.) - Docker
cargo-auditpre-commithooks
Use the OS setup script to install and pin all required tools, then run make dev-setup to install Rust components and pre-commit hooks:
# macOS
bash scripts/setup-mac.sh
# Linux (Ubuntu/Debian/Fedora)
bash scripts/setup-linux.sh
# Both platforms: install Rust components and pre-commit hooks
make dev-setupBoth setup scripts are idempotent and print a summary of installed versions.
Always drive the local pipeline through make targets so results match CI:
make health # Contributor health gate
make ci-local # Full CI pipeline locallySee the Canonical Repository Health Checklist for the full command set and per-step expectations.
- Format Rust code with
make fmt. - Lint with
make lint(clippy with the project's feature flags). - Run tests with
make test. - Document behavior changes in code comments and docs.
- Keep PRs small and easy to review.
- Module names use
snake_case. - Public types and functions require doc comments (
///). - Do not add
#[allow(dead_code)]without a comment explaining why the code must stay. - Unused imports must be removed before merging.
- Feature-gated code that is no longer used should be deleted, not suppressed.
- Documentation files use
kebab-case.md(e.g.,disk-scaling.md). - Files that belong to a topic area go in the matching
docs/<topic>/subdirectory. - Root-level docs (
README.md,DEVELOPMENT.md,CONTRIBUTING.md) are entry points only — detailed content belongs indocs/. - New doc files must be added to
mkdocs.ymlunder the appropriate section.
- Scripts use
kebab-case.sh(e.g.,cleanup.sh). - Every script must pass
shellcheck -S error. - Do not add one-off archive or batch scripts under
scripts/. Usescripts/cleanup.sh(make cleanup) as the single cleanup entrypoint, or remove obsolete helpers entirely. - Historical or one-off scripts should not be committed to the repository; keep only operational scripts under
scripts/.
- CRD YAML files follow the
stellar{feature}-crd.yamlnaming pattern underconfig/crd/. - Example manifests in
examples/use descriptive, feature-based names — not issue numbers. - Generated manifests (CRDs, API reference, bundle) must be regenerated from their source before merging. See the Regenerating Manifests table in DEVELOPMENT.md.
Before marking a PR ready for review, run make health (or make ci-local
for the full audit + link-check gate) and complete every item in the
Canonical Repository Health Checklist.
That document is the single source of truth — do not duplicate command blocks here.
Run through this before marking a PR ready for review:
-
make healthpasses (format + lint + test + docs) — ormake ci-localfor the full audit + link-check gate -
make health-fastpasses for a quick pre-push compile check - No new
#[allow(dead_code)]without an explanatory comment - No unused imports in modified files
- Generated manifests are up to date with their source
- Shell scripts pass
shellcheck -S error - New doc files are added to
mkdocs.yml - Commit messages follow Conventional Commits and include a
Signed-off-byline Before requesting a review for a Pull Request, please ensure all checks listed in the Canonical Repository Health Checklist have been run and verified.
If you're stuck, open a Draft PR or create an issue to ask for guidance.
Refer to README.md and DEVELOPMENT.md for additional project setup and workflow information.
- Problem:
makeorcargocommands not found.- Solution: Ensure you have installed the necessary dependencies from
DEVELOPMENT.md.
- Solution: Ensure you have installed the necessary dependencies from
- Problem: Minikube / Kind cluster fails to start.
- Solution: Check your Docker daemon is running and has enough resources allocated (minimum 4GB RAM, 2 CPUs).
- Problem: Code fails to compile due to missing dependencies.
- Solution: Run
cargo fetchorcargo updateto ensure you have the latest crates. Also, ensure your system hascmake,libssl-dev, andpkg-configinstalled.
- Solution: Run
- Problem: Tests fail locally but pass on CI.
- Solution: Run
make cleanand then rebuild. Sometimes local artifacts can get stale.
- Solution: Run
- Problem: Cargo build is extremely slow.
- Solution: We highly recommend using
sccacheto cache intermediate build results. Follow the instructions inDEVELOPMENT.mdto set it up.
- Solution: We highly recommend using
- Problem: Docker build fails with out of space errors.
- Solution: Run
docker system pruneto free up space. The build requires at least 10GB of free space due to the multi-stage cargo caching.
- Solution: Run
- Problem:
make quickfails during docker validation.- Solution: Make sure you have the latest base images pulled locally.
- Problem: Operator pod is crashlooping.
- Solution: Check the operator logs using
kubectl logs -n stellar-system -l app.kubernetes.io/name=stellar-operator. Often, this is due to invalid RBAC permissions or missing secrets.
- Solution: Check the operator logs using
- Problem: Custom Resource Definitions (CRDs) not applying.
- Solution: Ensure your KUBECONFIG points to the correct cluster. Run
make installto manually install the CRDs into your cluster.
- Solution: Ensure your KUBECONFIG points to the correct cluster. Run
- Problem: GitHub Actions workflow fails on linting.
- Solution: Run
make fmtandmake lintlocally before pushing. Also, check.pre-commit-config.yamlto ensure your pre-commit hooks are installed.
- Solution: Run
- Problem: Link validation CI fails.
- Solution: Run
make link-checkfor markdown link/anchor issues, ormake link-check-allfor the full repo-wide check (markdown + source + configs).
- Solution: Run