We'll walk you through the setup to start contributing to the AWS Load Balancer Controller project. No matter if you're contributing code or docs, follow the steps below to set up your development environment.
!!! tip "Issue before PR" Of course we're happy about code drops via PRs, however, in order to give us time to plan ahead and also to avoid disappointment, consider creating an issue first and submit a PR later. This also helps us to coordinate between different contributors and should in general help keeping everyone happy.
Please ensure that you have properly installed Go.
!!! note "Go version"
We recommend to use a Go version of 1.14
or above for development.
The first step in setting up your AWS Load Balancer controller development environment is to fork the upstream AWS Load Balancer controller repository to your personal Github account.
Make sure in your $GOPATH/src
that you have directories for the
sigs.k8s.io
organization:
mkdir -p $GOPATH/src/github.com/sigs.k8s.io
For the forked repository, you will git clone
the repository into
the appropriate folder in your $GOPATH
. Once git clone
'd, you will want to
set up a Git remote called "upstream" (remember that "origin" will be pointing
at your forked repository location in your personal Github space).
You can use this script to do this for you:
GITHUB_ID="your GH username"
cd $GOPATH/src/github.com/sigs.k8s.io
git clone git@github.com:$GITHUB_ID/aws-load-balancer-controller
cd aws-load-balancer-controller/
git remote add upstream git@github.com:kubernetes-sigs/aws-load-balancer-controller
git fetch --all
Next, you create a local branch where you work on your feature or bug fix.
Let's say you want to enhance the docs, so set BRANCH_NAME=docs-improve
and
then:
git fetch --all && git checkout -b $BRANCH_NAME upstream/main
Make your changes locally, commit and push using:
git commit -a -m "improves the docs a lot"
git push origin $BRANCH_NAME
Finally, submit a pull request against the upstream source repository.
We monitor the GitHub repo and try to follow up with comments within a working day.
To build the controller binary, run the following command.
make controller
To install CRDs into a Kubernetes cluster, run the following command.
make install
To uninstall CRD from a Kubernetes cluster, run the following command.
make uninstall
To build the container image for the controller and push to a container registry, run the following command.
make docker-push
To deploy the CRDs and the container image to a Kubernetes cluster, run the following command.
make deploy