Contributing guidelines

Do not open pull requests directly against kubernetes/client-go repository (except for README.md); they will be ignored. Instead, please open pull requests and issues against kubernetes/kubernetes. Please follow the same contributing guide you would follow for any other pull request made to kubernetes/kubernetes.

This repository is published from kubernetes/kubernetes/staging/src/k8s.io/client-go by the kubernetes publishing-bot.

Please see Staging Directory and Publishing for more information

Contributing to client-go

This document outlines the process for contributing to the client-go repository.

Getting started

  1. Fork the repository: Fork the kubernetes/client-go repository to your GitHub account.
  2. Clone your fork: Clone your fork to your local machine.
  3. Create a branch: Create a new branch for your changes.
  4. Make your changes: Make your changes to the codebase.
  5. Test your changes: Ensure your changes do not introduce regressions by running the test suite.
  6. Commit your changes: Commit your changes with a clear and concise message.
  7. Push your changes: Push your changes to your fork on GitHub.
  8. Open a pull request: Open a pull request against the main kubernetes/client-go repository, targeting the master branch.

Testing

Before submitting a pull request, it is essential to ensure that your changes do not introduce regressions. To achieve this, you can run the following commands:

go test github.com/kubernetes/client-go

This command will run the test suite for the client-go library. It is crucial to run these tests before submitting your pull request.

Code style

Please adhere to the following code style guidelines:

  • Follow the Go code style guide: https://golang.org/doc/effective_go.html#formatting
  • Use the Go formatter (gofmt) to ensure consistent code formatting.
  • Limit lines to a maximum of 120 characters.
  • Use clear and concise variable and function names.
  • Follow the existing code style and conventions.

Pull request reviews

Once you have opened a pull request, it will be reviewed by maintainers of the client-go repository. Please be patient while your pull request is reviewed. Be prepared to answer any questions or make necessary changes to your code.

Communication

Feel free to use the Kubernetes Slack channel #client-go to discuss any questions or concerns you may have regarding contributions to the client-go repository.