Developing Gateway API¶
You must have a working Go environment and then clone the repo:
mkdir -p $GOPATH/src/sigs.k8s.io
cd $GOPATH/src/sigs.k8s.io
git clone https://github.com/kubernetes-sigs/gateway-api
cd gateway-api
This project works with Go modules; you can chose to setup your environment outside $GOPATH as well.
Building, testing and deploying¶
You will need to have Docker installed to perform the steps below.
Project management¶
We are using the Github issues and project dashboard to manage the list of TODOs for this project:
Issues labeled good first issue
and help wanted
are especially good for a
first contribution.
We use milestones to track our progress towards releases. Looking at our current milestone can help identify our highest priority issues.
Building the code¶
The project uses make
to drive the build.
make
will run code generators, and run static analysis against the code and
generate Kubernetes CRDs.
You can kick off an overall build from the top-level makefile:
make
Install CRDs¶
To install gateway-api CRDs into a Kubernetes cluster:
make install
To uninstall CRDs and associated resources:
make uninstall
Submitting a Pull Request¶
Gateway API follows a similar pull request process as Kubernetes. Merging a pull request requires the following steps to be completed before the pull request will be merged automatically.
- Sign the CLA (prerequisite)
- Open a pull request
- Pass verification tests
- Get all necessary approvals from reviewers and code owners
Verify¶
Make sure you run the static analysis over the repo before submitting your changes. The Prow presubmit will not let your change merge if verification fails.
make verify
Documentation¶
The site documentation is written in Markdown and compiled with mkdocs. Each PR will automatically include a Netlify deploy preview. When new code merges, it will automatically be deployed with Netlify to gateway-api.sigs.k8s.io. If you want to manually preview docs changes locally, you can install mkdocs and run:
make docs
To make it easier to use the right version of mkdocs, there is a .venv
target to create a Python virtualenv that includes mkdocs. To use the
mkdocs live preview server while you edit, you can run mkdocs from
the virtualenv:
$ make .venv
Creating a virtualenv in .venv... OK
To enter the virtualenv type "source .venv/bin/activate", to exit type "deactivate"
(.venv) $ source .venv/bin/activate
(.venv) $ mkdocs serve
INFO - Building documentation...
...