From 394aaa51b1abcc25a51856d1d794f3d1a7ee5ab7 Mon Sep 17 00:00:00 2001 From: Sanath Kumar Date: Mon, 4 Dec 2023 06:54:54 -0800 Subject: [PATCH 1/6] docs: update the readme with correct compatibility doc link (#1322) docs: update the readme with correct compatibility doc --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 8d5f25818..f5e642949 100644 --- a/README.md +++ b/README.md @@ -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/). From 6bc90a88fd614e477d6df3cc1c04c916cbfbe845 Mon Sep 17 00:00:00 2001 From: Kai-Hsun Chen Date: Mon, 4 Dec 2023 07:03:04 -0800 Subject: [PATCH 2/6] [Doc] Update Helm chart instructions to avoid UX friction when using Kind (#1281) For kind clusters, NodePort services require extra configuration and LoadBalancer services need a third-party controller like MetalLB for external IP assignment. However, the Helm chart creates a LoadBalancer service by default. Therefore, the --wait flag will hang until timeout. The guide running-on-kind.md asks users to create a Kind cluster by running the make create-kind-cluster command. However, the command neither sets the extraPortMappings Kind configs nor installs MetalLB, so users cannot use NodePort and LoadBalancer directly after running the command. This PR suggests users disable the creation of NodePort / LoadBalancer Kubernetes service, and uses the port-forwarding command from the running-on-kind.md guide. --------- Co-authored-by: Saylor Berman Co-authored-by: Alan Dooley --- site/content/installation/running-on-kind.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/site/content/installation/running-on-kind.md b/site/content/installation/running-on-kind.md index 01e6cf734..38f97fc91 100644 --- a/site/content/installation/running-on-kind.md +++ b/site/content/installation/running-on-kind.md @@ -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. +{{}} 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. {{}} + ## Access NGINX Gateway Fabric Forward local ports 8080 and 8443 to ports 80 and 443 of the nginx-gateway Pod: @@ -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 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. +{{}} 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. {{}} + ## Use NGINX Gateway Fabric From 78be712ad863c16e577c8fe23e774b5cc7707d34 Mon Sep 17 00:00:00 2001 From: Saylor Berman Date: Mon, 4 Dec 2023 10:42:39 -0700 Subject: [PATCH 3/6] Add more detail to helm install commands (#1299) Problem: Some environments may not want to have a Service installed by default. Our instructions for installing via helm are not clear about this. Solution: Update helm installation docs to be clear about how to alter the installation commands. Also cleaned up the commands/docs a bit. --- deploy/helm-chart/README.md | 63 ++++++++++++++----- .../installation/installing-ngf/helm.md | 54 +++++++++++++--- 2 files changed, 93 insertions(+), 24 deletions(-) diff --git a/deploy/helm-chart/README.md b/deploy/helm-chart/README.md index 2801de2a9..d20d60313 100644 --- a/deploy/helm-chart/README.md +++ b/deploy/helm-chart/README.md @@ -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 @@ -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 @@ -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 @@ -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 @@ -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 ``` diff --git a/site/content/installation/installing-ngf/helm.md b/site/content/installation/installing-ngf/helm.md index 33ebb0162..f79f474ca 100644 --- a/site/content/installation/installing-ngf/helm.md +++ b/site/content/installation/installing-ngf/helm.md @@ -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 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 `` 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} @@ -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 . --create-namespace --wait -n nginx-gateway + helm install ngf . --create-namespace -n nginx-gateway ``` - Change `` 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 @@ -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 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 `` with your chosen release name. + If needed, replace `ngf` with your chosen release name. #### Upgrade from sources @@ -101,10 +135,10 @@ To upgrade the CRDs, take the following steps: 1. To upgrade, run: the following command: ```shell - helm upgrade . -n nginx-gateway + helm upgrade ngf . -n nginx-gateway ``` - Replace `` 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} @@ -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 -n nginx-gateway + helm uninstall ngf -n nginx-gateway ``` - Replace `` with your chosen release name. + If needed, replace `ngf` with your chosen release name. 2. **Remove namespace and CRDs:** From d3313ac48ec1b9c9c8c74cbac84e2f49d7146bca Mon Sep 17 00:00:00 2001 From: Kai-Hsun Chen Date: Mon, 4 Dec 2023 09:51:53 -0800 Subject: [PATCH 4/6] [Doc] Mention minimum Go version required for development (#1288) --- docs/developer/quickstart.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/developer/quickstart.md b/docs/developer/quickstart.md index 8276761ea..d9aa56bcf 100644 --- a/docs/developer/quickstart.md +++ b/docs/developer/quickstart.md @@ -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) From f85f4b131d61c9db7df17474022bab68cd32fed3 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 4 Dec 2023 19:03:24 +0000 Subject: [PATCH 5/6] Bump docker/metadata-action from 5.2.0 to 5.3.0 (#1325) Bumps [docker/metadata-action](https://github.com/docker/metadata-action) from 5.2.0 to 5.3.0. - [Release notes](https://github.com/docker/metadata-action/releases) - [Commits](https://github.com/docker/metadata-action/compare/e6428a5c4e294a61438ed7f43155db912025b6b3...31cebacef4805868f9ce9a0cb03ee36c32df2ac4) --- updated-dependencies: - dependency-name: docker/metadata-action dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/ci.yml | 6 +++--- .github/workflows/conformance.yml | 4 ++-- .github/workflows/update-docker-images.yml | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 47abc1c6f..27712db3f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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 @@ -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 @@ -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' || '' }} diff --git a/.github/workflows/conformance.yml b/.github/workflows/conformance.yml index d6a07a037..b9d87f996 100644 --- a/.github/workflows/conformance.yml +++ b/.github/workflows/conformance.yml @@ -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 @@ -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 diff --git a/.github/workflows/update-docker-images.yml b/.github/workflows/update-docker-images.yml index 4b3ec2b72..2792e6f79 100644 --- a/.github/workflows/update-docker-images.yml +++ b/.github/workflows/update-docker-images.yml @@ -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 From b49d802fb82e9463d9f045ca318e4ad25fc33f1b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 4 Dec 2023 19:11:00 +0000 Subject: [PATCH 6/6] Bump anchore/sbom-action from 0.15.0 to 0.15.1 (#1326) Bumps [anchore/sbom-action](https://github.com/anchore/sbom-action) from 0.15.0 to 0.15.1. - [Release notes](https://github.com/anchore/sbom-action/releases) - [Commits](https://github.com/anchore/sbom-action/compare/fd74a6fb98a204a1ad35bbfae0122c1a302ff88b...5ecf649a417b8ae17dc8383dc32d46c03f2312df) --- updated-dependencies: - dependency-name: anchore/sbom-action dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 27712db3f..f97a671a7 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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