<commit_before># Developing for NGINX Ingress Controller

This document explains how to get started with developing for NGINX Ingress controller.
It includes how to build, test, and release ingress controllers.

## Quick Start

### Getting the code

The code must be checked out as a subdirectory of k8s.io, and not github.com.

```
mkdir -p $GOPATH/src/k8s.io
cd $GOPATH/src/k8s.io
# Replace "$YOUR_GITHUB_USERNAME" below with your github username
git clone https://github.com/$YOUR_GITHUB_USERNAME/ingress-nginx.git
cd ingress-nginx
```

### Initial developer environment build

Ensure docker experimental features option is enabled for [buildx](https://docs.docker.com/buildx/working-with-buildx/)

```
$ make dev-env
```

### Updating the deployment

The nginx controller container image can be rebuilt using:
```
$ ARCH=amd64 TAG=dev REGISTRY=$USER/ingress-controller make build image
```

The image will only be used by pods created after the rebuild. To delete old pods which will cause new ones to spin up:
```
$ kubectl get pods -n ingress-nginx
$ kubectl delete pod -n ingress-nginx nginx-ingress-controller-<unique-pod-id>
```

## Dependencies

The build uses dependencies in the `vendor` directory, which
must be installed before building a binary/image. Occasionally, you
might need to update the dependencies.

This guide requires you to install go 1.13 or newer.

This will automatically save the dependencies to the `vendor/` directory.

```console
$ go get
$ make dep-ensure
```

## Building

All ingress controllers are built through a Makefile. Depending on your
requirements you can build a raw server binary, a local container image,
or push an image to a remote repository.

In order to use your local Docker, you may need to set the following environment variables:

```console<commit_msg>docs: update development.md to use ingress-nginx-*<commit_after># Developing for NGINX Ingress Controller

This document explains how to get started with developing for NGINX Ingress controller.
It includes how to build, test, and release ingress controllers.

## Quick Start

### Getting the code

The code must be checked out as a subdirectory of k8s.io, and not github.com.

```
mkdir -p $GOPATH/src/k8s.io
cd $GOPATH/src/k8s.io
# Replace "$YOUR_GITHUB_USERNAME" below with your github username
git clone https://github.com/$YOUR_GITHUB_USERNAME/ingress-nginx.git
cd ingress-nginx
```

### Initial developer environment build

Ensure docker experimental features option is enabled for [buildx](https://docs.docker.com/buildx/working-with-buildx/)

```
$ make dev-env
```

### Updating the deployment

The nginx controller container image can be rebuilt using:
```
$ ARCH=amd64 TAG=dev REGISTRY=$USER/ingress-controller make build image
```

The image will only be used by pods created after the rebuild. To delete old pods which will cause new ones to spin up:
```
$ kubectl get pods -n ingress-nginx
$ kubectl delete pod -n ingress-nginx ingress-nginx-controller-<unique-pod-id>
```

## Dependencies

The build uses dependencies in the `vendor` directory, which
must be installed before building a binary/image. Occasionally, you
might need to update the dependencies.

This guide requires you to install go 1.13 or newer.

This will automatically save the dependencies to the `vendor/` directory.

```console
$ go get
$ make dep-ensure
```

## Building

All ingress controllers are built through a Makefile. Depending on your
requirements you can build a raw server binary, a local container image,
or push an image to a remote repository.

In order to use your local Docker, you may need to set the following environment variables:

```console
{'fraction_non_alphanumeric': 0.08003277792952745, 'fraction_numerical': 0.004370390603660202, 'mean_word_length': 4.55690440060698, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 4, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1957484', 'n_tokens_mistral': 1108, 'n_tokens_neox': 1033, 'n_words': 468}