Skip to content

Commit

Permalink
Merge branch 'main' into fix-unit-test
Browse files Browse the repository at this point in the history
  • Loading branch information
sjberman authored Dec 5, 2023
2 parents 3450cdd + b49d802 commit 1976f20
Show file tree
Hide file tree
Showing 8 changed files with 106 additions and 35 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ jobs:
if: ${{ github.event_name == 'push' && github.ref != 'refs/heads/main' }}

- name: Download Syft
uses: anchore/sbom-action/download-syft@fd74a6fb98a204a1ad35bbfae0122c1a302ff88b # v0.15.0
uses: anchore/sbom-action/download-syft@5ecf649a417b8ae17dc8383dc32d46c03f2312df # v0.15.1
if: github.ref_type == 'tag'

- name: Install Cosign
Expand Down Expand Up @@ -167,7 +167,7 @@ jobs:

- name: NGF Docker meta
id: ngf-meta
uses: docker/metadata-action@e6428a5c4e294a61438ed7f43155db912025b6b3 # v5.2.0
uses: docker/metadata-action@31cebacef4805868f9ce9a0cb03ee36c32df2ac4 # v5.3.0
with:
images: |
name=ghcr.io/nginxinc/nginx-gateway-fabric
Expand All @@ -179,7 +179,7 @@ jobs:
- name: NGINX Docker meta
id: nginx-meta
uses: docker/metadata-action@e6428a5c4e294a61438ed7f43155db912025b6b3 # v5.2.0
uses: docker/metadata-action@31cebacef4805868f9ce9a0cb03ee36c32df2ac4 # v5.3.0
with:
images: |
name=ghcr.io/nginxinc/nginx-gateway-fabric/nginx
Expand Down Expand Up @@ -281,7 +281,7 @@ jobs:

- name: Docker meta
id: meta
uses: docker/metadata-action@e6428a5c4e294a61438ed7f43155db912025b6b3 # v5.2.0
uses: docker/metadata-action@31cebacef4805868f9ce9a0cb03ee36c32df2ac4 # v5.3.0
with:
images: |
name=ghcr.io/nginxinc/nginx-gateway-fabric${{ matrix.container == 'nginx' && '/nginx' || '' }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/conformance.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ jobs:

- name: NGF Docker meta
id: ngf-meta
uses: docker/metadata-action@e6428a5c4e294a61438ed7f43155db912025b6b3 # v5.2.0
uses: docker/metadata-action@31cebacef4805868f9ce9a0cb03ee36c32df2ac4 # v5.3.0
with:
images: |
name=ghcr.io/nginxinc/nginx-gateway-fabric
Expand All @@ -60,7 +60,7 @@ jobs:
- name: NGINX Docker meta
id: nginx-meta
uses: docker/metadata-action@e6428a5c4e294a61438ed7f43155db912025b6b3 # v5.2.0
uses: docker/metadata-action@31cebacef4805868f9ce9a0cb03ee36c32df2ac4 # v5.3.0
with:
images: |
name=ghcr.io/nginxinc/nginx-gateway-fabric/nginx
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/update-docker-images.yml
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ jobs:

- name: Docker meta
id: meta
uses: docker/metadata-action@e6428a5c4e294a61438ed7f43155db912025b6b3 # v5.2.0
uses: docker/metadata-action@31cebacef4805868f9ce9a0cb03ee36c32df2ac4 # v5.3.0
with:
images: |
name=ghcr.io/nginxinc/nginx-gateway-fabric/nginx
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ and `UDPRoute` -- to configure an HTTP or TCP/UDP load balancer, reverse-proxy,
on Kubernetes. NGINX Gateway Fabric supports a subset of the Gateway API.

For a list of supported Gateway API resources and features, see
the [Gateway API Compatibility](https://docs.nginx.com/nginx-gateway-fabric/gateway-api-compatibility/) doc.
the [Gateway API Compatibility](https://docs.nginx.com/nginx-gateway-fabric/overview/gateway-api-compatibility/) doc.

Learn about our [design principles](/docs/developer/design-principles.md) and [architecture](https://docs.nginx.com/nginx-gateway-fabric/overview/gateway-architecture/).

Expand Down
63 changes: 49 additions & 14 deletions deploy/helm-chart/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,15 +66,22 @@ If you are installing the edge version of NGINX Gateway Fabric:

### Installing the Chart from the OCI Registry

To install the chart with the release name `my-release` (`my-release` is the name that you choose) into the
nginx-gateway namespace (with optional `--create-namespace` flag - you can omit if the namespace already exists):
To install the latest stable release of NGINX Gateway Fabric in the `nginx-gateway` namespace, run the following command:

```shell
helm install my-release oci://ghcr.io/nginxinc/charts/nginx-gateway-fabric --create-namespace --wait -n nginx-gateway
helm install ngf oci://ghcr.io/nginxinc/charts/nginx-gateway-fabric --create-namespace -n nginx-gateway
```

This will install the latest stable release. To install the latest version from the `main` branch, specify the
`--version 0.0.0-edge` flag when installing.
`ngf` is the name of the release, and can be changed to any name you want. This name is added as a prefix to the Deployment name.

If the namespace already exists, you can omit the optional `--create-namespace` flag. If you want the latest version from the `main` branch, add `--version 0.0.0-edge` to your install command.

To wait for the Deployment to be ready, you can either add the `--wait` flag to the `helm install` command, or run
the following after installing:

```shell
kubectl wait --timeout=5m -n nginx-gateway deployment/ngf-nginx-gateway-fabric --for=condition=Available
```

### Installing the Chart via Sources

Expand All @@ -90,11 +97,39 @@ This will pull the latest stable release. To pull the latest version from the `m

#### Installing the Chart

To install the chart with the release name `my-release` (`my-release` is the name that you choose) into the
nginx-gateway namespace (with optional `--create-namespace` flag - you can omit if the namespace already exists):
To install the chart into the `nginx-gateway` namespace, run the following command.

```shell
helm install ngf . --create-namespace -n nginx-gateway
```

`ngf` is the name of the release, and can be changed to any name you want. This name is added as a prefix to the Deployment name.

If the namespace already exists, you can omit the optional `--create-namespace` flag.

To wait for the Deployment to be ready, you can either add the `--wait` flag to the `helm install` command, or run
the following after installing:

```shell
kubectl wait --timeout=5m -n nginx-gateway deployment/ngf-nginx-gateway-fabric --for=condition=Available
```

### Custom installation options

#### Service type

By default, the NGINX Gateway Fabric helm chart deploys a LoadBalancer Service.

To use a NodePort Service instead:

```shell
helm install ngf oci://ghcr.io/nginxinc/charts/nginx-gateway-fabric --create-namespace -n nginx-gateway --set service.type=NodePort
```

To disable the creation of a Service:

```shell
helm install my-release . --create-namespace --wait -n nginx-gateway
helm install ngf oci://ghcr.io/nginxinc/charts/nginx-gateway-fabric --create-namespace -n nginx-gateway --set service.create=false
```

## Upgrading the Chart
Expand Down Expand Up @@ -145,10 +180,10 @@ Warning: kubectl apply should be used on resource created by either kubectl crea

### Upgrading the Chart from the OCI Registry

To upgrade the release `my-release`, run:
To upgrade the release `ngf`, run:

```shell
helm upgrade my-release oci://ghcr.io/nginxinc/charts/nginx-gateway-fabric -n nginx-gateway
helm upgrade ngf oci://ghcr.io/nginxinc/charts/nginx-gateway-fabric -n nginx-gateway
```

This will upgrade to the latest stable release. To upgrade to the latest version from the `main` branch, specify
Expand All @@ -157,10 +192,10 @@ the `--version 0.0.0-edge` flag when upgrading.
### Upgrading the Chart from the Sources

Pull the chart sources as described in [Pulling the Chart](#pulling-the-chart), if not already present. Then, to upgrade
the release `my-release`, run:
the release `ngf`, run:

```shell
helm upgrade my-release . -n nginx-gateway
helm upgrade ngf . -n nginx-gateway
```

### Configure Delayed Termination for Zero Downtime Upgrades
Expand Down Expand Up @@ -216,10 +251,10 @@ being performed on NGF), you may need to configure delayed termination on the NG

## Uninstalling the Chart

To uninstall/delete the release `my-release`:
To uninstall/delete the release `ngf`:

```shell
helm uninstall my-release -n nginx-gateway
helm uninstall ngf -n nginx-gateway
kubectl delete ns nginx-gateway
kubectl delete crd nginxgateways.gateway.nginx.org
```
Expand Down
2 changes: 1 addition & 1 deletion docs/developer/quickstart.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ fully prepared development environment that allows you to contribute to the proj
Follow these steps to set up your development environment.

1. Install:
- [Go](https://golang.org/doc/install)
- [Go](https://golang.org/doc/install) v1.21.0+
- [Docker](https://docs.docker.com/get-docker/) v18.09+
- [Kind](https://kind.sigs.k8s.io/docs/user/quick-start/)
- [Helm](https://helm.sh/docs/intro/quickstart/#install-helm)
Expand Down
54 changes: 44 additions & 10 deletions site/content/installation/installing-ngf/helm.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,18 @@ To complete this guide, you'll need to install:
- To install the latest stable release of NGINX Gateway Fabric in the **nginx-gateway** namespace, run the following command:

```shell
helm install <my-release> oci://ghcr.io/nginxinc/charts/nginx-gateway-fabric --create-namespace --wait -n nginx-gateway
helm install ngf oci://ghcr.io/nginxinc/charts/nginx-gateway-fabric --create-namespace -n nginx-gateway
```

Change `<my-release>` to the name you want for your release. If the namespace already exists, you can omit the optional `--create-namespace` flag. If you want the latest version from the **main** branch, add `--version 0.0.0-edge` to your install command.
`ngf` is the name of the release, and can be changed to any name you want. This name is added as a prefix to the Deployment name.

If the namespace already exists, you can omit the optional `--create-namespace` flag. If you want the latest version from the **main** branch, add `--version 0.0.0-edge` to your install command.

To wait for the Deployment to be ready, you can either add the `--wait` flag to the `helm install` command, or run the following after installing:

```shell
kubectl wait --timeout=5m -n nginx-gateway deployment/ngf-nginx-gateway-fabric --for=condition=Available
```

### Install from sources {#install-from-sources}

Expand All @@ -39,10 +47,36 @@ To complete this guide, you'll need to install:
2. To install the chart into the **nginx-gateway** namespace, run the following command.

```shell
helm install <my-release> . --create-namespace --wait -n nginx-gateway
helm install ngf . --create-namespace -n nginx-gateway
```

Change `<my-release>` to the name you want for your release. If the namespace already exists, you can omit the optional `--create-namespace` flag.
`ngf` is the name of the release, and can be changed to any name you want. This name is added as a prefix to the Deployment name.

If the namespace already exists, you can omit the optional `--create-namespace` flag.

To wait for the Deployment to be ready, you can either add the `--wait` flag to the `helm install` command, or run the following after installing:

```shell
kubectl wait --timeout=5m -n nginx-gateway deployment/ngf-nginx-gateway-fabric --for=condition=Available
```

### Custom installation options

#### Service type

By default, the NGINX Gateway Fabric helm chart deploys a LoadBalancer Service.

To use a NodePort Service instead:

```shell
helm install ngf oci://ghcr.io/nginxinc/charts/nginx-gateway-fabric --create-namespace -n nginx-gateway --set service.type=NodePort
```

To disable the creation of a Service:

```shell
helm install ngf oci://ghcr.io/nginxinc/charts/nginx-gateway-fabric --create-namespace -n nginx-gateway --set service.create=false
```

## Upgrade NGINX Gateway Fabric

Expand Down Expand Up @@ -89,10 +123,10 @@ To upgrade the CRDs, take the following steps:
- To upgrade to the latest stable release of NGINX Gateway Fabric, run:
```shell
helm upgrade <my-release> oci://ghcr.io/nginxinc/charts/nginx-gateway-fabric -n nginx-gateway
helm upgrade ngf oci://ghcr.io/nginxinc/charts/nginx-gateway-fabric -n nginx-gateway
```
Replace `<my-release>` with your chosen release name.
If needed, replace `ngf` with your chosen release name.
#### Upgrade from sources
Expand All @@ -101,10 +135,10 @@ To upgrade the CRDs, take the following steps:
1. To upgrade, run: the following command:
```shell
helm upgrade <my-release> . -n nginx-gateway
helm upgrade ngf . -n nginx-gateway
```
Replace `<my-release>` with your chosen release name.
If needed, replace `ngf` with your chosen release name.
## Delay pod termination for zero downtime upgrades {#configure-delayed-pod-termination-for-zero-downtime-upgrades}
Expand Down Expand Up @@ -163,10 +197,10 @@ Follow these steps to uninstall NGINX Gateway Fabric and Gateway API from your K
- To uninstall NGINX Gateway Fabric, run:
```shell
helm uninstall <my-release> -n nginx-gateway
helm uninstall ngf -n nginx-gateway
```
Replace `<my-release>` with your chosen release name.
If needed, replace `ngf` with your chosen release name.
2. **Remove namespace and CRDs:**
Expand Down
6 changes: 4 additions & 2 deletions site/content/installation/running-on-kind.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ make create-kind-cluster

Follow the [installation](./how-to/installation/installation.md) instructions to deploy NGINX Gateway Fabric on your Kind cluster.

{{<note>}} For `kind` clusters, NodePort services require [extra configuration](https://kind.sigs.k8s.io/docs/user/configuration/#nodeport-with-port-mappings) and LoadBalancer services need [a third-party controller](https://kind.sigs.k8s.io/docs/user/loadbalancer/) like MetalLB for external IP assignment. However, the Helm chart creates a LoadBalancer service by default. To avoid this, you can disable service creation by adding `--set service.create=false` to your Helm command and use the port-forwarding command below instead to try out the examples. {{</note>}}

## Access NGINX Gateway Fabric

Forward local ports 8080 and 8443 to ports 80 and 443 of the nginx-gateway Pod:
Expand All @@ -33,8 +35,8 @@ Forward local ports 8080 and 8443 to ports 80 and 443 of the nginx-gateway Pod:
kubectl -n nginx-gateway port-forward <pod-name> 8080:80 8443:443
```

> Note: NGINX will not listen on any ports until you configure a
> [Gateway](https://gateway-api.sigs.k8s.io/api-types/gateway/#gateway) resource with a valid listener.
{{<note>}} NGINX will not listen on any ports until you configure a [Gateway](https://gateway-api.sigs.k8s.io/api-types/gateway/#gateway) resource with a valid listener. {{</note>}}


## Use NGINX Gateway Fabric

Expand Down

0 comments on commit 1976f20

Please sign in to comment.