Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Contributing Guidelines

Read the following guide if you’re interested in contributing to cluster-api-provider-gcp (CAPG).

Contributor License Agreements

We’d love to accept your patches! Before we can take them, we have to jump a couple of legal hurdles.

Please fill out either the individual or corporate Contributor License Agreement (CLA). More information about the CLA and instructions for signing it can be found here.

NOTE: Only original source code from you and other people that have signed the CLA can be accepted into the repository.

Finding Things That Need Help

If you’re new to the project and want to help, but don’t know where to start, we have a semi-curated list of issues that should not need deep knowledge of the system. Have a look and see if anything sounds interesting. Alternatively, read some of the docs on other controllers and try to write your own, file and fix any/all issues that come up, including gaps in documentation!

Contributing a Patch

For AI-assisted contributions, follow the project’s AI Usage Policy.

  1. If you haven’t already done so, sign a Contributor License Agreement (see details above).
  2. Fork the desired repo, develop and test your code changes.
    • There are Makefile targets available to help with running our automated tests including
      • make lint - Run our Code Linters
      • make test - Executes the project’s unit and integration tests. These tests need no Kubernetes cluster or GCP access.
      • make verify - Run a variety of static checks over code and non-code files
      • make generate - Ensure that generated files are up to date with their sources
      • For more information about the various tests CAPG has see our Testing page.
  3. Submit a pull request.
    1. All PRs must be labeled with one of the following kinds
      • /kind feature for PRs related to adding new features/tests
      • /kind bug for PRs related to bug fixes and patches
      • /kind api-change for PRs related to adding, removing, or otherwise changing an API
      • /kind cleanup for PRs related to code refactoring and cleanup
      • /kind deprecation for PRs related to a feature/enhancement marked for deprecation
      • /kind design for PRs related to design proposals
      • /kind documentation for PRs related to documentation
      • /kind failing-test for PRs related to a consistently or frequently failing test
      • /kind flake for PRs related to a flaky test
      • /kind other for PRs related to updating dependencies, minor changes or other
    2. If the PR requires additional action from users switching to a new release, include the string “action required” in the PR release-notes.
    3. All behavior changes must be covered by tests. Always use the smallest test layer possible, especially as E2E tests create billable GCP resources, see our E2E documentation for more details.
    4. All new features should come with user documentation.
  4. Once the PR has been reviewed and is ready to be merged, commits should be squashed.
    • Ensure commit message(s) are meaningful and message history is readable.
    • Ensure commit messages adhere to Conventional Commits.

All changes must be code reviewed. Coding conventions and standards are explained in the official developer docs. Expect reviewers to request that you avoid common go style mistakes in your PRs.

Proposal Process

Larger changes, such as new features, API changes or changes to how the project is built and released, should start as a proposal. CAPG follows the Cluster API proposal process:

Backporting a Patch

CAPG ships older versions through release-X.X branches, usually backports are reserved to critical bug-fixes. Check with the maintainers if you need a fix backporting.

Merge Approval

CAPG maintainers may add “LGTM” (Looks Good To Me) or an equivalent comment to indicate that a PR is acceptable. Any change requires at least one LGTM. No pull requests can be merged until at least one CAPG maintainer signs off with an LGTM.

Google Doc Viewing Permissions

To gain viewing permissions to google docs in this project, please join either the kubernetes-dev or kubernetes-sig-cluster-lifecycle google group.

Issue and Pull Request Management

Anyone may comment on issues and submit reviews for pull requests. However, in order to be assigned an issue or pull request, you must be a member of the Kubernetes SIGs GitHub organization.

If you are a Kubernetes GitHub organization member, you are eligible for membership in the Kubernetes SIGs GitHub organization and can request membership by opening an issue against the kubernetes/org repo.

However, if you are a member of any of the related Kubernetes GitHub organizations but not of the Kubernetes org, you will need explicit sponsorship for your membership request. You can read more about Kubernetes membership and sponsorship here.

CAPG maintainers can assign you an issue or pull request by leaving a /assign <your Github ID> comment on the issue or pull request.