diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md index 44349beb12..551b7f5d79 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -20,10 +20,10 @@ Steps to reproduce the behavior: A clear and concise description of what you expected to happen. **Your environment** -* Version of the NGINX Kubernetes Gateway - release version or a specific commit. The first line of the nginx-gateway container logs includes the commit info. +* Version of the NGINX Gateway Fabric - release version or a specific commit. The first line of the nginx-gateway container logs includes the commit info. * Version of Kubernetes * Kubernetes platform (e.g. Mini-kube or GCP) -* Details on how you expose the NGINX Gateway Pod (e.g. Service of type LoadBalancer or port-forward) +* Details on how you expose the NGINX Gateway Fabric Pod (e.g. Service of type LoadBalancer or port-forward) * Logs of NGINX container: `kubectl -n nginx-gateway logs -l app=nginx-gateway -c nginx` * NGINX Configuration: `kubectl -n nginx-gateway exec -c nginx -- nginx -T` diff --git a/.github/ISSUE_TEMPLATE/enhancement.md b/.github/ISSUE_TEMPLATE/enhancement.md index e0fa12e99f..7139ce53bd 100644 --- a/.github/ISSUE_TEMPLATE/enhancement.md +++ b/.github/ISSUE_TEMPLATE/enhancement.md @@ -6,7 +6,7 @@ labels: 'enhancement' **Is your enhancement request related to a problem? Please describe.** @@ -23,5 +23,5 @@ Add any other context or screenshots about the enhancement request here. diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index bac3b514d6..e1fd9e0dee 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -19,7 +19,7 @@ Closes #ISSUE Before creating a PR, run through this checklist and mark each as complete. -- [ ] I have read the [CONTRIBUTING](https://github.com/nginxinc/nginx-kubernetes-gateway/blob/main/CONTRIBUTING.md) doc +- [ ] I have read the [CONTRIBUTING](https://github.com/nginxinc/nginx-gateway-fabric/blob/main/CONTRIBUTING.md) doc - [ ] I have added tests that prove my fix is effective or that my feature works - [ ] I have checked that all unit tests pass after adding my changes - [ ] I have updated necessary documentation diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f7035a0be6..c7e58f8458 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -121,7 +121,7 @@ jobs: collapse-after: 20 notes-header: | *Below is the auto-generated changelog, which includes all PRs that went into the release. - For a shorter version that highlights only important changes, see [CHANGELOG.md](https://github.com/nginxinc/nginx-kubernetes-gateway/blob/{{version}}/CHANGELOG.md).* + For a shorter version that highlights only important changes, see [CHANGELOG.md](https://github.com/nginxinc/nginx-gateway-fabric/blob/{{version}}/CHANGELOG.md).* if: ${{ github.event_name == 'push' && github.ref != 'refs/heads/main' }} - name: Download Syft @@ -149,7 +149,7 @@ jobs: uses: actions/cache@704facf57e6136b1bc63b828d79edcd491f0ee84 # v3.3.2 with: path: ${{ github.workspace }}/dist - key: nginx-kubernetes-gateway-${{ github.run_id }}-${{ github.run_number }} + key: nginx-gateway-fabric-${{ github.run_id }}-${{ github.run_number }} helm-tests: name: Helm Tests @@ -163,17 +163,17 @@ jobs: uses: actions/cache@704facf57e6136b1bc63b828d79edcd491f0ee84 # v3.3.2 with: path: ${{ github.workspace }}/dist - key: nginx-kubernetes-gateway-${{ github.run_id }}-${{ github.run_number }} + key: nginx-gateway-fabric-${{ github.run_id }}-${{ github.run_number }} - name: Docker Buildx uses: docker/setup-buildx-action@f95db51fddba0c2d1ec667646a06c2ce06100226 # v3.0.0 - - name: NKG Docker meta - id: nkg-meta + - name: NGF Docker meta + id: ngf-meta uses: docker/metadata-action@96383f45573cb7f253c731d3b3ab81c87ef81934 # v5.0.0 with: images: | - name=ghcr.io/nginxinc/nginx-kubernetes-gateway + name=ghcr.io/nginxinc/nginx-gateway-fabric tags: | type=semver,pattern={{version}} type=edge @@ -185,23 +185,23 @@ jobs: uses: docker/metadata-action@96383f45573cb7f253c731d3b3ab81c87ef81934 # v5.0.0 with: images: | - name=ghcr.io/nginxinc/nginx-kubernetes-gateway/nginx + name=ghcr.io/nginxinc/nginx-gateway-fabric/nginx tags: | type=semver,pattern={{version}} type=edge type=ref,event=pr type=ref,event=branch,suffix=-rc,enable=${{ startsWith(github.ref, 'refs/heads/release') }} - - name: Build NKG Docker Image + - name: Build NGF Docker Image uses: docker/build-push-action@0565240e2d4ab88bba5387d719585280857ece09 # v5.0.0 with: file: build/Dockerfile - tags: ${{ steps.nkg-meta.outputs.tags }} + tags: ${{ steps.ngf-meta.outputs.tags }} context: "." target: goreleaser load: true - cache-from: type=gha,scope=nkg - cache-to: type=gha,scope=nkg,mode=max + cache-from: type=gha,scope=ngf + cache-to: type=gha,scope=ngf,mode=max pull: true - name: Build NGINX Docker Image @@ -224,19 +224,19 @@ jobs: kube_config=${{ github.workspace }}/deploy/helm-chart/kube-${{ github.run_id }}-helm make create-kind-cluster KIND_KUBE_CONFIG=${kube_config} echo "KUBECONFIG=${kube_config}" >> "$GITHUB_ENV" - kind load docker-image ${{ steps.nkg-meta.outputs.tags }} ${{ steps.nginx-meta.outputs.tags }} + kind load docker-image ${{ steps.ngf-meta.outputs.tags }} ${{ steps.nginx-meta.outputs.tags }} kubectl apply -f https://github.com/kubernetes-sigs/gateway-api/releases/download/v0.8.0/standard-install.yaml kubectl wait --for=condition=complete job/gateway-api-admission-patch job/gateway-api-admission -n gateway-system - name: Install Chart run: > helm install - helm-$(echo ${{ steps.nkg-meta.outputs.tags }} | tr '.' '-' | cut -d ":" -f 2) + helm-$(echo ${{ steps.ngf-meta.outputs.tags }} | tr '.' '-' | cut -d ":" -f 2) . --wait --create-namespace - --set nginxGateway.image.repository=$(echo ${{ steps.nkg-meta.outputs.tags }} | cut -d ":" -f 1) - --set nginxGateway.image.tag=$(echo ${{ steps.nkg-meta.outputs.tags }} | cut -d ":" -f 2) + --set nginxGateway.image.repository=$(echo ${{ steps.ngf-meta.outputs.tags }} | cut -d ":" -f 1) + --set nginxGateway.image.tag=$(echo ${{ steps.ngf-meta.outputs.tags }} | cut -d ":" -f 2) --set nginxGateway.image.pullPolicy=Never --set nginx.image.repository=$(echo ${{ steps.nginx-meta.outputs.tags }} | cut -d ":" -f 1) --set nginx.image.tag=$(echo ${{ steps.nginx-meta.outputs.tags }} | cut -d ":" -f 2) @@ -252,7 +252,7 @@ jobs: strategy: fail-fast: false matrix: - container: [nkg, nginx] + container: [ngf, nginx] permissions: contents: read # for docker/build-push-action to read repo content security-events: write # for github/codeql-action/upload-sarif to upload SARIF results @@ -265,7 +265,7 @@ jobs: uses: actions/cache@704facf57e6136b1bc63b828d79edcd491f0ee84 # v3.3.2 with: path: ${{ github.workspace }}/dist - key: nginx-kubernetes-gateway-${{ github.run_id }}-${{ github.run_number }} + key: nginx-gateway-fabric-${{ github.run_id }}-${{ github.run_number }} - name: Docker Buildx uses: docker/setup-buildx-action@f95db51fddba0c2d1ec667646a06c2ce06100226 # v3.0.0 @@ -288,7 +288,7 @@ jobs: uses: docker/metadata-action@96383f45573cb7f253c731d3b3ab81c87ef81934 # v5.0.0 with: images: | - name=ghcr.io/nginxinc/nginx-kubernetes-gateway${{ matrix.container == 'nginx' && '/nginx' || '' }} + name=ghcr.io/nginxinc/nginx-gateway-fabric${{ matrix.container == 'nginx' && '/nginx' || '' }} tags: | type=semver,pattern={{version}} type=edge @@ -300,7 +300,7 @@ jobs: with: file: ${{ matrix.container == 'nginx' && 'build/Dockerfile.nginx' || 'build/Dockerfile' }} context: "." - target: ${{ matrix.container == 'nkg' && 'goreleaser' || '' }} + target: ${{ matrix.container == 'ngf' && 'goreleaser' || '' }} tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} load: ${{ github.event_name == 'pull_request' }} @@ -320,23 +320,23 @@ jobs: uses: aquasecurity/trivy-action@fbd16365eb88e12433951383f5e99bd901fc618f # 0.12.0 continue-on-error: true with: - image-ref: ghcr.io/nginxinc/nginx-kubernetes-gateway${{ matrix.container == 'nginx' && '/nginx' || '' }}:${{ steps.meta.outputs.version }} + image-ref: ghcr.io/nginxinc/nginx-gateway-fabric${{ matrix.container == 'nginx' && '/nginx' || '' }}:${{ steps.meta.outputs.version }} format: "sarif" - output: trivy-results-nginx-kubernetes-gateway${{ matrix.container == 'nginx' && '-nginx' || '' }}.sarif + output: trivy-results-nginx-gateway-fabric${{ matrix.container == 'nginx' && '-nginx' || '' }}.sarif ignore-unfixed: "true" - name: Upload Trivy scan results to GitHub Security tab uses: github/codeql-action/upload-sarif@6a28655e3dcb49cb0840ea372fd6d17733edd8a4 # v2.21.8 continue-on-error: true with: - sarif_file: trivy-results-nginx-kubernetes-gateway${{ matrix.container == 'nginx' && '-nginx' || '' }}.sarif + sarif_file: trivy-results-nginx-gateway-fabric${{ matrix.container == 'nginx' && '-nginx' || '' }}.sarif - name: Upload Scan Results uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3.1.3 continue-on-error: true with: - name: trivy-results-nginx-kubernetes-gateway${{ matrix.container == 'nginx' && '-nginx' || '' }}.sarif - path: trivy-results-nginx-kubernetes-gateway${{ matrix.container == 'nginx' && '-nginx' || '' }}.sarif + name: trivy-results-nginx-gateway-fabric${{ matrix.container == 'nginx' && '-nginx' || '' }}.sarif + path: trivy-results-nginx-gateway-fabric${{ matrix.container == 'nginx' && '-nginx' || '' }}.sarif if: always() publish-helm: diff --git a/.github/workflows/conformance.yml b/.github/workflows/conformance.yml index db10aae1ff..3288a66dab 100644 --- a/.github/workflows/conformance.yml +++ b/.github/workflows/conformance.yml @@ -45,12 +45,12 @@ jobs: - name: Docker Buildx uses: docker/setup-buildx-action@f95db51fddba0c2d1ec667646a06c2ce06100226 # v3.0.0 - - name: NKG Docker meta - id: nkg-meta + - name: NGF Docker meta + id: ngf-meta uses: docker/metadata-action@96383f45573cb7f253c731d3b3ab81c87ef81934 # v5.0.0 with: images: | - name=ghcr.io/nginxinc/nginx-kubernetes-gateway + name=ghcr.io/nginxinc/nginx-gateway-fabric tags: | type=semver,pattern={{version}} type=edge @@ -62,18 +62,18 @@ jobs: uses: docker/metadata-action@96383f45573cb7f253c731d3b3ab81c87ef81934 # v5.0.0 with: images: | - name=ghcr.io/nginxinc/nginx-kubernetes-gateway/nginx + name=ghcr.io/nginxinc/nginx-gateway-fabric/nginx tags: | type=semver,pattern={{version}} type=edge type=ref,event=pr type=ref,event=branch,suffix=-rc,enable=${{ startsWith(github.ref, 'refs/heads/release') }} - - name: Prepare NKG files + - name: Prepare NGF files run: | - nkg_prefix=$(echo ${{ steps.nkg-meta.outputs.tags }} | cut -d ":" -f 1) - nkg_tag=$(echo ${{ steps.nkg-meta.outputs.tags }} | cut -d ":" -f 2) - make update-nkg-manifest NKG_PREFIX=${nkg_prefix} NKG_TAG=${nkg_tag} + ngf_prefix=$(echo ${{ steps.ngf-meta.outputs.tags }} | cut -d ":" -f 1) + ngf_tag=$(echo ${{ steps.ngf-meta.outputs.tags }} | cut -d ":" -f 2) + make update-ngf-manifest NGF_PREFIX=${ngf_prefix} NGF_TAG=${ngf_tag} working-directory: ./conformance - name: Build binary @@ -82,16 +82,16 @@ jobs: version: latest args: build --snapshot --clean - - name: Build NKG Docker Image + - name: Build NGF Docker Image uses: docker/build-push-action@0565240e2d4ab88bba5387d719585280857ece09 # v5.0.0 with: file: build/Dockerfile - tags: ${{ steps.nkg-meta.outputs.tags }} + tags: ${{ steps.ngf-meta.outputs.tags }} context: "." target: goreleaser load: true - cache-from: type=gha,scope=nkg - cache-to: type=gha,scope=nkg,mode=max + cache-from: type=gha,scope=ngf + cache-to: type=gha,scope=ngf,mode=max pull: true - name: Build NGINX Docker Image @@ -142,12 +142,12 @@ jobs: - name: Setup conformance tests run: | - nkg_prefix=$(echo ${{ steps.nkg-meta.outputs.tags }} | cut -d ":" -f 1) - nkg_tag=$(echo ${{ steps.nkg-meta.outputs.tags }} | cut -d ":" -f 2) + ngf_prefix=$(echo ${{ steps.ngf-meta.outputs.tags }} | cut -d ":" -f 1) + ngf_tag=$(echo ${{ steps.ngf-meta.outputs.tags }} | cut -d ":" -f 2) if [ ${{ github.event_name }} == "schedule" ]; then export GW_API_VERSION=main fi - make install-nkg-local-no-build NKG_PREFIX=${nkg_prefix} NKG_TAG=${nkg_tag} + make install-ngf-local-no-build NGF_PREFIX=${ngf_prefix} NGF_TAG=${ngf_tag} working-directory: ./conformance - name: Run conformance tests diff --git a/.github/workflows/mend.yml b/.github/workflows/mend.yml index 25685df4a7..9cea493a9c 100644 --- a/.github/workflows/mend.yml +++ b/.github/workflows/mend.yml @@ -31,6 +31,6 @@ jobs: run: jarsigner -verify wss-unified-agent.jar - name: Scan and upload env: - PRODUCT_NAME: nginx-kubernetes-gateway_${{ github.ref_name }} - PROJECT_NAME: nginx-kubernetes-gateway + PRODUCT_NAME: nginx-gateway-fabric_${{ github.ref_name }} + PROJECT_NAME: nginx-gateway-fabric run: java -jar wss-unified-agent.jar -noConfig true -wss.url ${{ secrets.WSS_URL }} -apiKey ${{ secrets.WSS_NGINX_TOKEN }} -product $PRODUCT_NAME -project $PROJECT_NAME -d . diff --git a/.github/workflows/update-docker-images.yml b/.github/workflows/update-docker-images.yml index 5a1f4e54ba..82b01bdb72 100644 --- a/.github/workflows/update-docker-images.yml +++ b/.github/workflows/update-docker-images.yml @@ -23,7 +23,7 @@ jobs: name: Get versions of base images runs-on: ubuntu-22.04 outputs: - nkg_tag: ${{ steps.nkg.outputs.tag }} + ngf_tag: ${{ steps.ngf.outputs.tag }} nginx_version: ${{ steps.nginx.outputs.nginx_version }} steps: - name: Checkout Repository @@ -31,16 +31,16 @@ jobs: with: fetch-depth: 0 - - name: Set NKG version - id: nkg + - name: Set NGF version + id: ngf run: | tag="$(git tag --sort=-version:refname | head -n1)" echo "tag=${tag//v}" >> $GITHUB_OUTPUT - - name: Checkout Repository at ${{ steps.nkg.outputs.tag }} + - name: Checkout Repository at ${{ steps.ngf.outputs.tag }} uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0 with: - ref: refs/tags/v${{ steps.nkg.outputs.tag }} + ref: refs/tags/v${{ steps.ngf.outputs.tag }} - name: Set NGINX version id: nginx @@ -60,7 +60,7 @@ jobs: uses: lucacome/docker-image-update-checker@f50d56412b948cfdbb842c5419372681e0db3df1 # v1.2.1 with: base-image: ${{ needs.variables.outputs.nginx_version }} - image: ghcr.io/nginxinc/nginx-kubernetes-gateway/nginx:${{ needs.variables.outputs.nkg_tag }} + image: ghcr.io/nginxinc/nginx-gateway-fabric/nginx:${{ needs.variables.outputs.ngf_tag }} platforms: ${{ env.platforms }} - id: needs @@ -101,9 +101,9 @@ jobs: uses: docker/metadata-action@96383f45573cb7f253c731d3b3ab81c87ef81934 # v5.0.0 with: images: | - name=ghcr.io/nginxinc/nginx-kubernetes-gateway/nginx + name=ghcr.io/nginxinc/nginx-gateway-fabric/nginx tags: | - ${{ needs.variables.outputs.nkg_tag }} + ${{ needs.variables.outputs.ngf_tag }} - name: Build Docker Image uses: docker/build-push-action@0565240e2d4ab88bba5387d719585280857ece09 # v5.0.0 @@ -126,21 +126,21 @@ jobs: uses: aquasecurity/trivy-action@fbd16365eb88e12433951383f5e99bd901fc618f # 0.12.0 continue-on-error: true with: - image-ref: ghcr.io/nginxinc/nginx-kubernetes-gateway/nginx:${{ needs.variables.outputs.nkg_tag }} + image-ref: ghcr.io/nginxinc/nginx-gateway-fabric/nginx:${{ needs.variables.outputs.ngf_tag }} format: "sarif" - output: trivy-results-nginx-kubernetes-gateway-nginx + output: trivy-results-nginx-gateway-fabric-nginx ignore-unfixed: "true" - name: Upload Trivy scan results to GitHub Security tab uses: github/codeql-action/upload-sarif@6a28655e3dcb49cb0840ea372fd6d17733edd8a4 # v2.21.8 continue-on-error: true with: - sarif_file: trivy-results-nginx-kubernetes-gateway-nginx + sarif_file: trivy-results-nginx-gateway-fabric-nginx - name: Upload Scan Results uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3.1.3 continue-on-error: true with: - name: trivy-results-nginx-kubernetes-gateway-nginx - path: trivy-results-nginx-kubernetes-gateway-nginx + name: trivy-results-nginx-gateway-fabric-nginx + path: trivy-results-nginx-gateway-fabric-nginx if: always() diff --git a/.golangci.yml b/.golangci.yml index 7b84de3ecc..fbdd3f4620 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -1,6 +1,6 @@ linters-settings: goimports: - local-prefixes: github.com/nginxinc/nginx-kubernetes-gateway + local-prefixes: github.com/nginxinc/nginx-gateway-fabric misspell: locale: US revive: diff --git a/.goreleaser.yml b/.goreleaser.yml index c494cc0a5a..a05a5ec53c 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -48,7 +48,7 @@ announce: slack: enabled: true channel: '#announcements' - message_template: 'NGINX Kubernetes Gateway {{ .Tag }} is out! Check it out: {{ .ReleaseURL }}' + message_template: 'NGINX Gateway Fabric {{ .Tag }} is out! Check it out: {{ .ReleaseURL }}' milestones: - close: true diff --git a/CHANGELOG.md b/CHANGELOG.md index 56927abd44..a93357a126 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,7 +1,7 @@ # Changelog This document includes a curated changelog for each release. We also publish a changelog as the description of -a [GitHub release](https://github.com/nginxinc/nginx-kubernetes-gateway/releases), which, by contrast, is auto-generated +a [GitHub release](https://github.com/nginxinc/nginx-gateway-fabric/releases), which, by contrast, is auto-generated and includes links to all PRs that went into the release. ## Release 0.6.0 @@ -12,37 +12,48 @@ This release adds a Helm chart, dynamic control plane logging, Prometheus metric FEATURES: -- Helm chart. [PR-840](https://github.com/nginxinc/nginx-kubernetes-gateway/pull/840) -- Use custom nginx container. [PR-934](https://github.com/nginxinc/nginx-kubernetes-gateway/pull/934) -- Support dynamic control plane logging. [PR-943](https://github.com/nginxinc/nginx-kubernetes-gateway/pull/943) -- Support websocket connections. [PR-962](https://github.com/nginxinc/nginx-kubernetes-gateway/pull/962) -- Support Prometheus metrics. [PR-999](https://github.com/nginxinc/nginx-kubernetes-gateway/pull/999) +- Helm chart. [PR-840](https://github.com/nginxinc/nginx-gateway-fabric/pull/840) +- Use custom nginx container. [PR-934](https://github.com/nginxinc/nginx-gateway-fabric/pull/934) +- Support dynamic control plane logging. [PR-943](https://github.com/nginxinc/nginx-gateway-fabric/pull/943) +- Support websocket connections. [PR-962](https://github.com/nginxinc/nginx-gateway-fabric/pull/962) +- Support Prometheus metrics. [PR-999](https://github.com/nginxinc/nginx-gateway-fabric/pull/999) BUG FIXES: -- Ensure NGINX Kubernetes Gateway has least privileges. [PR-1004](https://github.com/nginxinc/nginx-kubernetes-gateway/pull/1004) +- Ensure NGINX Kubernetes Gateway has least privileges. [PR-1004](https://github.com/nginxinc/nginx-gateway-fabric/pull/1004) DOCUMENTATION: -- Use case guides: https://github.com/nginxinc/nginx-kubernetes-gateway/tree/v0.6.0/docs/guides +- Use case guides: https://github.com/nginxinc/nginx-gateway-fabric/tree/v0.6.0/docs/guides + +COMPATIBILITY: + +- The Gateway API version: `0.8.0` +- NGINX version: `1.25.2` +- Kubernetes version: `1.23+` + +CONTAINER IMAGES: + +- Control plane: `ghcr.io/nginxinc/nginx-kubernetes-gateway:0.6.0` +- Data plane: `ghcr.io/nginxinc/nginx-kubernetes-gateway/nginx:0.6.0` ## Release 0.5.0 *July 17, 2023* -This release completes all v1beta1 Core features of the Gateway API resources. See the [Gateway Compatibility doc](https://github.com/nginxinc/nginx-kubernetes-gateway/blob/v0.5.0/docs/gateway-api-compatibility.md) +This release completes all v1beta1 Core features of the Gateway API resources. See the [Gateway Compatibility doc](https://github.com/nginxinc/nginx-gateway-fabric/blob/v0.5.0/docs/gateway-api-compatibility.md) FEATURES: -- Support cross-namespace BackendRefs in HTTPRoutes. [PR-806](https://github.com/nginxinc/nginx-kubernetes-gateway/pull/806) -- Support dynamic certificate rotation with Kubernetes Secrets. [PR-807](https://github.com/nginxinc/nginx-kubernetes-gateway/pull/807) -- Support SupportedKinds in ListenerStatus. [PR-809](https://github.com/nginxinc/nginx-kubernetes-gateway/pull/809) +- Support cross-namespace BackendRefs in HTTPRoutes. [PR-806](https://github.com/nginxinc/nginx-gateway-fabric/pull/806) +- Support dynamic certificate rotation with Kubernetes Secrets. [PR-807](https://github.com/nginxinc/nginx-gateway-fabric/pull/807) +- Support SupportedKinds in ListenerStatus. [PR-809](https://github.com/nginxinc/nginx-gateway-fabric/pull/809) BUG FIXES: -- Set redirect port in location header according to the scheme. [PR-801](https://github.com/nginxinc/nginx-kubernetes-gateway/pull/801) -- Set proxy host header to the exact value of the request host header. [PR-827](https://github.com/nginxinc/nginx-kubernetes-gateway/pull/827) -- Ensure Prefix matching requires trailing slash. [PR-817](https://github.com/nginxinc/nginx-kubernetes-gateway/pull/817) +- Set redirect port in location header according to the scheme. [PR-801](https://github.com/nginxinc/nginx-gateway-fabric/pull/801) +- Set proxy host header to the exact value of the request host header. [PR-827](https://github.com/nginxinc/nginx-gateway-fabric/pull/827) +- Ensure Prefix matching requires trailing slash. [PR-817](https://github.com/nginxinc/nginx-gateway-fabric/pull/817) COMPATIBILITY: @@ -62,46 +73,46 @@ CONTAINER IMAGES: This release brings: -- Support for more features of the Gateway API resources. See the [Gateway Compatibility doc](https://github.com/nginxinc/nginx-kubernetes-gateway/blob/v0.4.0/docs/gateway-api-compatibility.md) -- Support for running the conformance test suite. See the [Conformance tests README](https://github.com/nginxinc/nginx-kubernetes-gateway/blob/v0.4.0/conformance/README.md). -- Defined Enhancement Proposal process for NGINX Kubernetes Gateway project. See the [Enhancement Proposal README](https://github.com/nginxinc/nginx-kubernetes-gateway/blob/v0.4.0/docs/proposals/README.md). -- Improved developer documentation for contributing to the project. See the [Development quickstart](https://github.com/nginxinc/nginx-kubernetes-gateway/blob/v0.4.0/docs/developer/quickstart.md). -- Architecture document that explains how NGINX Kubernetes Gateway works at a high level. See the [Architecture doc](https://github.com/nginxinc/nginx-kubernetes-gateway/blob/v0.4.0/docs/architecture.md) +- Support for more features of the Gateway API resources. See the [Gateway Compatibility doc](https://github.com/nginxinc/nginx-gateway-fabric/blob/v0.4.0/docs/gateway-api-compatibility.md) +- Support for running the conformance test suite. See the [Conformance tests README](https://github.com/nginxinc/nginx-gateway-fabric/blob/v0.4.0/conformance/README.md). +- Defined Enhancement Proposal process for NGINX Kubernetes Gateway project. See the [Enhancement Proposal README](https://github.com/nginxinc/nginx-gateway-fabric/blob/v0.4.0/docs/proposals/README.md). +- Improved developer documentation for contributing to the project. See the [Development quickstart](https://github.com/nginxinc/nginx-gateway-fabric/blob/v0.4.0/docs/developer/quickstart.md). +- Architecture document that explains how NGINX Kubernetes Gateway works at a high level. See the [Architecture doc](https://github.com/nginxinc/nginx-gateway-fabric/blob/v0.4.0/docs/architecture.md) - Miscellaneous enhancements and bug fixes. FEATURES: -- Allow empty sectionName in HTTPRoute parentRef. [PR-626](https://github.com/nginxinc/nginx-kubernetes-gateway/pull/626) -- Exact PathMatch support for HTTPRoutes. [PR-603](https://github.com/nginxinc/nginx-kubernetes-gateway/pull/603) -- Set ResolvedRefs condition to true on HTTPRoutes. [PR-645](https://github.com/nginxinc/nginx-kubernetes-gateway/pull/645) -- Set gateway Pod IP as GatewayStatus address. [PR-638](https://github.com/nginxinc/nginx-kubernetes-gateway/pull/638) -- Set Accepted condition type on Gateway status. [PR-633](https://github.com/nginxinc/nginx-kubernetes-gateway/pull/633) -- Drop unrequired capabilities from containers. [PR-677](https://github.com/nginxinc/nginx-kubernetes-gateway/pull/677) -- Update route condition where listener is not found. [PR-675](https://github.com/nginxinc/nginx-kubernetes-gateway/pull/675) -- Set Gateway Programmed condition. [PR-658](https://github.com/nginxinc/nginx-kubernetes-gateway/pull/658) -- AllowedRoutes support for Listeners. [PR-721](https://github.com/nginxinc/nginx-kubernetes-gateway/pull/721) -- Support custom listener ports. [PR-745](https://github.com/nginxinc/nginx-kubernetes-gateway/pull/745) -- Add support for RequestHeaderModifier for HTTPRouteRule objects. [PR-717](https://github.com/nginxinc/nginx-kubernetes-gateway/pull/717) -- Add wildcard hostname support. [PR-769](https://github.com/nginxinc/nginx-kubernetes-gateway/pull/769) -- Add Programmed status for listener. [PR-786](https://github.com/nginxinc/nginx-kubernetes-gateway/pull/786) -- ReferenceGrant from Gateway to Secret. [PR-791](https://github.com/nginxinc/nginx-kubernetes-gateway/pull/791) +- Allow empty sectionName in HTTPRoute parentRef. [PR-626](https://github.com/nginxinc/nginx-gateway-fabric/pull/626) +- Exact PathMatch support for HTTPRoutes. [PR-603](https://github.com/nginxinc/nginx-gateway-fabric/pull/603) +- Set ResolvedRefs condition to true on HTTPRoutes. [PR-645](https://github.com/nginxinc/nginx-gateway-fabric/pull/645) +- Set gateway Pod IP as GatewayStatus address. [PR-638](https://github.com/nginxinc/nginx-gateway-fabric/pull/638) +- Set Accepted condition type on Gateway status. [PR-633](https://github.com/nginxinc/nginx-gateway-fabric/pull/633) +- Drop unrequired capabilities from containers. [PR-677](https://github.com/nginxinc/nginx-gateway-fabric/pull/677) +- Update route condition where listener is not found. [PR-675](https://github.com/nginxinc/nginx-gateway-fabric/pull/675) +- Set Gateway Programmed condition. [PR-658](https://github.com/nginxinc/nginx-gateway-fabric/pull/658) +- AllowedRoutes support for Listeners. [PR-721](https://github.com/nginxinc/nginx-gateway-fabric/pull/721) +- Support custom listener ports. [PR-745](https://github.com/nginxinc/nginx-gateway-fabric/pull/745) +- Add support for RequestHeaderModifier for HTTPRouteRule objects. [PR-717](https://github.com/nginxinc/nginx-gateway-fabric/pull/717) +- Add wildcard hostname support. [PR-769](https://github.com/nginxinc/nginx-gateway-fabric/pull/769) +- Add Programmed status for listener. [PR-786](https://github.com/nginxinc/nginx-gateway-fabric/pull/786) +- ReferenceGrant from Gateway to Secret. [PR-791](https://github.com/nginxinc/nginx-gateway-fabric/pull/791) BUG FIXES: -- Set upstream zone size to 512k. [PR-609](https://github.com/nginxinc/nginx-kubernetes-gateway/pull/609) -- Allow empty HTTPRoute hostnames. [PR-650](https://github.com/nginxinc/nginx-kubernetes-gateway/pull/650) -- Allow long server names. [PR-651](https://github.com/nginxinc/nginx-kubernetes-gateway/pull/651) -- Add in required capabilities for writing TLS secrets. [PR-718](https://github.com/nginxinc/nginx-kubernetes-gateway/pull/718) -- Fix binding to multiple listeners with empty section name. [PR-730](https://github.com/nginxinc/nginx-kubernetes-gateway/pull/730) -- Add timeout and retry logic for finding NGINX PID file. [PR-676](https://github.com/nginxinc/nginx-kubernetes-gateway/pull/676) -- Prioritize method matching. [PR-789](https://github.com/nginxinc/nginx-kubernetes-gateway/pull/789) -- Add NewListenerInvalidRouteKinds condition. [PR-799](https://github.com/nginxinc/nginx-kubernetes-gateway/pull/799) -- Set ResolvedRefs/False/InvalidKind condition on the HTTPRoute if a BackendRef specifies an unknown kind. [PR-800](https://github.com/nginxinc/nginx-kubernetes-gateway/pull/800) -- Set GatewayClass status for ignored GatewayClasses. [PR-804](https://github.com/nginxinc/nginx-kubernetes-gateway/pull/804) +- Set upstream zone size to 512k. [PR-609](https://github.com/nginxinc/nginx-gateway-fabric/pull/609) +- Allow empty HTTPRoute hostnames. [PR-650](https://github.com/nginxinc/nginx-gateway-fabric/pull/650) +- Allow long server names. [PR-651](https://github.com/nginxinc/nginx-gateway-fabric/pull/651) +- Add in required capabilities for writing TLS secrets. [PR-718](https://github.com/nginxinc/nginx-gateway-fabric/pull/718) +- Fix binding to multiple listeners with empty section name. [PR-730](https://github.com/nginxinc/nginx-gateway-fabric/pull/730) +- Add timeout and retry logic for finding NGINX PID file. [PR-676](https://github.com/nginxinc/nginx-gateway-fabric/pull/676) +- Prioritize method matching. [PR-789](https://github.com/nginxinc/nginx-gateway-fabric/pull/789) +- Add NewListenerInvalidRouteKinds condition. [PR-799](https://github.com/nginxinc/nginx-gateway-fabric/pull/799) +- Set ResolvedRefs/False/InvalidKind condition on the HTTPRoute if a BackendRef specifies an unknown kind. [PR-800](https://github.com/nginxinc/nginx-gateway-fabric/pull/800) +- Set GatewayClass status for ignored GatewayClasses. [PR-804](https://github.com/nginxinc/nginx-gateway-fabric/pull/804) DEPENDENCIES: -- Bump sigs.k8s.io/gateway-api from 0.7.0 to 0.7.1. [PR-711](https://github.com/nginxinc/nginx-kubernetes-gateway/pull/711) +- Bump sigs.k8s.io/gateway-api from 0.7.0 to 0.7.1. [PR-711](https://github.com/nginxinc/nginx-gateway-fabric/pull/711) COMPATIBILITY: @@ -121,33 +132,33 @@ CONTAINER IMAGES: This release brings: -- Extensive validation of Gateway API resources for robustness, security and correctness. See the [validation doc](https://github.com/nginxinc/nginx-kubernetes-gateway/blob/v0.3.0/docs/resource-validation.md) +- Extensive validation of Gateway API resources for robustness, security and correctness. See the [validation doc](https://github.com/nginxinc/nginx-gateway-fabric/blob/v0.3.0/docs/resource-validation.md) for more details. -- Defined open-source development process for NGINX Kubernetes Gateway project. See the [Issue lifecycle doc](https://github.com/nginxinc/nginx-kubernetes-gateway/blob/v0.3.0/ISSUE_LIFECYCLE.md). +- Defined open-source development process for NGINX Kubernetes Gateway project. See the [Issue lifecycle doc](https://github.com/nginxinc/nginx-gateway-fabric/blob/v0.3.0/ISSUE_LIFECYCLE.md). - Miscellaneous enhancements and bug fixes. FEATURES: -- Report proper Conditions in status of HTTPRoute and Gateway when GatewayClass is invalid or doesn't exist. [PR-576](https://github.com/nginxinc/nginx-kubernetes-gateway/pull/576) -- Implement NKG-specific field validation for GatewayClasses. [PR-295](https://github.com/nginxinc/nginx-kubernetes-gateway/pull/495) -- Implement NKG-specific field validation for HTTPRoutes. [PR-455](https://github.com/nginxinc/nginx-kubernetes-gateway/pull/455) -- Implement NKG-specific field validation for Gateways. [PR-407](https://github.com/nginxinc/nginx-kubernetes-gateway/pull/407) -- Run webhook validation rules inside NKG control plane. [PR-388](https://github.com/nginxinc/nginx-kubernetes-gateway/pull/388) -- Make NGINX error log visible in NGINX container logs. [PR-319](https://github.com/nginxinc/nginx-kubernetes-gateway/pull/319) -- Always generate a root "/" location block in NGINX config to handle unmatched requests with 404 response. [PR-356](https://github.com/nginxinc/nginx-kubernetes-gateway/pull/356) +- Report proper Conditions in status of HTTPRoute and Gateway when GatewayClass is invalid or doesn't exist. [PR-576](https://github.com/nginxinc/nginx-gateway-fabric/pull/576) +- Implement NKG-specific field validation for GatewayClasses. [PR-295](https://github.com/nginxinc/nginx-gateway-fabric/pull/495) +- Implement NKG-specific field validation for HTTPRoutes. [PR-455](https://github.com/nginxinc/nginx-gateway-fabric/pull/455) +- Implement NKG-specific field validation for Gateways. [PR-407](https://github.com/nginxinc/nginx-gateway-fabric/pull/407) +- Run webhook validation rules inside NKG control plane. [PR-388](https://github.com/nginxinc/nginx-gateway-fabric/pull/388) +- Make NGINX error log visible in NGINX container logs. [PR-319](https://github.com/nginxinc/nginx-gateway-fabric/pull/319) +- Always generate a root "/" location block in NGINX config to handle unmatched requests with 404 response. [PR-356](https://github.com/nginxinc/nginx-gateway-fabric/pull/356) BUG FIXES: -- Fix HTTPRoute section name related bugs. [PR-568](https://github.com/nginxinc/nginx-kubernetes-gateway/pull/568) -- Fix Observed Generation for Gateway Status. [PR-351](https://github.com/nginxinc/nginx-kubernetes-gateway/pull/351) -- Fix status for parentRef with invalid listener in HTTPRoute. [PR-350](https://github.com/nginxinc/nginx-kubernetes-gateway/pull/350) -- Fix initContainer failure during pod restart. [PR-337](https://github.com/nginxinc/nginx-kubernetes-gateway/pull/337). +- Fix HTTPRoute section name related bugs. [PR-568](https://github.com/nginxinc/nginx-gateway-fabric/pull/568) +- Fix Observed Generation for Gateway Status. [PR-351](https://github.com/nginxinc/nginx-gateway-fabric/pull/351) +- Fix status for parentRef with invalid listener in HTTPRoute. [PR-350](https://github.com/nginxinc/nginx-gateway-fabric/pull/350) +- Fix initContainer failure during pod restart. [PR-337](https://github.com/nginxinc/nginx-gateway-fabric/pull/337). Thanks to [Tom Plant](https://github.com/pl4nty) -- Generate default http server in NGINX if http listener exists in Gateway. [PR-320](https://github.com/nginxinc/nginx-kubernetes-gateway/pull/320) +- Generate default http server in NGINX if http listener exists in Gateway. [PR-320](https://github.com/nginxinc/nginx-gateway-fabric/pull/320) DEPENDENCIES: -- Bump sigs.k8s.io/gateway-api from 0.6.0 to 0.6.2. [PR-471](https://github.com/nginxinc/nginx-kubernetes-gateway/pull/471) +- Bump sigs.k8s.io/gateway-api from 0.6.0 to 0.6.2. [PR-471](https://github.com/nginxinc/nginx-gateway-fabric/pull/471) COMPATIBILITY: @@ -169,23 +180,23 @@ This release extends the support of the features of the Gateway API resources. FEATURES: -- Support the Pod IPs instead of the virtual IP of a Service in the NGINX upstream. Additionally, NGINX Kubernetes - Gateway will pick up any changes to the Pod IPs and update the NGINX upstream - accordingly. [PR-221](https://github.com/nginxinc/nginx-kubernetes-gateway/pull/221) -- Support the redirect filter in an HTTPRoute rule. [PR-218](https://github.com/nginxinc/nginx-kubernetes-gateway/pull/218) -- Support weights in backendRefs in the HTTPRoute (traffic splitting). [PR-261](https://github.com/nginxinc/nginx-kubernetes-gateway/pull/261) -- Support the ObservedGeneration field in the HTTPRoute status. [PR-254](https://github.com/nginxinc/nginx-kubernetes-gateway/pull/254) +- Support the Pod IPs instead of the virtual IP of a Service in the NGINX upstream. Additionally, NGINX Gateway + Fabric will pick up any changes to the Pod IPs and update the NGINX upstream + accordingly. [PR-221](https://github.com/nginxinc/nginx-gateway-fabric/pull/221) +- Support the redirect filter in an HTTPRoute rule. [PR-218](https://github.com/nginxinc/nginx-gateway-fabric/pull/218) +- Support weights in backendRefs in the HTTPRoute (traffic splitting). [PR-261](https://github.com/nginxinc/nginx-gateway-fabric/pull/261) +- Support the ObservedGeneration field in the HTTPRoute status. [PR-254](https://github.com/nginxinc/nginx-gateway-fabric/pull/254) BUG FIXES: -- Do not require the namespace in the `--gateway-ctlr-name` cli argument. [PR-235](https://github.com/nginxinc/nginx-kubernetes-gateway/pull/235) -- Ensure NGINX Kubernetes Gateway exits gracefully during shutdown. [PR-250](https://github.com/nginxinc/nginx-kubernetes-gateway/pull/250) -- Handle query param names in case-sensitive way. [PR-220](https://github.com/nginxinc/nginx-kubernetes-gateway/pull/220) +- Do not require the namespace in the `--gateway-ctlr-name` cli argument. [PR-235](https://github.com/nginxinc/nginx-gateway-fabric/pull/235) +- Ensure NGINX Kubernetes Gateway exits gracefully during shutdown. [PR-250](https://github.com/nginxinc/nginx-gateway-fabric/pull/250) +- Handle query param names in case-sensitive way. [PR-220](https://github.com/nginxinc/nginx-gateway-fabric/pull/220) DEPENDENCIES: -- Use the latest NGINX 1.23 image. [PR-275](https://github.com/nginxinc/nginx-kubernetes-gateway/pull/275) -- Bump sigs.k8s.io/gateway-api from 0.5.0 to 0.5.1 [PR-251](https://github.com/nginxinc/nginx-kubernetes-gateway/pull/251) +- Use the latest NGINX 1.23 image. [PR-275](https://github.com/nginxinc/nginx-gateway-fabric/pull/275) +- Bump sigs.k8s.io/gateway-api from 0.5.0 to 0.5.1 [PR-251](https://github.com/nginxinc/nginx-gateway-fabric/pull/251) COMPATIBILITY: @@ -213,17 +224,17 @@ The release includes: - Support for NGINX as a data plane. - Kubernetes manifests for a Deployment with a single Pod with the control plane and data plane containers as well as Services to enable external connectivity to that Pod. -- Support for a subset of features of GatewayClass, Gateway and HTTPRoute resources (see the [Gateway API Compatibility doc](https://github.com/nginxinc/nginx-kubernetes-gateway/blob/v0.1.0/README.md)). +- Support for a subset of features of GatewayClass, Gateway and HTTPRoute resources (see the [Gateway API Compatibility doc](https://github.com/nginxinc/nginx-gateway-fabric/blob/v0.1.0/README.md)). We expect that the architecture of NGINX Kubernetes Gateway -- the number of pods and containers and their interaction -- will change as the project evolves. NGINX Kubernetes Gateway is ready for experimental usage. We included -the [docs](https://github.com/nginxinc/nginx-kubernetes-gateway/tree/v0.1.0/docs) as well -as [examples](https://github.com/nginxinc/nginx-kubernetes-gateway/tree/v0.1.0/examples). +the [docs](https://github.com/nginxinc/nginx-gateway-fabric/tree/v0.1.0/docs) as well +as [examples](https://github.com/nginxinc/nginx-gateway-fabric/tree/v0.1.0/examples). If you'd like to give us feedback or get involved, see -the [README](https://github.com/nginxinc/nginx-kubernetes-gateway) to learn how. +the [README](https://github.com/nginxinc/nginx-gateway-fabric) to learn how. COMPATIBILITY: diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 750be944cf..17777fa817 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,6 +1,6 @@ # Contributing Guidelines -The following is a set of guidelines for contributing to NGINX Kubernetes Gateway. We really appreciate that you are +The following is a set of guidelines for contributing to NGINX Gateway Fabric. We really appreciate that you are considering contributing! ## Table Of Contents @@ -20,20 +20,20 @@ considering contributing! ## Ask a Question -To ask a question, use [Github Discussions](https://github.com/nginxinc/nginx-kubernetes-gateway/discussions). +To ask a question, use [Github Discussions](https://github.com/nginxinc/nginx-gateway-fabric/discussions). [NGINX Community Slack](https://community.nginx.org/joinslack) has a dedicated channel for this -project -- `#nginx-kubernetes-gateway`. +project -- `#nginx-gateway-fabric`. Reserve GitHub issues for feature requests and bugs rather than general questions. ## Getting Started -Follow our [Installation Instructions](/docs/installation.md) to get the NGINX Kubernetes Gateway up and running. +Follow our [Installation Instructions](/docs/installation.md) to get the NGINX Gateway Fabric up and running. ### Project Structure -- NGINX Kubernetes Gateway is written in Go and uses the open source NGINX software as the data plane. +- NGINX Gateway Fabric is written in Go and uses the open source NGINX software as the data plane. - The project follows a standard Go project layout - The main code is found at `cmd/gateway/` - The internal code is found at `internal/` @@ -51,7 +51,7 @@ Follow our [Installation Instructions](/docs/installation.md) to get the NGINX K #### Open a Discussion If you have any questions, ideas, or simply want to engage in a conversation with the community and maintainers, we -encourage you to open a [discussion](https://github.com/nginxinc/nginx-kubernetes-gateway/discussions) on GitHub. +encourage you to open a [discussion](https://github.com/nginxinc/nginx-gateway-fabric/discussions) on GitHub. #### Report a Bug @@ -67,7 +67,7 @@ regarding the idea and its use cases, while also giving the community an opportu In some cases, the maintainers may ask you to write an Enhancement Proposal. For details on this process, see the [Enhancement Proposal](/docs/proposals/README.md) README. -[idea]: https://github.com/nginxinc/nginx-kubernetes-gateway/discussions/new?category=ideas +[idea]: https://github.com/nginxinc/nginx-gateway-fabric/discussions/new?category=ideas #### Issue lifecycle diff --git a/Makefile b/Makefile index 5fd725e3b3..f1242daa1b 100644 --- a/Makefile +++ b/Makefile @@ -13,8 +13,8 @@ GO_LINKER_FLAGS_OPTIMIZATIONS = -s -w GO_LINKER_FLAGS = $(GO_LINKER_FLAGS_OPTIMIZATIONS) $(GO_LINKER_FlAGS_VARS) # variables that can be overridden by the user -PREFIX ?= nginx-kubernetes-gateway## The name of the NKG image. For example, nginx-kubernetes-gateway -NGINX_PREFIX ?= $(PREFIX)/nginx## The name of the nginx image. For example: nginx-kubernetes-gateway/nginx +PREFIX ?= nginx-gateway-fabric## The name of the NGF image. For example, nginx-gateway-fabric +NGINX_PREFIX ?= $(PREFIX)/nginx## The name of the nginx image. For example: nginx-gateway-fabric/nginx TAG ?= $(VERSION:v%=%)## The tag of the image. For example, 0.3.0 TARGET ?= local## The target of the build. Possible values: local and container KIND_KUBE_CONFIG=$${HOME}/.kube/kind/config## The location of the kind kubeconfig @@ -32,10 +32,10 @@ help: Makefile ## Display this help @grep -E '^(override )?[a-zA-Z_-]+ \??\+?= .*?## .*$$' $< | sort | awk 'BEGIN {FS = " \\??\\+?= .*?## "; printf "\nVariables:\n\n"}; {gsub(/override /, "", $$1); printf " \033[36m%-30s\033[0m %s\n", $$1, $$2}' .PHONY: build-images -build-images: build-nkg-image build-nginx-image ## Build the NKG and nginx docker images +build-images: build-ngf-image build-nginx-image ## Build the NGF and nginx docker images -.PHONY: build-nkg-image -build-nkg-image: check-for-docker build ## Build the NKG docker image +.PHONY: build-ngf-image +build-ngf-image: check-for-docker build ## Build the NGF docker image docker build --platform linux/$(GOARCH) --target $(strip $(TARGET)) -f build/Dockerfile -t $(strip $(PREFIX)):$(strip $(TAG)) . .PHONY: build-nginx-image @@ -50,7 +50,7 @@ check-for-docker: ## Check if Docker is installed build: ## Build the binary ifeq (${TARGET},local) @go version || (code=$$?; printf "\033[0;31mError\033[0m: unable to build locally\n"; exit $$code) - CGO_ENABLED=0 GOOS=$(GOOS) GOARCH=$(GOARCH) go build -trimpath -a -ldflags "$(GO_LINKER_FLAGS)" $(ADDITIONAL_GO_BUILD_FLAGS) -o $(OUT_DIR)/gateway github.com/nginxinc/nginx-kubernetes-gateway/cmd/gateway + CGO_ENABLED=0 GOOS=$(GOOS) GOARCH=$(GOARCH) go build -trimpath -a -ldflags "$(GO_LINKER_FLAGS)" $(ADDITIONAL_GO_BUILD_FLAGS) -o $(OUT_DIR)/gateway github.com/nginxinc/nginx-gateway-fabric/cmd/gateway endif .PHONY: build-goreleaser @@ -106,7 +106,7 @@ vet: ## Run go vet against code .PHONY: lint lint: ## Run golangci-lint against code - docker run --pull always --rm -v $(shell pwd):/nginx-kubernetes-gateway -w /nginx-kubernetes-gateway -v $(shell go env GOCACHE):/cache/go -e GOCACHE=/cache/go -e GOLANGCI_LINT_CACHE=/cache/go -v $(shell go env GOPATH)/pkg:/go/pkg golangci/golangci-lint:latest golangci-lint --color always run + docker run --pull always --rm -v $(shell pwd):/nginx-gateway-fabric -w /nginx-gateway-fabric -v $(shell go env GOCACHE):/cache/go -e GOCACHE=/cache/go -e GOLANGCI_LINT_CACHE=/cache/go -v $(shell go env GOPATH)/pkg:/go/pkg golangci/golangci-lint:latest golangci-lint --color always run .PHONY: unit-test unit-test: ## Run unit tests for the go code @@ -129,8 +129,8 @@ debug-build: GO_LINKER_FLAGS=$(GO_LINKER_FlAGS_VARS) debug-build: ADDITIONAL_GO_BUILD_FLAGS=-gcflags "all=-N -l" debug-build: build ## Build binary with debug info, symbols, and no optimizations -.PHONY: build-nkg-debug-image -build-nkg-debug-image: debug-build build-nkg-image ## Build NKG image with debug binary +.PHONY: build-ngf-debug-image +build-ngf-debug-image: debug-build build-ngf-image ## Build NGF image with debug binary .PHONY: generate-manifests generate-manifests: ## Generate manifests using Helm. diff --git a/README.md b/README.md index 35151724ae..fb7cafb307 100644 --- a/README.md +++ b/README.md @@ -1,13 +1,13 @@ -[![OpenSSF Scorecard](https://api.securityscorecards.dev/projects/github.com/nginxinc/nginx-kubernetes-gateway/badge)](https://api.securityscorecards.dev/projects/github.com/nginxinc/nginx-kubernetes-gateway) -[![FOSSA Status](https://app.fossa.com/api/projects/custom%2B5618%2Fgithub.com%2Fnginxinc%2Fnginx-kubernetes-gateway.svg?type=shield)](https://app.fossa.com/projects/custom%2B5618%2Fgithub.com%2Fnginxinc%2Fnginx-kubernetes-gateway?ref=badge_shield) +[![OpenSSF Scorecard](https://api.securityscorecards.dev/projects/github.com/nginxinc/nginx-gateway-fabric/badge)](https://api.securityscorecards.dev/projects/github.com/nginxinc/nginx-gateway-fabric) +[![FOSSA Status](https://app.fossa.com/api/projects/custom%2B5618%2Fgithub.com%2Fnginxinc%2Fnginx-gateway-fabric.svg?type=shield)](https://app.fossa.com/projects/custom%2B5618%2Fgithub.com%2Fnginxinc%2Fnginx-gateway-fabric?ref=badge_shield) -# NGINX Kubernetes Gateway +# NGINX Gateway Fabric -NGINX Kubernetes Gateway is an open-source project that provides an implementation of +NGINX Gateway Fabric is an open-source project that provides an implementation of the [Gateway API](https://gateway-api.sigs.k8s.io/) using [NGINX](https://nginx.org/) as the data plane. The goal of this project is to implement the core Gateway APIs -- `Gateway`, `GatewayClass`, `HTTPRoute`, `TCPRoute`, `TLSRoute`, and `UDPRoute` -- to configure an HTTP or TCP/UDP load balancer, reverse-proxy, or API gateway for applications running -on Kubernetes. NGINX Kubernetes Gateway is currently under development and supports a subset of the Gateway API. +on Kubernetes. NGINX Gateway Fabric is currently under development and supports a subset of the Gateway API. For a list of supported Gateway API resources and features, see the [Gateway API Compatibility](docs/gateway-api-compatibility.md) doc. @@ -20,58 +20,50 @@ Learn about our [design principles](/docs/developer/design-principles.md) and [a ## Getting Started 1. [Quick Start on a kind cluster](docs/running-on-kind.md). -2. [Install](docs/installation.md) NGINX Kubernetes Gateway. -3. [Build](docs/building-the-images.md) an NGINX Kubernetes Gateway container image from source or use a pre-built image +2. [Install](docs/installation.md) NGINX Gateway Fabric. +3. [Build](docs/building-the-images.md) an NGINX Gateway Fabric container image from source or use a pre-built image available - on [GitHub Container Registry](https://github.com/nginxinc/nginx-kubernetes-gateway/pkgs/container/nginx-kubernetes-gateway). + on [GitHub Container Registry](https://github.com/nginxinc/nginx-gateway-fabric/pkgs/container/nginx-gateway-fabric). 4. Deploy various [examples](examples). 5. Read our [guides](/docs/guides). -## NGINX Kubernetes Gateway Releases +## NGINX Gateway Fabric Releases -We publish NGINX Kubernetes Gateway releases on GitHub. See -our [releases page](https://github.com/nginxinc/nginx-kubernetes-gateway/releases). +We publish NGINX Gateway Fabric releases on GitHub. See +our [releases page](https://github.com/nginxinc/nginx-gateway-fabric/releases). -The latest release is [0.6.0](https://github.com/nginxinc/nginx-kubernetes-gateway/releases/tag/v0.6.0). +The latest release is [0.6.0](https://github.com/nginxinc/nginx-gateway-fabric/releases/tag/v0.6.0). The edge version is useful for experimenting with new features that are not yet published in a release. To use, choose -the *edge* version built from the [latest commit](https://github.com/nginxinc/nginx-kubernetes-gateway/commits/main) +the *edge* version built from the [latest commit](https://github.com/nginxinc/nginx-gateway-fabric/commits/main) from the main branch. -To use NGINX Kubernetes Gateway, you need to have access to: - -- An NGINX Kubernetes Gateway image. -- Installation manifests. -- Documentation and examples. - -It is important that the versions of those things above match. - The table below summarizes the options regarding the images, manifests, documentation and examples and gives your links to the correct versions: -| Version | Description | Image | Installation Manifests | Documentation and Examples | -|----------------|------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| Latest release | For experimental use | Use the 0.6.0 image from [GitHub](https://github.com/nginxinc/nginx-kubernetes-gateway/pkgs/container/nginx-kubernetes-gateway) | [Manifests](https://github.com/nginxinc/nginx-kubernetes-gateway/tree/v0.6.0/deploy). | [Documentation](https://github.com/nginxinc/nginx-kubernetes-gateway/tree/v0.6.0/docs). [Examples](https://github.com/nginxinc/nginx-kubernetes-gateway/tree/v0.6.0/examples). | -| Edge | For experimental use and latest features | Use the edge image from [GitHub](https://github.com/nginxinc/nginx-kubernetes-gateway/pkgs/container/nginx-kubernetes-gateway) | [Manifests](https://github.com/nginxinc/nginx-kubernetes-gateway/tree/main/deploy). | [Documentation](https://github.com/nginxinc/nginx-kubernetes-gateway/tree/main/docs). [Examples](https://github.com/nginxinc/nginx-kubernetes-gateway/tree/main/examples). | +| Version | Description | Installation Manifests | Documentation and Examples | +|----------------|------------------------------------------|---------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| Latest release | For experimental use | [Manifests](https://github.com/nginxinc/nginx-gateway-fabric/tree/v0.6.0/deploy). | [Documentation](https://github.com/nginxinc/nginx-gateway-fabric/tree/v0.6.0/docs). [Examples](https://github.com/nginxinc/nginx-gateway-fabric/tree/v0.6.0/examples). | +| Edge | For experimental use and latest features | [Manifests](https://github.com/nginxinc/nginx-gateway-fabric/tree/main/deploy). | [Documentation](https://github.com/nginxinc/nginx-gateway-fabric/tree/main/docs). [Examples](https://github.com/nginxinc/nginx-gateway-fabric/tree/main/examples). | ### Versioning -NKG uses semantic versioning for its releases. For more information, see https://semver.org. +NGF uses semantic versioning for its releases. For more information, see https://semver.org. > Major version zero `(0.Y.Z)` is reserved for development, anything MAY change at any time. The public API is not stable. ### Release Planning and Development The features that will go into the next release are reflected in the -corresponding [milestone](https://github.com/nginxinc/nginx-kubernetes-gateway/milestones). Refer to +corresponding [milestone](https://github.com/nginxinc/nginx-gateway-fabric/milestones). Refer to the [Issue Lifecycle](ISSUE_LIFECYCLE.md) document for information on issue creation and assignment to releases. ## Technical Specifications -The following table lists the software versions NGINX Kubernetes Gateway supports. +The following table lists the software versions NGINX Gateway Fabric supports. -| NGINX Kubernetes Gateway | Gateway API | Kubernetes | NGINX OSS | +| NGINX Gateway Fabric | Gateway API | Kubernetes | NGINX OSS | |--------------------------|-------------|------------|-----------| | Edge | 0.8.0 | 1.23+ | 1.25.2 | | 0.6.0 | 0.8.0 | 1.23+ | 1.25.2 | @@ -96,7 +88,7 @@ using [syft](https://github.com/anchore/syft) and are available in SPDX format. ### Docker Images The SBOM for the Docker image is available in -the [GitHub Container](https://github.com/nginxinc/nginx-kubernetes-gateway/pkgs/container/nginx-kubernetes-gateway) +the [GitHub Container](https://github.com/nginxinc/nginx-gateway-fabric/pkgs/container/nginx-gateway-fabric) repository. The SBOM is generated using [syft](https://github.com/anchore/syft) and stored as an attestation in the image manifest. @@ -104,7 +96,7 @@ For example to retrieve the SBOM for `linux/amd64` and analyze it using [grype]( can run the following command: ```shell -docker buildx imagetools inspect ghcr.io/nginxinc/nginx-kubernetes-gateway:edge --format '{{ json (index .SBOM "linux/amd64").SPDX }}' | grype +docker buildx imagetools inspect ghcr.io/nginxinc/nginx-gateway-fabric:edge --format '{{ json (index .SBOM "linux/amd64").SPDX }}' | grype ``` ## Troubleshooting @@ -116,14 +108,14 @@ For troubleshooting help, see the [Troubleshooting](/docs/troubleshooting.md) do We’d like to hear your feedback! If you experience issues with our Gateway Controller, please [open a bug][bug] in GitHub. If you have any suggestions or enhancement requests, please [open an idea][idea] on GitHub discussions. You can contact us directly via kubernetes@nginx.com or on the [NGINX Community Slack][slack] in -the `#nginx-kubernetes-gateway` +the `#nginx-gateway-fabric` channel. -[bug]:https://github.com/nginxinc/nginx-kubernetes-gateway/issues/new?assignees=&labels=&projects=&template=bug_report.md&title= +[bug]:https://github.com/nginxinc/nginx-gateway-fabric/issues/new?assignees=&labels=&projects=&template=bug_report.md&title= -[idea]:https://github.com/nginxinc/nginx-kubernetes-gateway/discussions/categories/ideas +[idea]:https://github.com/nginxinc/nginx-gateway-fabric/discussions/categories/ideas -[slack]: https://nginxcommunity.slack.com/channels/nginx-kubernetes-gateway +[slack]: https://nginxcommunity.slack.com/channels/nginx-gateway-fabric ## Contributing @@ -131,4 +123,4 @@ Please read our [Contributing guide](CONTRIBUTING.md) if you'd like to contribut ## Support -NGINX Kubernetes Gateway is not covered by any support contract. +NGINX Gateway Fabric is not covered by any support contract. diff --git a/SECURITY.md b/SECURITY.md index 5f54cbd90a..dec5750a61 100644 --- a/SECURITY.md +++ b/SECURITY.md @@ -2,7 +2,7 @@ ## Supported Versions -We advise users to run the most recent release of the NGINX Kubernetes Gateway. A table with the supported versions can +We advise users to run the most recent release of the NGINX Gateway Fabric. A table with the supported versions can be found in the [README](README.md#technical-specifications). ## Reporting a Vulnerability diff --git a/apis/doc.go b/apis/doc.go index 7eefd6bf3b..65741b340a 100644 --- a/apis/doc.go +++ b/apis/doc.go @@ -1,2 +1,2 @@ -// Package apis stores the API definitions for NGINX Kubernetes Gateway configuration. +// Package apis stores the API definitions for NGINX Gateway Fabric configuration. package apis diff --git a/apis/v1alpha1/nginxgateway_types.go b/apis/v1alpha1/nginxgateway_types.go index 77f4259083..4a64a04984 100644 --- a/apis/v1alpha1/nginxgateway_types.go +++ b/apis/v1alpha1/nginxgateway_types.go @@ -6,7 +6,7 @@ import metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" // +kubebuilder:storageversion // +kubebuilder:subresource:status -// NginxGateway represents the dynamic configuration for an NGINX Kubernetes Gateway control plane. +// NginxGateway represents the dynamic configuration for an NGINX Gateway Fabric control plane. type NginxGateway struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` diff --git a/build/Dockerfile b/build/Dockerfile index ad70680a7b..701f7e8e3f 100644 --- a/build/Dockerfile +++ b/build/Dockerfile @@ -1,12 +1,12 @@ # syntax=docker/dockerfile:1.4 FROM golang:1.21 as builder -WORKDIR /go/src/github.com/nginxinc/nginx-kubernetes-gateway +WORKDIR /go/src/github.com/nginxinc/nginx-gateway-fabric -COPY go.mod go.sum /go/src/github.com/nginxinc/nginx-kubernetes-gateway +COPY go.mod go.sum /go/src/github.com/nginxinc/nginx-gateway-fabric RUN go mod download -COPY . /go/src/github.com/nginxinc/nginx-kubernetes-gateway +COPY . /go/src/github.com/nginxinc/nginx-gateway-fabric RUN make build FROM alpine:3.18 as capabilizer @@ -17,7 +17,7 @@ COPY ./build/out/gateway /usr/bin/ RUN setcap 'cap_kill=+ep' /usr/bin/gateway FROM capabilizer as container-capabilizer -COPY --from=builder /go/src/github.com/nginxinc/nginx-kubernetes-gateway/build/out/gateway /usr/bin/ +COPY --from=builder /go/src/github.com/nginxinc/nginx-gateway-fabric/build/out/gateway /usr/bin/ RUN setcap 'cap_kill=+ep' /usr/bin/gateway FROM capabilizer as goreleaser-capabilizer diff --git a/cmd/gateway/commands.go b/cmd/gateway/commands.go index 32eb9fa0ec..20d6f639bd 100644 --- a/cmd/gateway/commands.go +++ b/cmd/gateway/commands.go @@ -12,16 +12,16 @@ import ( "sigs.k8s.io/controller-runtime/pkg/log" ctlrZap "sigs.k8s.io/controller-runtime/pkg/log/zap" - "github.com/nginxinc/nginx-kubernetes-gateway/internal/mode/provisioner" - "github.com/nginxinc/nginx-kubernetes-gateway/internal/mode/static" - "github.com/nginxinc/nginx-kubernetes-gateway/internal/mode/static/config" + "github.com/nginxinc/nginx-gateway-fabric/internal/mode/provisioner" + "github.com/nginxinc/nginx-gateway-fabric/internal/mode/static" + "github.com/nginxinc/nginx-gateway-fabric/internal/mode/static/config" ) const ( domain = "gateway.nginx.org" gatewayClassFlag = "gatewayclass" gatewayClassNameUsage = `The name of the GatewayClass resource. ` + - `Every NGINX Gateway must have a unique corresponding GatewayClass resource.` + `Every NGINX Gateway Fabric must have a unique corresponding GatewayClass resource.` gatewayCtrlNameFlag = "gateway-ctlr-name" gatewayCtrlNameUsageFmt = `The name of the Gateway controller. ` + `The controller name must be of the form: DOMAIN/PATH. The controller's domain is '%s'` @@ -113,7 +113,7 @@ func createStaticModeCommand() *cobra.Command { logger := ctlrZap.New(ctlrZap.Level(atom)) logger.Info( - "Starting NGINX Kubernetes Gateway in static mode", + "Starting NGINX Gateway Fabric in static mode", "version", version, "commit", commit, "date", date, @@ -241,9 +241,9 @@ func createStaticModeCommand() *cobra.Command { &disableLeaderElection, leaderElectionDisableFlag, false, - "Disable leader election. Leader election is used to avoid multiple replicas of the NGINX Kubernetes Gateway"+ + "Disable leader election. Leader election is used to avoid multiple replicas of the NGINX Gateway Fabric"+ " reporting the status of the Gateway API resources. If disabled, "+ - "all replicas of NGINX Kubernetes Gateway will update the statuses of the Gateway API resources.", + "all replicas of NGINX Gateway Fabric will update the statuses of the Gateway API resources.", ) cmd.Flags().Var( @@ -259,12 +259,12 @@ func createStaticModeCommand() *cobra.Command { func createProvisionerModeCommand() *cobra.Command { return &cobra.Command{ Use: "provisioner-mode", - Short: "Provision a static-mode NGINX Gateway Deployment per Gateway resource", + Short: "Provision a static-mode NGINX Gateway Fabric Deployment per Gateway resource", Hidden: true, RunE: func(cmd *cobra.Command, args []string) error { logger := ctlrZap.New() logger.Info( - "Starting NGINX Kubernetes Gateway Provisioner", + "Starting NGINX Gateway Fabric Provisioner", "version", version, "commit", commit, "date", date, diff --git a/conformance/Makefile b/conformance/Makefile index 816d999709..6998b9f4d7 100644 --- a/conformance/Makefile +++ b/conformance/Makefile @@ -1,6 +1,6 @@ -NKG_TAG = edge -NKG_PREFIX = nginx-kubernetes-gateway -NGINX_IMAGE_NAME = $(NKG_PREFIX)/nginx +NGF_TAG = edge +NGF_PREFIX = nginx-gateway-fabric +NGINX_IMAGE_NAME = $(NGF_PREFIX)/nginx GW_API_VERSION ?= 0.8.0 GATEWAY_CLASS = nginx SUPPORTED_FEATURES = HTTPRoute,HTTPRouteQueryParamMatching,HTTPRouteMethodMatching,HTTPRoutePortRedirect,HTTPRouteSchemeRedirect,GatewayClassObservedGenerationBump @@ -8,7 +8,7 @@ KIND_IMAGE ?= $(shell grep -m1 'FROM kindest/node' Note: If you want to run the latest conformance tests from the Gateway API `main` branch, set the following -> environment variable before deploying NKG: +> environment variable before deploying NGF: ```bash export GW_API_VERSION=main @@ -80,30 +80,30 @@ make create-kind-cluster KIND_IMAGE=kindest/node:v1.27.3 > Otherwise, the latest stable version will be used by default. -#### *Option 1* Build and install Nginx Kubernetes Gateway from local to configured kind cluster +#### *Option 1* Build and install NGINX Gateway Fabric from local to configured kind cluster ```makefile -make install-nkg-local-build +make install-ngf-local-build ``` -#### *Option 2* Install Nginx Kubernetes Gateway from local already built image to configured kind cluster +#### *Option 2* Install NGINX Gateway Fabric from local already built image to configured kind cluster You can optionally skip the actual *build* step. ```makefile -make install-nkg-local-no-build +make install-ngf-local-no-build ``` > Note: If choosing this option, the following step *must* be completed manually *before* you build the image: ```makefile -make update-nkg-manifest NKG_PREFIX= NKG_TAG= +make update-ngf-manifest NGF_PREFIX= NGF_TAG= ``` -#### *Option 3* Install Nginx Kubernetes Gateway from edge to configured kind cluster -You can also skip the build NKG image step and prepare the environment to instead use the `edge` image +#### *Option 3* Install NGINX Gateway Fabric from edge to configured kind cluster +You can also skip the build NGF image step and prepare the environment to instead use the `edge` image ```makefile -make install-nkg-edge +make install-ngf-edge ``` ### Step 3 - Build conformance test runner image @@ -136,14 +136,14 @@ make build-test-runner-image make run-conformance-tests ``` -### Step 5 - Cleanup the conformance test fixtures and uninstall Nginx Kubernetes Gateway +### Step 5 - Cleanup the conformance test fixtures and uninstall NGINX Gateway Fabric ```makefile make cleanup-conformance-tests ``` ```makefile -make uninstall-nkg +make uninstall-ngf ``` ### Step 6 - Revert changes to Go modules diff --git a/conformance/provisioner/README.md b/conformance/provisioner/README.md index 58084e0ad5..04de6fa47e 100644 --- a/conformance/provisioner/README.md +++ b/conformance/provisioner/README.md @@ -1,6 +1,6 @@ # Provisioner -Provisioner implements data plane provisioning for NGINX Kubernetes Gateway (NKG): it creates an NKG static mode +Provisioner implements data plane provisioning for NGINX Gateway Fabric (NGF): it creates an NGF static mode Deployment for each Gateway that belongs to the provisioner GatewayClass. ```text @@ -12,20 +12,20 @@ Flags: Global Flags: --gateway-ctlr-name string The name of the Gateway controller. The controller name must be of the form: DOMAIN/PATH. The controller's domain is 'gateway.nginx.org' (default "") - --gatewayclass string The name of the GatewayClass resource. Every NGINX Gateway must have a unique corresponding GatewayClass resource. (default "") + --gatewayclass string The name of the GatewayClass resource. Every NGINX Gateway Fabric must have a unique corresponding GatewayClass resource. (default "") ``` > Note: Provisioner is not ready for production yet (see this issue for more details -https://github.com/nginxinc/nginx-kubernetes-gateway/issues/634). However, it can be used in the Gateway API conformance +https://github.com/nginxinc/nginx-gateway-fabric/issues/634). However, it can be used in the Gateway API conformance tests, which expect a Gateway API implementation to provision an independent data plane per Gateway. > -> Note: Provisioner uses [this manifest](/deploy/manifests/deployment.yaml) to create an NKG static mode Deployment. -This manifest gets included into the NKG binary during the NKG build. To customize the Deployment, modify the manifest -and **re-build** NKG. +> Note: Provisioner uses [this manifest](/deploy/manifests/deployment.yaml) to create an NGF static mode Deployment. +This manifest gets included into the NGF binary during the NGF build. To customize the Deployment, modify the manifest +and **re-build** NGF. How to deploy: -1. Follow the [installation](/docs/installation.md) instructions up until the Deploy the NGINX Kubernetes Gateway Step +1. Follow the [installation](/docs/installation.md) instructions up until the Deploy the NGINX Gateway Fabric step to deploy prerequisites for both the static mode Deployments and the provisioner. 1. Deploy provisioner: diff --git a/conformance/provisioner/provisioner.yaml b/conformance/provisioner/provisioner.yaml index e7585dc611..5a58889274 100644 --- a/conformance/provisioner/provisioner.yaml +++ b/conformance/provisioner/provisioner.yaml @@ -61,7 +61,7 @@ spec: spec: serviceAccountName: nginx-gateway-provisioner containers: - - image: ghcr.io/nginxinc/nginx-kubernetes-gateway:edge + - image: ghcr.io/nginxinc/nginx-gateway-fabric:edge imagePullPolicy: Always name: nginx-gateway-provisioner securityContext: diff --git a/conformance/provisioner/static-deployment.yaml b/conformance/provisioner/static-deployment.yaml index fa8c1b1415..0895770db8 100644 --- a/conformance/provisioner/static-deployment.yaml +++ b/conformance/provisioner/static-deployment.yaml @@ -1,5 +1,5 @@ --- -# Source: nginx-kubernetes-gateway/templates/deployment.yaml +# Source: nginx-gateway-fabric/templates/deployment.yaml apiVersion: apps/v1 kind: Deployment metadata: @@ -43,7 +43,7 @@ spec: valueFrom: fieldRef: fieldPath: metadata.name - image: ghcr.io/nginxinc/nginx-kubernetes-gateway:edge + image: ghcr.io/nginxinc/nginx-gateway-fabric:edge imagePullPolicy: Always name: nginx-gateway ports: @@ -72,7 +72,7 @@ spec: mountPath: /etc/nginx/secrets - name: nginx-run mountPath: /var/run/nginx - - image: ghcr.io/nginxinc/nginx-kubernetes-gateway/nginx:edge + - image: ghcr.io/nginxinc/nginx-gateway-fabric/nginx:edge imagePullPolicy: Always name: nginx ports: diff --git a/conformance/tests/Dockerfile b/conformance/tests/Dockerfile index 0fa09b3071..5a1eeef574 100644 --- a/conformance/tests/Dockerfile +++ b/conformance/tests/Dockerfile @@ -4,10 +4,10 @@ FROM kindest/node:v1.28.0 FROM golang:1.21 -WORKDIR /go/src/github.com/nginxinc/nginx-kubernetes-gateway/conformance/tests/ +WORKDIR /go/src/github.com/nginxinc/nginx-gateway-fabric/conformance/tests/ -COPY --link go.mod /go/src/github.com/nginxinc/nginx-kubernetes-gateway/ -COPY --link go.sum /go/src/github.com/nginxinc/nginx-kubernetes-gateway/ +COPY --link go.mod /go/src/github.com/nginxinc/nginx-gateway-fabric/ +COPY --link go.sum /go/src/github.com/nginxinc/nginx-gateway-fabric/ RUN go mod download -COPY --link conformance/tests /go/src/github.com/nginxinc/nginx-kubernetes-gateway/conformance/tests/ +COPY --link conformance/tests /go/src/github.com/nginxinc/nginx-gateway-fabric/conformance/tests/ diff --git a/conformance/tests/conformance_test.go b/conformance/tests/conformance_test.go index b7ccbbabb1..86714e57a6 100644 --- a/conformance/tests/conformance_test.go +++ b/conformance/tests/conformance_test.go @@ -65,11 +65,11 @@ func TestConformance(t *testing.T) { }, Implementation: v1alpha1.Implementation{ Organization: "nginxinc", - Project: "nginx-kubernetes-gateway", - URL: "https://github.com/nginxinc/nginx-kubernetes-gateway", + Project: "nginx-gateway-fabric", + URL: "https://github.com/nginxinc/nginx-gateway-fabric", Version: *flags.ImplementationVersion, Contact: []string{ - "https://github.com/nginxinc/nginx-kubernetes-gateway/discussions/new/choose", + "https://github.com/nginxinc/nginx-gateway-fabric/discussions/new/choose", }, }, ConformanceProfiles: sets.New(suite.HTTPConformanceProfileName), diff --git a/deploy/helm-chart/Chart.yaml b/deploy/helm-chart/Chart.yaml index be6b022242..5887d8e862 100644 --- a/deploy/helm-chart/Chart.yaml +++ b/deploy/helm-chart/Chart.yaml @@ -1,13 +1,13 @@ apiVersion: v2 -name: nginx-kubernetes-gateway -description: NGINX Kubernetes Gateway +name: nginx-gateway-fabric +description: NGINX Gateway Fabric type: application version: 0.1.0 appVersion: "edge" -home: https://github.com/nginxinc/nginx-kubernetes-gateway -icon: https://raw.githubusercontent.com/nginxinc/nginx-kubernetes-gateway/tree/main/deploy/helm-chart/chart-icon.png +home: https://github.com/nginxinc/nginx-gateway-fabric +icon: https://raw.githubusercontent.com/nginxinc/nginx-gateway-fabric/tree/main/deploy/helm-chart/chart-icon.png sources: - - https://github.com/nginxinc/nginx-kubernetes-gateway/tree/main/deploy/helm-chart + - https://github.com/nginxinc/nginx-gateway-fabric/tree/main/deploy/helm-chart keywords: - kubernetes - gateway diff --git a/deploy/helm-chart/README.md b/deploy/helm-chart/README.md index 815e1f1535..1ed38cfb85 100644 --- a/deploy/helm-chart/README.md +++ b/deploy/helm-chart/README.md @@ -1,8 +1,8 @@ -# NGINX Kubernetes Gateway Helm Chart +# NGINX Gateway Fabric Helm Chart ## Introduction -This chart deploys the NGINX Kubernetes Gateway in your Kubernetes cluster. +This chart deploys the NGINX Gateway Fabric in your Kubernetes cluster. ## Prerequisites @@ -12,8 +12,8 @@ This chart deploys the NGINX Kubernetes Gateway in your Kubernetes cluster. ### Installing the Gateway API resources > Note: The Gateway API resources from the standard channel (the CRDs and the validating webhook) must be installed -> before deploying NGINX Kubernetes Gateway. If they are already installed in your cluster, please ensure they are -> the correct version as supported by the NGINX Kubernetes Gateway - +> before deploying NGINX Gateway Fabric. If they are already installed in your cluster, please ensure they are +> the correct version as supported by the NGINX Gateway Fabric - > [see the Technical Specifications](../../README.md#technical-specifications). To install the Gateway resources from [the Gateway API repo](https://github.com/kubernetes-sigs/gateway-api), run: @@ -30,7 +30,7 @@ To install the chart with the release name `my-release` (`my-release` is the nam nginx-gateway namespace (with optional `--create-namespace` flag - you can omit if the namespace already exists): ```shell -helm install my-release oci://ghcr.io/nginxinc/charts/nginx-kubernetes-gateway --create-namespace --wait -n nginx-gateway +helm install my-release oci://ghcr.io/nginxinc/charts/nginx-gateway-fabric --create-namespace --wait -n nginx-gateway ``` This will install the latest stable release. To install the latest version from the `main` branch, specify the @@ -41,8 +41,8 @@ This will install the latest stable release. To install the latest version from #### Pulling the Chart ```shell -helm pull oci://ghcr.io/nginxinc/charts/nginx-kubernetes-gateway --untar -cd nginx-kubernetes-gateway +helm pull oci://ghcr.io/nginxinc/charts/nginx-gateway-fabric --untar +cd nginx-gateway-fabric ``` This will pull the latest stable release. To pull the latest version from the `main` branch, specify the @@ -62,7 +62,7 @@ helm install my-release . --create-namespace --wait -n nginx-gateway ### Upgrading the Gateway Resources Before you upgrade a release, ensure the Gateway API resources are the correct version as supported by the NGINX -Kubernetes Gateway - [see the Technical Specifications](../../README.md#technical-specifications).: +Gateway Fabric - [see the Technical Specifications](../../README.md#technical-specifications).: To upgrade the Gateway resources from [the Gateway API repo](https://github.com/kubernetes-sigs/gateway-api), run: @@ -72,7 +72,7 @@ kubectl apply -f https://github.com/kubernetes-sigs/gateway-api/releases/downloa ### Upgrading the CRDs -Helm does not upgrade the NGINX Kubernetes Gateway CRDs during a release upgrade. Before you upgrade a release, you +Helm does not upgrade the NGINX Gateway Fabric CRDs during a release upgrade. Before you upgrade a release, you must [pull the chart](#pulling-the-chart) from GitHub and run the following command to upgrade the CRDs: ```shell @@ -90,7 +90,7 @@ Warning: kubectl apply should be used on resource created by either kubectl crea To upgrade the release `my-release`, run: ```shell -helm upgrade my-release oci://ghcr.io/nginxinc/charts/nginx-kubernetes-gateway -n nginx-gateway +helm upgrade my-release 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 @@ -131,33 +131,33 @@ kubectl delete -f https://github.com/kubernetes-sigs/gateway-api/releases/downlo ## Configuration -The following tables lists the configurable parameters of the NGINX Kubernetes Gateway chart and their default values. +The following tables lists the configurable parameters of the NGINX Gateway Fabric chart and their default values. | Parameter | Description | Default Value | |---------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------| -| `nginxGateway.image.repository` | The repository for the NGINX Kubernetes Gateway image. | ghcr.io/nginxinc/nginx-kubernetes-gateway | -| `nginxGateway.image.tag` | The tag for the NGINX Kubernetes Gateway image. | edge | -| `nginxGateway.image.pullPolicy` | The `imagePullPolicy` for the NGINX Kubernetes Gateway image. | Always | -| `nginxGateway.gatewayClassName` | The name of the GatewayClass for the NGINX Kubernetes Gateway deployment. | nginx | +| `nginxGateway.image.repository` | The repository for the NGINX Gateway Fabric image. | ghcr.io/nginxinc/nginx-gateway-fabric | +| `nginxGateway.image.tag` | The tag for the NGINX Gateway Fabric image. | edge | +| `nginxGateway.image.pullPolicy` | The `imagePullPolicy` for the NGINX Gateway Fabric image. | Always | +| `nginxGateway.gatewayClassName` | The name of the GatewayClass for the NGINX Gateway Fabric deployment. | nginx | | `nginxGateway.gatewayControllerName` | The name of the Gateway controller. The controller name must be of the form: DOMAIN/PATH. The controller's domain is gateway.nginx.org. | gateway.nginx.org/nginx-gateway-controller | -| `nginxGateway.kind` | The kind of the NGINX Kubernetes Gateway installation - currently, only Deployment is supported. | deployment | +| `nginxGateway.kind` | The kind of the NGINX Gateway Fabric installation - currently, only Deployment is supported. | deployment | | `nginxGateway.config` | The dynamic configuration for the control plane that is contained in the NginxGateway resource | [See nginxGateway.config section](values.yaml) | | `nginxGateway.readinessProbe.enable` | Enable the /readyz endpoint on the control plane. | true | | `nginxGateway.readinessProbe.port` | Port in which the readiness endpoint is exposed. | 8081 | | `nginxGateway.readinessProbe.initialDelaySeconds` | The number of seconds after the Pod has started before the readiness probes are initiated. | 3 | -| `nginxGateway.replicaCount` | The number of replicas of the NGINX Kubernetes Gateway Deployment. | 1 | -| `nginxGateway.leaderElection.enable` | Enable leader election. Leader election is used to avoid multiple replicas of the NGINX Kubernetes Gateway reporting the status of the Gateway API resources. | true | +| `nginxGateway.replicaCount` | The number of replicas of the NGINX Gateway Fabric Deployment. | 1 | +| `nginxGateway.leaderElection.enable` | Enable leader election. Leader election is used to avoid multiple replicas of the NGINX Gateway Fabric reporting the status of the Gateway API resources. | true | | `nginxGateway.leaderElection.lockName` | The name of the leader election lock. A Lease object with this name will be created in the same Namespace as the controller. | Autogenerated | -| `nginx.image.repository` | The repository for the NGINX image. | ghcr.io/nginxinc/nginx-kubernetes-gateway/nginx | +| `nginx.image.repository` | The repository for the NGINX image. | ghcr.io/nginxinc/nginx-gateway-fabric/nginx | | `nginx.image.tag` | The tag for the NGINX image. | edge | | `nginx.image.pullPolicy` | The `imagePullPolicy` for the NGINX image. | Always | -| `serviceAccount.annotations` | The `annotations` for the ServiceAccount used by the NGINX Kubernetes Gateway deployment. | {} | -| `serviceAccount.name` | Name of the ServiceAccount used by the NGINX Kubernetes Gateway deployment. | Autogenerated | -| `service.create` | Creates a service to expose the NGINX Kubernetes Gateway pods. | true | -| `service.type` | The type of service to create for the NGINX Kubernetes Gateway. | Loadbalancer | +| `serviceAccount.annotations` | The `annotations` for the ServiceAccount used by the NGINX Gateway Fabric deployment. | {} | +| `serviceAccount.name` | Name of the ServiceAccount used by the NGINX Gateway Fabric deployment. | Autogenerated | +| `service.create` | Creates a service to expose the NGINX Gateway Fabric pods. | true | +| `service.type` | The type of service to create for the NGINX Gateway Fabric. | Loadbalancer | | `service.externalTrafficPolicy` | The `externalTrafficPolicy` of the service. The value `Local` preserves the client source IP. | Local | -| `service.annotations` | The `annotations` of the NGINX Kubernetes Gateway service. | {} | -| `service.ports` | A list of ports to expose through the NGINX Kubernetes Gateway service. Update it to match the listener ports from your Gateway resource. Follows the conventional Kubernetes yaml syntax for service ports. | [ port: 80, targetPort: 80, protocol: TCP, name: http; port: 443, targetPort: 443, protocol: TCP, name: https ] | +| `service.annotations` | The `annotations` of the NGINX Gateway Fabric service. | {} | +| `service.ports` | A list of ports to expose through the NGINX Gateway Fabric service. Update it to match the listener ports from your Gateway resource. Follows the conventional Kubernetes yaml syntax for service ports. | [ port: 80, targetPort: 80, protocol: TCP, name: http; port: 443, targetPort: 443, protocol: TCP, name: https ] | | `metrics.disable` | Disable exposing metrics in the Prometheus format. | false | | `metrics.port` | Set the port where the Prometheus metrics are exposed. Format: [1024 - 65535] | 9113 | | `metrics.secure` | Enable serving metrics via https. By default metrics are served via http. Please note that this endpoint will be secured with a self-signed certificate. | false | diff --git a/deploy/helm-chart/crds/gateway.nginx.org_nginxgateways.yaml b/deploy/helm-chart/crds/gateway.nginx.org_nginxgateways.yaml index a5829d407c..cceb83de3f 100644 --- a/deploy/helm-chart/crds/gateway.nginx.org_nginxgateways.yaml +++ b/deploy/helm-chart/crds/gateway.nginx.org_nginxgateways.yaml @@ -18,7 +18,7 @@ spec: schema: openAPIV3Schema: description: NginxGateway represents the dynamic configuration for an NGINX - Kubernetes Gateway control plane. + Gateway Fabric control plane. properties: apiVersion: description: 'APIVersion defines the versioned schema of this representation diff --git a/deploy/helm-chart/values.yaml b/deploy/helm-chart/values.yaml index c45b488d8a..fd16c1c21a 100644 --- a/deploy/helm-chart/values.yaml +++ b/deploy/helm-chart/values.yaml @@ -1,8 +1,8 @@ nginxGateway: - ## The kind of the NGINX Kubernetes Gateway installation - currently, only deployment is supported. + ## The kind of the NGINX Gateway Fabric installation - currently, only deployment is supported. kind: deployment ## gatewayClassName is the name of the GatewayClass that will be created as part of this release. Every NGINX Gateway - ## must have a unique corresponding GatewayClass resource. NGINX Kubernetes Gateway only processes resources that + ## Fabric must have a unique corresponding GatewayClass resource. NGINX Gateway Fabric only processes resources that ## belong to its class - i.e. have the "gatewayClassName" field resource equal to the class. gatewayClassName: nginx ## The name of the Gateway controller. The controller name must be of the form: DOMAIN/PATH. The controller's domain @@ -13,12 +13,12 @@ nginxGateway: logging: ## Log level. Supported values "info", "debug", "error". level: info - ## The number of replicas of the NGINX Kubernetes Gateway Deployment. + ## The number of replicas of the NGINX Gateway Fabric Deployment. replicaCount: 1 ## The configuration for leader election. leaderElection: - ## Enable leader election. Leader election is used to avoid multiple replicas of the NGINX Kubernetes Gateway - ## reporting the status of the Gateway API resources. If not enabled, all replicas of NGINX Kubernetes Gateway + ## Enable leader election. Leader election is used to avoid multiple replicas of the NGINX Gateway Fabric + ## reporting the status of the Gateway API resources. If not enabled, all replicas of NGINX Gateway Fabric ## will update the statuses of the Gateway API resources. enable: true ## The name of the leader election lock. A Lease object with this name will be created in the same Namespace as @@ -36,8 +36,8 @@ nginxGateway: initialDelaySeconds: 3 image: - ## The NGINX Kubernetes Gateway image to use - repository: ghcr.io/nginxinc/nginx-kubernetes-gateway + ## The NGINX Gateway Fabric image to use + repository: ghcr.io/nginxinc/nginx-gateway-fabric tag: edge pullPolicy: Always @@ -48,27 +48,27 @@ nginxGateway: nginx: ## The NGINX image to use image: - repository: ghcr.io/nginxinc/nginx-kubernetes-gateway/nginx + repository: ghcr.io/nginxinc/nginx-gateway-fabric/nginx tag: edge pullPolicy: Always serviceAccount: annotations: {} - ## The name of the service account of the NGINX Kubernetes Gateway pods. Used for RBAC. + ## The name of the service account of the NGINX Gateway Fabric pods. Used for RBAC. ## Autogenerated if not set or set to "". # name: nginx-gateway service: - ## Creates a service to expose the NGINX Kubernetes Gateway pods. + ## Creates a service to expose the NGINX Gateway Fabric pods. create: true - ## The type of service to create for the NGINX Kubernetes Gateway. + ## The type of service to create for the NGINX Gateway Fabric. type: LoadBalancer ## The externalTrafficPolicy of the service. The value Local preserves the client source IP. externalTrafficPolicy: Local - ## The annotations of the NGINX Kubernetes Gateway service. + ## The annotations of the NGINX Gateway Fabric service. annotations: {} - ## A list of ports to expose through the NGINX Kubernetes Gateway service. Update it to match the listener ports from + ## A list of ports to expose through the NGINX Gateway Fabric service. Update it to match the listener ports from ## your Gateway resource. Follows the conventional Kubernetes yaml syntax for service ports. ports: - port: 80 diff --git a/deploy/manifests/crds/gateway.nginx.org_nginxgateways.yaml b/deploy/manifests/crds/gateway.nginx.org_nginxgateways.yaml index a5829d407c..cceb83de3f 100644 --- a/deploy/manifests/crds/gateway.nginx.org_nginxgateways.yaml +++ b/deploy/manifests/crds/gateway.nginx.org_nginxgateways.yaml @@ -18,7 +18,7 @@ spec: schema: openAPIV3Schema: description: NginxGateway represents the dynamic configuration for an NGINX - Kubernetes Gateway control plane. + Gateway Fabric control plane. properties: apiVersion: description: 'APIVersion defines the versioned schema of this representation diff --git a/deploy/manifests/nginx-gateway.yaml b/deploy/manifests/nginx-gateway.yaml index 8adf00fc94..648785e01d 100644 --- a/deploy/manifests/nginx-gateway.yaml +++ b/deploy/manifests/nginx-gateway.yaml @@ -3,7 +3,7 @@ kind: Namespace metadata: name: nginx-gateway --- -# Source: nginx-kubernetes-gateway/templates/rbac.yaml +# Source: nginx-gateway-fabric/templates/rbac.yaml apiVersion: v1 kind: ServiceAccount metadata: @@ -16,7 +16,7 @@ metadata: annotations: {} --- -# Source: nginx-kubernetes-gateway/templates/rbac.yaml +# Source: nginx-gateway-fabric/templates/rbac.yaml apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRole metadata: @@ -90,7 +90,7 @@ rules: - get - update --- -# Source: nginx-kubernetes-gateway/templates/rbac.yaml +# Source: nginx-gateway-fabric/templates/rbac.yaml apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRoleBinding metadata: @@ -108,7 +108,7 @@ subjects: name: nginx-gateway namespace: nginx-gateway --- -# Source: nginx-kubernetes-gateway/templates/deployment.yaml +# Source: nginx-gateway-fabric/templates/deployment.yaml apiVersion: apps/v1 kind: Deployment metadata: @@ -155,7 +155,7 @@ spec: valueFrom: fieldRef: fieldPath: metadata.name - image: ghcr.io/nginxinc/nginx-kubernetes-gateway:edge + image: ghcr.io/nginxinc/nginx-gateway-fabric:edge imagePullPolicy: Always name: nginx-gateway ports: @@ -186,7 +186,7 @@ spec: mountPath: /etc/nginx/secrets - name: nginx-run mountPath: /var/run/nginx - - image: ghcr.io/nginxinc/nginx-kubernetes-gateway/nginx:edge + - image: ghcr.io/nginxinc/nginx-gateway-fabric/nginx:edge imagePullPolicy: Always name: nginx ports: @@ -231,7 +231,7 @@ spec: - name: nginx-lib emptyDir: {} --- -# Source: nginx-kubernetes-gateway/templates/gatewayclass.yaml +# Source: nginx-gateway-fabric/templates/gatewayclass.yaml apiVersion: gateway.networking.k8s.io/v1beta1 kind: GatewayClass metadata: @@ -243,7 +243,7 @@ metadata: spec: controllerName: gateway.nginx.org/nginx-gateway-controller --- -# Source: nginx-kubernetes-gateway/templates/nginxgateway.yaml +# Source: nginx-gateway-fabric/templates/nginxgateway.yaml apiVersion: gateway.nginx.org/v1alpha1 kind: NginxGateway metadata: diff --git a/deploy/manifests/service/loadbalancer-aws-nlb.yaml b/deploy/manifests/service/loadbalancer-aws-nlb.yaml index 81efdeaf13..ab64f656cf 100644 --- a/deploy/manifests/service/loadbalancer-aws-nlb.yaml +++ b/deploy/manifests/service/loadbalancer-aws-nlb.yaml @@ -1,5 +1,5 @@ --- -# Source: nginx-kubernetes-gateway/templates/service.yaml +# Source: nginx-gateway-fabric/templates/service.yaml apiVersion: v1 kind: Service metadata: diff --git a/deploy/manifests/service/loadbalancer.yaml b/deploy/manifests/service/loadbalancer.yaml index 1aed2a6aab..660a236579 100644 --- a/deploy/manifests/service/loadbalancer.yaml +++ b/deploy/manifests/service/loadbalancer.yaml @@ -1,5 +1,5 @@ --- -# Source: nginx-kubernetes-gateway/templates/service.yaml +# Source: nginx-gateway-fabric/templates/service.yaml apiVersion: v1 kind: Service metadata: diff --git a/deploy/manifests/service/nodeport.yaml b/deploy/manifests/service/nodeport.yaml index 64c9f3d86a..83c236da7d 100644 --- a/deploy/manifests/service/nodeport.yaml +++ b/deploy/manifests/service/nodeport.yaml @@ -1,5 +1,5 @@ --- -# Source: nginx-kubernetes-gateway/templates/service.yaml +# Source: nginx-gateway-fabric/templates/service.yaml apiVersion: v1 kind: Service metadata: diff --git a/design/control-data-plane-separation/design.md b/design/control-data-plane-separation/design.md index 4c1630c8ed..655aa06b7c 100644 --- a/design/control-data-plane-separation/design.md +++ b/design/control-data-plane-separation/design.md @@ -2,13 +2,13 @@ This document proposes a design for separating the control and data planes. -Issue #292: https://github.com/nginxinc/nginx-kubernetes-gateway/issues/292 +Issue #292: https://github.com/nginxinc/nginx-gateway-fabric/issues/292 > Note: I use data plane and agent interchangeably in this document. ## Background -NKG composes its control and data plane containers into a single Kubernetes Pod. The control plane uses OS signals and a +NGF composes its control and data plane containers into a single Kubernetes Pod. The control plane uses OS signals and a shared file system to configure and reload nginx. This architecture is problematic because the same RBAC policies govern the control and data planes and share CVE potential. A compromised control plane may impact the customer’s traffic. The Kubernetes API server may be affected if the data plane is compromised. In addition to security concerns, this @@ -39,7 +39,7 @@ I propose using the [nginx agent](https://github.com/nginx/agent) as our data pl #### Evaluation of Requirements -The following list outlines all of NKG's requirements for an agent and whether the nginx agent meets them: +The following list outlines all of NGF's requirements for an agent and whether the nginx agent meets them: - [x] It is open source. - [x] It supports both OSS and Plus versions of nginx. @@ -202,7 +202,7 @@ this option as a last resort that we can decide to adopt if we hit a roadblock w ![Deployment architecture](deployment-architecture.png) -- _Control Plane Deployment_: The control plane is a Kubernetes Deployment with one container running the NKG +- _Control Plane Deployment_: The control plane is a Kubernetes Deployment with one container running the NGF controller. Initially, the control plane will be limited to a single Pod. Once we add leader election, the control plane will be able to scale. The control plane will perform the same functions as it does today, but instead of configuring nginx by writing files to a shared volume, it will send the configuration to the agent via gRPC. @@ -223,11 +223,11 @@ the control plane. In the future, we may reconsider this model if there’s a us multiple `Gateway` resources. For example, in that model, it might make sense for the control plane to be responsible for provisioning a separate data plane for each `Gateway.` -### Running Multiple NKG Controllers +### Running Multiple NGF Controllers -Users can run multiple NKG controllers in the same cluster by leveraging the `GatewayClass` resource. Multiple NKG +Users can run multiple NGF controllers in the same cluster by leveraging the `GatewayClass` resource. Multiple NGF controllers will be able to coexist in the same cluster as long as they each have a unique corresponding `GatewayClass` -resource. In this case, each installation of NKG will contain a unique `GatewayClass` resource, a control plane +resource. In this case, each installation of NGF will contain a unique `GatewayClass` resource, a control plane Deployment, and a data plane Deployment/DaemonSet. ### Communication Channels @@ -388,7 +388,7 @@ message NginxConfig { comparing configuration against previous deployments) and to interrogate the file system before applying the configuration. -I found that for NKG’s use case, the `access_logs,` `error_logs,` and `ssl` fields are unnecessary. For more details on +I found that for NGF’s use case, the `access_logs,` `error_logs,` and `ssl` fields are unnecessary. For more details on how the control plane pushes nginx config to the agent, see the [Configuration Download](#configuration-download) section. @@ -408,7 +408,7 @@ following names: The Secrets will be mounted to the control plane and agent containers, respectively. If desired, we can make the Secret names and mount path configurable via flags. For production, we will direct the user to provide their own certificates. For development and testing purposes, we will provide a self-signed default certificate. In order to be secure by -default, NKG should generate the default certificates and keypair during installation using a Kubernetes Job. +default, NGF should generate the default certificates and keypair during installation using a Kubernetes Job. #### Certificate Rotation @@ -535,7 +535,7 @@ the enabled features, extensions, tags, log configuration, and alias for the age #### Building the NginxConfig message -Currently, NKG configures nginx by translating the Gateway API resources into +Currently, NGF configures nginx by translating the Gateway API resources into an [internal representation of the nginx config][internal-config], executing a template with this data to generate the nginx configuration as bytes, and then writing the bytes to the filesystem. @@ -573,7 +573,7 @@ The TLS certificates and keys specified in the [`GatewayTLSConfig`][gw-tls-confi to Kubernetes Secrets. In the future, we will support other forms of authentication data, such as JWT tokens and user/pass files. Users will also store this secret data in Kubernetes Secrets. -Currently, NKG watches all Secrets, stores them in memory, and then selectively writes them to the filesystem. We only +Currently, NGF watches all Secrets, stores them in memory, and then selectively writes them to the filesystem. We only write Secrets that are referenced by `Listeners` to the filesystem. As part of the separation work, we need to figure out a way for the data plane to have access to these TLS certificates and keys. @@ -664,7 +664,7 @@ command and then download the config chunks over the `DownloadChannel .`It will configuration and attempt to apply it. It will send the status of the configuration application over the `CommandChannel` in a `NginxConfigResponse` message. -[internal-config]: https://github.com/nginxinc/nginx-kubernetes-gateway/blob/main/internal/nginx/config/http/config.go +[internal-config]: https://github.com/nginxinc/nginx-gateway-fabric/blob/main/internal/nginx/config/http/config.go [zip-file]: https://github.com/nginx/agent/blob/ea3a1b4df5d7ecf95bd3d9297d26e420f5e1dd57/sdk/proto/common.pb.go#L668 @@ -729,7 +729,7 @@ Since the data plane is deployed in its own Pod, a user can horizontally scale t control plane. When a new agent Pod spins up, the agent will register itself with the control plane. The control plane will have to keep track of all the agents. -We will need to figure out how many agent instances can be supported by NKG’s control plane. As an example data point, +We will need to figure out how many agent instances can be supported by NGF’s control plane. As an example data point, NGINX Controller can monitor and manage up to 100 N+ instances or up to 30 N+ instances with App Protect enabled. Since our use case for the agent is much simpler than NGINX Controller, we may be able to support more instances of the agent. @@ -776,8 +776,8 @@ ok command-line-arguments 17.727s ### Performance goals -- NKG can handle frequent configuration changes (1 change per second) -- NKG can handle large configurations: +- NGF can handle frequent configuration changes (1 change per second) +- NGF can handle large configurations: - 5000 server blocks - 64 TLS certs/keys - 50 JWT keys @@ -785,6 +785,6 @@ ok command-line-arguments 17.727s - 50 CA certs - 50 basic auth files - 50 OIDC secrets -- NKG can scale to X number of data plane pods (we need to figure out what X is) +- NGF can scale to X number of data plane pods (we need to figure out what X is) [performance]: https://github.com/nginx/agent/blob/main/test/performance/user_workflow_test.go diff --git a/design/resource-validation.md b/design/resource-validation.md index ccbe654e26..c78adde7ef 100644 --- a/design/resource-validation.md +++ b/design/resource-validation.md @@ -1,25 +1,25 @@ # Resource Validation -NGINX Kubernetes Gateway (NKG) must validate Gateway API resources for reliability, security, and conformity with the +NGINX Gateway Fabric (NGF) must validate Gateway API resources for reliability, security, and conformity with the Gateway API specification. ## Background ### Why Validate? -NKG transforms the Gateway API resources into NGINX configuration. Before transforming a resource, NKG needs to ensure +NGF transforms the Gateway API resources into NGINX configuration. Before transforming a resource, NGF needs to ensure its validity, which is important for the following reasons: 1. *To prevent an invalid value from propagating into NGINX configuration*. For example, the URI in a path-based routing rule. The propagating has the following consequences: 1. Invalid input will make NGINX fail to reload. Moreover, until the corresponding invalid config is removed from - NGINX configuration, NKG will not be able to reload NGINX for any future configuration changes. This affects the - reliability of NKG. - 2. Malicious input can breach the security of NKG. For example, if a malicious user can insert raw NGINX config ( + NGINX configuration, NGF will not be able to reload NGINX for any future configuration changes. This affects the + reliability of NGF. + 2. Malicious input can breach the security of NGF. For example, if a malicious user can insert raw NGINX config ( something similar to an SQL injection), they can configure NGINX to serve the files on the container filesystem. - This affects the security of NKG. + This affects the security of NGF. 2. *To conform to the Gateway API spec*. For example, if an HTTPRoute configures an unsupported filter, an - implementation like NKG needs to "set Accepted Condition for the Route to `status: False`, with a Reason + implementation like NGF needs to "set Accepted Condition for the Route to `status: False`, with a Reason of `UnsupportedValue`". ### Validation by the Gateway API Project @@ -34,14 +34,14 @@ To help the implementations with the validation, the Gateway API already include Gateway API installation files. The validation covers additional logic, not possible to implement in the CRDs. It does not repeat the validation from the CRDs. Note: a user can bypass this validation if the webhook is not installed. -However, the built-in validation rules do not cover all validation needs of NKG: +However, the built-in validation rules do not cover all validation needs of NGF: - The rules are not enough for NGINX. For example, the validation rule for the `value` of the path in a path-based routing rule allows symbols like `;`, `{` and `}`, which can break NGINX configuration for the corresponding [location](https://nginx.org/en/docs/http/ngx_http_core_module.html#location) block. - The rules don't cover unsupported field cases. For example, the webhook does not know which filters are implemented by - NKG, thus it cannot generate an appropriate error for NKG. + NGF, thus it cannot generate an appropriate error for NGF. Additionally, as mentioned in [GEP-922](https://gateway-api.sigs.k8s.io/geps/gep-922/#implementers), "implementers must not rely on webhook or CRD validation as a security mechanism. If field values need to be escaped to @@ -53,20 +53,20 @@ Design a validation mechanism for Gateway API resources. ### Personas -- *Cluster admin* who installs Gateway API (the CRDs and Webhook), installs NKG, creates Gateway and GatewayClass +- *Cluster admin* who installs Gateway API (the CRDs and Webhook), installs NGF, creates Gateway and GatewayClass resources. - *Application developer* who creates HTTPRoutes and other routes. ### User Stories -1. As a cluster admin, I'd like to share NKG among multiple application developers, specifically in a way that invalid +1. As a cluster admin, I'd like to share NGF among multiple application developers, specifically in a way that invalid resources of one developer do not affect on the resources of the other developers. -2. As a cluster admin/application developer, I expect that NKG rejects any invalid resources I create and I am able to +2. As a cluster admin/application developer, I expect that NGF rejects any invalid resources I create and I am able to see the reasons (errors) for that. ### Goals -- Ensure that NKG continues to work and/or fails predictably in the face of invalid input. +- Ensure that NGF continues to work and/or fails predictably in the face of invalid input. - Ensure that both cluster admin and application developers can see the validation errors reported about the resource they create (own). - For the best UX, minimize the feedback loop: users should be able to see most of the validation errors reported by a @@ -80,14 +80,14 @@ Design a validation mechanism for Gateway API resources. ## Design -We will introduce two validation methods to be run by NKG control plane: +We will introduce two validation methods to be run by NGF control plane: 1. Re-run of the Gateway API webhook validation -2. NKG-specific field validation +2. NGF-specific field validation ### Re-run of Webhook Validation -Before processing a resource, NKG will validate it using the functions from +Before processing a resource, NGF will validate it using the functions from the [validation package](https://github.com/kubernetes-sigs/gateway-api/tree/b241afc88e68c952cc0a59a5c72a51358dc2bada/apis/v1beta1/validation) from the Gateway API. This will ensure that the webhook validation cannot be bypassed (it can be bypassed if the webhook is not installed, misconfigured, or running a different version), and it will allow us to avoid repeating the same @@ -95,91 +95,91 @@ validation in our code. If a resource is invalid: -- NKG will not process it -- it will treat it as if the resource didn't exist. This also means that if the resource was - updated from a valid to an invalid state, NKG will also ignore any previous valid state. For example, it will remove +- NGF will not process it -- it will treat it as if the resource didn't exist. This also means that if the resource was + updated from a valid to an invalid state, NGF will also ignore any previous valid state. For example, it will remove the generation configuration for an HTTPRoute resource. -- NKG will report the validation error as a +- NGF will report the validation error as a Warning [Event](https://kubernetes.io/docs/reference/kubernetes-api/cluster-resources/event-v1/) for that resource. The Event message will describe the error and explain that the resource was ignored. We chose to - report an Event instead of updating the status, because to update the status, NKG first needs to look inside the + report an Event instead of updating the status, because to update the status, NGF first needs to look inside the resource to determine whether it belongs to it or not. However, since the webhook validation applies to all parts of - the spec of resource, it means NKG has to look inside the invalid resource and parse potentially invalid parts. To - avoid that, NKG will report an Event. The owner of the resource will be able to see the Event. -- NGK will also report the validation error in the NGK logs. + the spec of resource, it means NGF has to look inside the invalid resource and parse potentially invalid parts. To + avoid that, NGF will report an Event. The owner of the resource will be able to see the Event. +- NGF will also report the validation error in the NGF logs. -### NKG-specific validation +### NGF-specific validation -After re-running the webhook validation, NKG will run NKG-specific validation, written in go. +After re-running the webhook validation, NGF will run NGF-specific validation, written in go. -NKG-specific validation will: +NGF-specific validation will: 1. Ensure field values are considered valid by NGINX (cannot make NGINX fail to reload). 2. Ensure valid field values do not include any malicious configuration. 3. Report an error if an unsupported field is present in a resource (as the Gateway API spec prescribes). -NKG-specific validation will not include: +NGF-specific validation will not include: -- *All* validation done by CRDs. NKG will only repeat the validation that addresses (1) and (2) in the list above with - extra rules required by NGINX but missing in the CRDs. For example, NKG will not ensure the limits of field values. +- *All* validation done by CRDs. NGF will only repeat the validation that addresses (1) and (2) in the list above with + extra rules required by NGINX but missing in the CRDs. For example, NGF will not ensure the limits of field values. - The validation done by the webhook (because it is done in the previous step). -If a resource is invalid, NKG will report the error in its status. +If a resource is invalid, NGF will report the error in its status. ### Summary of Validation -The table below summarizes the validation methods NKG will use. Any Gateway API resource will be validated by the +The table below summarizes the validation methods NGF will use. Any Gateway API resource will be validated by the following methods in order of their appearance in the table. | Name | Type | Component | Scope | Feedback loop for errors | Can be bypassed? | |------------------------------|---------|-----------------------|-------------------------|----------------------------------------------------------------------------------|--------------------------------------------------------------------------------------| | CRD validation | OpenAPI | Kubernetes API server | Structure, field values | Kubernetes API server returns any errors a response for an API call. | Yes, if the CRDs are modified. | | Webhook validation | Go code | Gateway API webhook | Field values | Kubernetes API server returns any errors a response for an API call. | Yes, if the webhook is not installed, misconfigured, or running a different version. | -| Re-run of webhook validation | Go code | NKG control plane | Field values | Errors are reported as Event for the resource. | No | -| NGK-specific validation | Go code | NKG control plane | Field values | Errors are reported in the status of a resource after its creation/modification. | No | +| Re-run of webhook validation | Go code | NGF control plane | Field values | Errors are reported as Event for the resource. | No | +| NGF-specific validation | Go code | NGF control plane | Field values | Errors are reported in the status of a resource after its creation/modification. | No | Notes: -- The amount and the extent of the validation should allow multiple application developers to share a single NKG (User +- The amount and the extent of the validation should allow multiple application developers to share a single NGF (User story 1). - We expect that most of the validation problems will be caught by CRD and webhook validation and reported quickly to users as a response to a Kubernetes API call (User story 2). ### Evolution -NKG will support more resources: +NGF will support more resources: -- More Gateway API resources. For those, NGK will use the four validation methods from the table in the previous +- More Gateway API resources. For those, NGF will use the four validation methods from the table in the previous section. -- Introduce NKG resources. For those, NKG will use CRD validation (the rules of which are fully controlled by us). The +- Introduce NGF resources. For those, NGF will use CRD validation (the rules of which are fully controlled by us). The CRD validation will include the validation to prevent invalid NGINX configuration values and malicious values. Because - the CRD validation can be bypassed, NKG control plane will need to run the same validation rules. In addition to that, - NKG control plane will run any extra validation not possible to define via CRDs. + the CRD validation can be bypassed, NGF control plane will need to run the same validation rules. In addition to that, + NGF control plane will run any extra validation not possible to define via CRDs. -We will not introduce any NKG webhook in the cluster (it adds operational complexity for the cluster admin and is a +We will not introduce any NGF webhook in the cluster (it adds operational complexity for the cluster admin and is a source of potential downtime -- a webhook failure disables CRUD operations on the relevant resources) unless we find good reasons for that. ### Upgrades -Since NKG will use the validation package from the Gateway API project, when a new release happens, we will need to -upgrade the dependency and release a new version of NKG, provided that the validation code changed. However, if it did +Since NGF will use the validation package from the Gateway API project, when a new release happens, we will need to +upgrade the dependency and release a new version of NGF, provided that the validation code changed. However, if it did not change, we do not need to release a new version. Note: other things from a new Gateway API release might prompt us to release a new version like supporting a new field. See also [GEP-922](https://gateway-api.sigs.k8s.io/geps/gep-922/#). ### Reliability -NGK processes two kinds of transactions: +NGF processes two kinds of transactions: - *Data plane transactions*. NGINX handles requests from clients that want to connect to applications exposed through - NKG. -- *Control plane transactions*. NKG handles configuration requests (ex. a new HTTPRoute is created) from NKG users. + NGF. +- *Control plane transactions*. NGF handles configuration requests (ex. a new HTTPRoute is created) from NGF users. Invalid user input makes NGINX config invalid, which means NGINX will fail to reload, which will prevent any new control plane transactions until that invalid value is fixed or removed. The proposed design addresses this issue by preventing -NKG from generating invalid NGINX configuration. +NGF from generating invalid NGINX configuration. -However, in case of bugs in the NKG validation code, NKG might still generate an invalid NGINX config. When that +However, in case of bugs in the NGF validation code, NGF might still generate an invalid NGINX config. When that happens, NGINX will fail to reload, but it will continue to use the last known valid config, so that the data plane transactions will not be stopped. This situation must be reported to both the cluster admin and the app developers. However, this is out of the scope of this design doc. @@ -188,14 +188,14 @@ However, this is out of the scope of this design doc. The proposed design ensures that the configuration values are properly validated before reaching NGINX config, which will prevent a malicious user from misusing them. For example, it will not be possible to inject NGINX configuration -which can turn it into a web server serving the contents of the NKG data plane container file system. +which can turn it into a web server serving the contents of the NGF data plane container file system. ## Alternatives Considered ### Utilize CRD Validation It is [possible](https://github.com/hasheddan/k8s-cr-validator) to run CRD validation from Go code. However, this will -require NKG to be shipped with the Gateway API CRDs, which will increase the coupling between NKG and the Gateway API +require NGF to be shipped with the Gateway API CRDs, which will increase the coupling between NGF and the Gateway API version. Additionally, the extra benefits are not clear: the validation proposed in this design document should adequately @@ -205,14 +205,14 @@ developer -- they need to be a cluster admin to update the CRDs in the cluster. At the same time, if a [convenient validation package](https://github.com/kubernetes-sigs/gateway-api/issues/926) that includes CRD validation is developed, we will revisit the design. -### Write NKG-specific Validation Rules in Validation Language +### Write NGF-specific Validation Rules in Validation Language -It is possible to define validation rules in an expression language like [CEL](https://github.com/google/cel-spec). NKG +It is possible to define validation rules in an expression language like [CEL](https://github.com/google/cel-spec). NGF can load those rules, compile and run them. Because (1) we need to define validation rules only to parts of Gateway API resources and (2) it is not necessary to load them on the fly, the approach will not provide any benefits over defining those rules in go. -At the same time, we might use CEL for validating future NGK CRDs (CEL +At the same time, we might use CEL for validating future NGF CRDs (CEL is [supported](https://kubernetes.io/docs/tasks/extend-kubernetes/custom-resources/custom-resource-definitions/#validation-rules) in CRDs). diff --git a/docs/README.md b/docs/README.md index f1903ffaaf..d93ff1c5a6 100644 --- a/docs/README.md +++ b/docs/README.md @@ -1,27 +1,27 @@ -# NGINX Kubernetes Gateway Documentation +# NGINX Gateway Fabric Documentation -This directory contains all of the documentation relating to NGINX Kubernetes Gateway. +This directory contains all of the documentation relating to NGINX Gateway Fabric. ## Contents -- [Architecture](architecture.md): An overview of the architecture and design principles of NGINX Kubernetes Gateway. -- [Gateway API Compatibility](gateway-api-compatibility.md): Describes which Gateway API resources NGINX Kubernetes -Gateway supports and the extent of that support. -- [Installation](installation.md): Walkthrough on how to install NGINX Kubernetes Gateway on a generic Kubernetes cluster. -- [Resource Validation](resource-validation.md): Describes how NGINX Kubernetes Gateway validates Gateway API +- [Architecture](architecture.md): An overview of the architecture and design principles of NGINX Gateway Fabric. +- [Gateway API Compatibility](gateway-api-compatibility.md): Describes which Gateway API resources NGINX Gateway +Fabric supports and the extent of that support. +- [Installation](installation.md): Walkthrough on how to install NGINX Gateway Fabric on a generic Kubernetes cluster. +- [Resource Validation](resource-validation.md): Describes how NGINX Gateway Fabric validates Gateway API resources. - [Control Plane Configuration](control-plane-configuration.md): Describes how to dynamically update the NGINX -Kubernetes Gateway control plane configuration. -- [Building the Images](building-the-images.md): Steps on how to build the NGINX Kubernetes Gateway container images +Gateway Fabric control plane configuration. +- [Building the Images](building-the-images.md): Steps on how to build the NGINX Gateway Fabric container images yourself. -- [Running on Kind](running-on-kind.md): Walkthrough on how to run NGINX Kubernetes Gateway on a `kind` cluster. -- [CLI Help](cli-help.md): Describes the commands available in the `gateway` binary of `nginx-kubernetes-gateway` +- [Running on Kind](running-on-kind.md): Walkthrough on how to run NGINX Gateway Fabric on a `kind` cluster. +- [CLI Help](cli-help.md): Describes the commands available in the `gateway` binary of `nginx-gateway-fabric` container. -- [Monitoring](monitoring.md): Information on monitoring NGINX Kubernetes Gateway using Prometheus metrics. +- [Monitoring](monitoring.md): Information on monitoring NGINX Gateway Fabric using Prometheus metrics. - [Troubleshooting](troubleshooting.md): Troubleshooting guide for common or known issues. ### Directories -- [Guides](guides): Guides about configuring NGINX Kubernetes Gateway for various use cases. +- [Guides](guides): Guides about configuring NGINX Gateway Fabric for various use cases. - [Developer](developer/): Docs for developers of the project. Contains guides relating to processes and workflows. - [Proposals](proposals/): Enhancement proposals for new features. diff --git a/docs/architecture.md b/docs/architecture.md index 007d605e87..86f1f2177e 100644 --- a/docs/architecture.md +++ b/docs/architecture.md @@ -1,6 +1,6 @@ # Architecture -This document provides an overview of the architecture and design principles of the NGINX Kubernetes Gateway. The target +This document provides an overview of the architecture and design principles of the NGINX Gateway Fabric. The target audience includes the following groups: - *Cluster Operators* who would like to know how the software works and also better understand how it can fail. @@ -9,29 +9,29 @@ audience includes the following groups: We assume that the reader is familiar with core Kubernetes concepts, such as Pods, Deployments, Services, and Endpoints. Additionally, we recommend reading [this blog post][blog] for an overview of the NGINX architecture. -[contribute]: https://github.com/nginxinc/nginx-kubernetes-gateway/blob/main/CONTRIBUTING.md +[contribute]: https://github.com/nginxinc/nginx-gateway-fabric/blob/main/CONTRIBUTING.md [blog]: https://www.nginx.com/blog/inside-nginx-how-we-designed-for-performance-scale/ -## What is NGINX Kubernetes Gateway? +## What is NGINX Gateway Fabric? -The NGINX Kubernetes Gateway is a component in a Kubernetes cluster that configures an HTTP load balancer according to +The NGINX Gateway Fabric is a component in a Kubernetes cluster that configures an HTTP load balancer according to Gateway API resources created by Cluster Operators and Application Developers. > If you’d like to read more about the Gateway API, refer to [Gateway API documentation][sig-gateway]. -This document focuses specifically on the NGINX Kubernetes Gateway, also known as NKG, which uses NGINX as its data +This document focuses specifically on the NGINX Gateway Fabric, also known as NGF, which uses NGINX as its data plane. [sig-gateway]: https://gateway-api.sigs.k8s.io/ -## NGINX Kubernetes Gateway at a High Level +## NGINX Gateway Fabric at a High Level -To start, let's take a high-level look at the NGINX Kubernetes Gateway (NKG). The accompanying diagram illustrates an -example scenario where NKG exposes two web applications hosted within a Kubernetes cluster to external clients on the +To start, let's take a high-level look at the NGINX Gateway Fabric (NGF). The accompanying diagram illustrates an +example scenario where NGF exposes two web applications hosted within a Kubernetes cluster to external clients on the internet: -![NKG High Level](/docs/images/nkg-high-level.png) +![NGF High Level](/docs/images/ngf-high-level.png) The figure shows: @@ -40,9 +40,9 @@ The figure shows: cluster through the Kubernetes API by creating Kubernetes objects. - *Clients A* and *Clients B* connect to *Applications A* and *B*, respectively. This applications have been deployed by the corresponding users. -- The *NKG Pod*, [deployed by *Cluster Operator*](/docs/installation.md) in the Namespace *nginx-gateway*. For -scalability and availability, you can have multiple replicas. This Pod consists of two containers: `NGINX` and `NKG`. -The *NKG* container interacts with the Kubernetes API to retrieve the most up-to-date Gateway API resources created +- The *NGF Pod*, [deployed by *Cluster Operator*](/docs/installation.md) in the Namespace *nginx-gateway*. For +scalability and availability, you can have multiple replicas. This Pod consists of two containers: `NGINX` and `NGF`. +The *NGF* container interacts with the Kubernetes API to retrieve the most up-to-date Gateway API resources created within the cluster. It then dynamically configures the *NGINX* container based on these resources, ensuring proper alignment between the cluster state and the NGINX configuration. - *Gateway AB*, created by *Cluster Operator*, requests a point where traffic can be translated to Services within the @@ -54,7 +54,7 @@ and attaches it to `Gateway AB`. - *Application B* with one Pod deployed in the *applications* Namespace by *Application Developer B*. To expose the application to its clients (*Clients B*) via the host `b.example.com`, *Application Developer B* creates *HTTPRoute B* and attaches it to `Gateway AB`. -- *Public Endpoint*, which fronts the *NKG* Pod. This is typically a TCP load balancer (cloud, software, or hardware) +- *Public Endpoint*, which fronts the *NGF* Pod. This is typically a TCP load balancer (cloud, software, or hardware) or a combination of such load balancer with a NodePort Service. *Clients A* and *B* connect to their applications via the *Public Endpoint*. @@ -66,11 +66,11 @@ all the green resources. > Note: For simplicity, many necessary Kubernetes resources like Deployment and Services aren't shown, > which the Cluster Operator and the Application Developers also need to create. -Next, let's explore the NKG Pod. +Next, let's explore the NGF Pod. -## The NGINX Kubernetes Gateway Pod +## The NGINX Gateway Fabric Pod -The NGINX Kubernetes Gateway consists of two containers: +The NGINX Gateway Fabric consists of two containers: 1. `nginx`: the data plane. Consists of an NGINX master process and NGINX worker processes. The master process controls the worker processes. The worker processes handle the client traffic and load balance the traffic to the backend @@ -84,35 +84,35 @@ the [controller-runtime][runtime] library. It watches Kubernetes objects (Servic CRDs), translates them to NGINX configuration, and configures NGINX. This configuration happens in two stages. First, NGINX configuration files are written to the NGINX configuration volume shared by the `nginx-gateway` and `nginx` containers. Next, the control plane reloads the NGINX process. This is possible because the two -containers [share a process namespace][share], which allows the NKG process to send signals to the NGINX master process. +containers [share a process namespace][share], which allows the NGF process to send signals to the NGINX master process. The diagram below provides a visual representation of the interactions between processes within the `nginx` and `nginx-gateway` containers, as well as external processes/entities. It showcases the connections and relationships between these components. -![NKG pod](/docs/images/nkg-pod.png) +![NGF pod](/docs/images/ngf-pod.png) The following list provides a description of each connection, along with its corresponding type indicated in parentheses. To enhance readability, the suffix "process" has been omitted from the process descriptions below. 1. (HTTPS) - - Read: *NKG* reads the *Kubernetes API* to get the latest versions of the resources in the cluster. - - Write: *NKG* writes to the *Kubernetes API* to update the handled resources' statuses and emit events. If there's - more than one replica of *NKG* and [leader election](/deploy/helm-chart/README.md#configuration) is enabled, only - the *NKG* Pod that is leading will write statuses to the *Kubernetes API*. -2. (HTTP, HTTPS) *Prometheus* fetches the `controller-runtime` and NGINX metrics via an HTTP endpoint that *NKG* exposes. - The default is :9113/metrics. Note: Prometheus is not required by NKG, the endpoint can be turned off. + - Read: *NGF* reads the *Kubernetes API* to get the latest versions of the resources in the cluster. + - Write: *NGF* writes to the *Kubernetes API* to update the handled resources' statuses and emit events. If there's + more than one replica of *NGF* and [leader election](/deploy/helm-chart/README.md#configuration) is enabled, only + the *NGF* Pod that is leading will write statuses to the *Kubernetes API*. +2. (HTTP, HTTPS) *Prometheus* fetches the `controller-runtime` and NGINX metrics via an HTTP endpoint that *NGF* exposes. + The default is :9113/metrics. Note: Prometheus is not required by NGF, the endpoint can be turned off. 3. (File I/O) - - Write: *NKG* generates NGINX *configuration* based on the cluster resources and writes them as `.conf` files to the + - Write: *NGF* generates NGINX *configuration* based on the cluster resources and writes them as `.conf` files to the mounted `nginx-conf` volume, located at `/etc/nginx/conf.d`. It also writes *TLS certificates* and *keys* from [TLS Secrets][secrets] referenced in the accepted Gateway resource to the `nginx-secrets` volume at the path `/etc/nginx/secrets`. - - Read: *NKG* reads the PID file `nginx.pid` from the `nginx-run` volume, located at `/var/run/nginx`. *NKG* + - Read: *NGF* reads the PID file `nginx.pid` from the `nginx-run` volume, located at `/var/run/nginx`. *NGF* extracts the PID of the nginx process from this file in order to send reload signals to *NGINX master*. -4. (File I/O) *NKG* writes logs to its *stdout* and *stderr*, which are collected by the container runtime. -5. (HTTP) *NKG* fetches the NGINX metrics via the unix:/var/run/nginx/nginx-status.sock UNIX socket and converts it to +4. (File I/O) *NGF* writes logs to its *stdout* and *stderr*, which are collected by the container runtime. +5. (HTTP) *NGF* fetches the NGINX metrics via the unix:/var/run/nginx/nginx-status.sock UNIX socket and converts it to *Prometheus* format used in #2. -6. (Signal) To reload NGINX, *NKG* sends the [reload signal][reload] to the **NGINX master**. +6. (Signal) To reload NGINX, *NGF* sends the [reload signal][reload] to the **NGINX master**. 7. (File I/O) - Write: The *NGINX master* writes its PID to the `nginx.pid` file stored in the `nginx-run` volume. - Read: The *NGINX master* reads *configuration files* and the *TLS cert and keys* referenced in the configuration when @@ -129,8 +129,8 @@ parentheses. To enhance readability, the suffix "process" has been omitted from 10. (File I/O) An *NGINX worker* writes logs to its *stdout* and *stderr*, which are collected by the container runtime. 11. (Signal) The *NGINX master* controls the [lifecycle of *NGINX workers*][lifecycle] it creates workers with the new configuration and shutdowns workers with the old configuration. -12. (HTTP) To consider a configuration reload a success, *NKG* ensures that at least one NGINX worker has the new - configuration. To do that, *NKG* checks a particular endpoint via the unix:/var/run/nginx/nginx-config-version.sock +12. (HTTP) To consider a configuration reload a success, *NGF* ensures that at least one NGINX worker has the new + configuration. To do that, *NGF* checks a particular endpoint via the unix:/var/run/nginx/nginx-config-version.sock UNIX socket. 13. (HTTP,HTTPS) A *client* sends traffic to and receives traffic from any of the *NGINX workers* on ports 80 and 443. 14. (HTTP,HTTPS) An *NGINX worker* sends traffic to and receives traffic from the *backends*. @@ -145,7 +145,7 @@ parentheses. To enhance readability, the suffix "process" has been omitted from [lifecycle]: https://nginx.org/en/docs/control.html#reconfiguration -[conf-file]: https://github.com/nginxinc/nginx-kubernetes-gateway/blob/main/internal/mode/static/nginx/conf/nginx.conf +[conf-file]: https://github.com/nginxinc/nginx-gateway-fabric/blob/main/internal/mode/static/nginx/conf/nginx.conf [share]: https://kubernetes.io/docs/tasks/configure-pod-container/share-process-namespace/ diff --git a/docs/building-the-images.md b/docs/building-the-images.md index 14ab698c3a..c43f471cb9 100644 --- a/docs/building-the-images.md +++ b/docs/building-the-images.md @@ -2,7 +2,7 @@ ## Prerequisites -Before you can build the NGINX Kubernetes Gateway and NGINX images, make sure you have the following software +Before you can build the NGINX Gateway Fabric and NGINX images, make sure you have the following software installed on your machine: - [git](https://git-scm.com/) @@ -12,40 +12,40 @@ installed on your machine: ## Steps -1. Clone the repo and change into the `nginx-kubernetes-gateway` directory: +1. Clone the repo and change into the `nginx-gateway-fabric` directory: ```shell - git clone https://github.com/nginxinc/nginx-kubernetes-gateway.git - cd nginx-kubernetes-gateway + git clone https://github.com/nginxinc/nginx-gateway-fabric.git + cd nginx-gateway-fabric ``` 1. Build the images: - - To build both the NGINX Kubernetes Gateway and NGINX images: + - To build both the NGINX Gateway Fabric and NGINX images: ```makefile - make PREFIX=myregistry.example.com/nginx-kubernetes-gateway build-images + make PREFIX=myregistry.example.com/nginx-gateway-fabric build-images ``` - - To build just the NGINX Kubernetes Gateway image: + - To build just the NGINX Gateway Fabric image: ```makefile - make PREFIX=myregistry.example.com/nginx-kubernetes-gateway build-nkg-image + make PREFIX=myregistry.example.com/nginx-gateway-fabric build-ngf-image ``` - To build just the NGINX image: ```makefile - make PREFIX=myregistry.example.com/nginx-kubernetes-gateway build-nginx-image + make PREFIX=myregistry.example.com/nginx-gateway-fabric build-nginx-image ``` Set the `PREFIX` variable to the name of the registry you'd like to push the image to. By default, the images will be - named `nginx-kubernetes-gateway:edge` and `nginx-kubernetes-gateway/nginx:edge`. + named `nginx-gateway-fabric:edge` and `nginx-gateway-fabric/nginx:edge`. 1. Push the images to your container registry: ```shell - docker push myregistry.example.com/nginx-kubernetes-gateway:edge - docker push myregistry.example.com/nginx-kubernetes-gateway/nginx:edge + docker push myregistry.example.com/nginx-gateway-fabric:edge + docker push myregistry.example.com/nginx-gateway-fabric/nginx:edge ``` - Make sure to substitute `myregistry.example.com/nginx-kubernetes-gateway` with your registry. + Make sure to substitute `myregistry.example.com/nginx-gateway-fabric` with your registry. diff --git a/docs/cli-help.md b/docs/cli-help.md index 0bb4985388..48869c44c0 100644 --- a/docs/cli-help.md +++ b/docs/cli-help.md @@ -1,6 +1,6 @@ # Command-line Help -This document describes the commands available in the `gateway` binary of `nginx-kubernetes-gateway` container. +This document describes the commands available in the `gateway` binary of the `nginx-gateway` container. ## Static Mode @@ -17,7 +17,7 @@ Flags: | Name | Type | Description | |------------------------------|----------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | `gateway-ctlr-name` | `string` | The name of the Gateway controller. The controller name must be of the form: `DOMAIN/PATH`. The controller's domain is `gateway.nginx.org`. | -| `gatewayclass` | `string` | The name of the GatewayClass resource. Every NGINX Gateway must have a unique corresponding GatewayClass resource. | +| `gatewayclass` | `string` | The name of the GatewayClass resource. Every NGINX Gateway Fabric must have a unique corresponding GatewayClass resource. | | `gateway` | `string` | The namespaced name of the Gateway resource to use. Must be of the form: `NAMESPACE/NAME`. If not specified, the control plane will process all Gateways for the configured GatewayClass. However, among them, it will choose the oldest resource by creation timestamp. If the timestamps are equal, it will choose the resource that appears first in alphabetical order by {namespace}/{name}. | | `config` | `string` | The name of the NginxGateway resource to be used for this controller's dynamic configuration. Lives in the same Namespace as the controller. | | `metrics-disable` | `bool` | Disable exposing metrics in the Prometheus format. (default false) | @@ -26,5 +26,5 @@ Flags: | `update-gatewayclass-status` | `bool` | Update the status of the GatewayClass resource. (default true) | | `health-disable` | `bool` | Disable running the health probe server. (default false) | | `health-port` | `int` | Set the port where the health probe server is exposed. Format: `[1024 - 65535]` (default `8081`) | -| `leader-election-disable` | `bool` | Disable leader election. Leader election is used to avoid multiple replicas of the NGINX Kubernetes Gateway reporting the status of the Gateway API resources. If disabled, all replicas of NGINX Kubernetes Gateway will update the statuses of the Gateway API resources. (default false) | +| `leader-election-disable` | `bool` | Disable leader election. Leader election is used to avoid multiple replicas of the NGINX Gateway Fabric reporting the status of the Gateway API resources. If disabled, all replicas of NGINX Gateway Fabric will update the statuses of the Gateway API resources. (default false) | | `leader-election-lock-name` | `string` | The name of the leader election lock. A Lease object with this name will be created in the same Namespace as the controller. (default "nginx-gateway-leader-election-lock") | diff --git a/docs/control-plane-configuration.md b/docs/control-plane-configuration.md index 901160518d..2d2a13d033 100644 --- a/docs/control-plane-configuration.md +++ b/docs/control-plane-configuration.md @@ -1,12 +1,12 @@ # Control Plane Configuration -This document describes how to dynamically update the NGINX Kubernetes Gateway control plane configuration. +This document describes how to dynamically update the NGINX Gateway Fabric control plane configuration. ## Overview -NGINX Kubernetes Gateway offers a way to update the control plane configuration dynamically without the need for a +NGINX Gateway Fabric offers a way to update the control plane configuration dynamically without the need for a restart. The control plane configuration is stored in the NginxGateway custom resource. This resource is created -during the installation of NGINX Kubernetes Gateway. +during the installation of NGINX Gateway Fabric. If using manifests, the default name of the resource is `nginx-gateway-config`. If using Helm, the default name of the resource is `-config`. It is deployed in the same Namespace as the controller @@ -14,7 +14,7 @@ of the resource is `-config`. It is deployed in the same Namespace The control plane only watches this single instance of the custom resource. If the resource is invalid per the OpenAPI schema, the Kubernetes API server will reject the changes. If the resource is deleted or deemed invalid by NGINX -Kubernetes Gateway, a warning Event is created in the `nginx-gateway` Namespace, and the default values will be used by +Gateway Fabric, a warning Event is created in the `nginx-gateway` Namespace, and the default values will be used by the control plane for its configuration. Additionally, the control plane updates the status of the resource (if it exists) to reflect whether it is valid or not. diff --git a/docs/developer/branching-and-workflow.md b/docs/developer/branching-and-workflow.md index a86c8c9366..50c1f82695 100644 --- a/docs/developer/branching-and-workflow.md +++ b/docs/developer/branching-and-workflow.md @@ -1,19 +1,19 @@ # Branching and Workflow -NKG is an open source and public repository; our goal is to keep the number of branches in the repository to a minimum: +NGF is an open source and public repository; our goal is to keep the number of branches in the repository to a minimum: the main branch, release branches and long-term feature branches. Internal developers and external contributors will follow a fork and merge process. Each contributor should fork the -repo to their own space; branch, experiment, develop and prepare a pull request (PR) to merge their work into NKG’s main +repo to their own space; branch, experiment, develop and prepare a pull request (PR) to merge their work into NGF’s main branch. This way ephemeral developer branches will remain outside the main repository. Below is an example of following the merge and fork process. Developer Alice: -- Forks `github.com/nginxinc/nginx-kubernetes-gateway` → `github.com//nginx-kubernetes-gateway` +- Forks `github.com/nginxinc/nginx-gateway-fabric` → `github.com//nginx-gateway-fabric` - Adds upstream: ```shell - git remote add upstream git@github.com:nginxinc/nginx-kubernetes-gateway.git + git remote add upstream git@github.com:nginxinc/nginx-gateway-fabric.git ``` - Alice lists all of her configured remotes: @@ -25,15 +25,15 @@ Below is an example of following the merge and fork process. Developer Alice: Which shows the following: ```text - origin git@github.com:/nginx-kubernetes-gateway.git (fetch) - origin git@github.com:/nginx-kubernetes-gateway.git (push) - upstream git@github.com:nginxinc/nginx-kubernetes-gateway.git (fetch) - upstream git@github.com:nginxinc/nginx-kubernetes-gateway.git (push) + origin git@github.com:/nginx-gateway-fabric.git (fetch) + origin git@github.com:/nginx-gateway-fabric.git (push) + upstream git@github.com:nginxinc/nginx-gateway-fabric.git (fetch) + upstream git@github.com:nginxinc/nginx-gateway-fabric.git (push) ``` - Alice develops a feature or bugfix - using as many ephemeral branches as she needs. - Alice creates a - PR `github.com//nginx-kubernetes-gateway:feature/some-feature` → `github.com/nginxinc/nginx-kubernetes-gateway:main` + PR `github.com//nginx-gateway-fabric:feature/some-feature` → `github.com/nginxinc/nginx-gateway-fabric:main` - Alice keeps her fork up to date by running: ```shell diff --git a/docs/developer/design-principles.md b/docs/developer/design-principles.md index 3ab17b7ccf..c770e214ec 100644 --- a/docs/developer/design-principles.md +++ b/docs/developer/design-principles.md @@ -1,6 +1,6 @@ # Design Principles -The aim of the NGINX Kubernetes Gateway is to become a fundamental infrastructure component within a Kubernetes cluster, +The aim of the NGINX Gateway Fabric is to become a fundamental infrastructure component within a Kubernetes cluster, serving as both an ingress and egress point for traffic directed towards the services (applications) running within or outside the cluster. Leveraging NGINX as a data plane technology, it harnesses the well-established reputation of NGINX as an open-source project widely recognized for its role as a web server, proxy, load balancer, and content cache. NGINX @@ -8,8 +8,8 @@ is renowned for its stability, high performance, security, and rich feature set, infrastructure tool. Notably, once properly configured and operational, NGINX requires minimal attention, making it reliable and steady software. -The NGINX Kubernetes Gateway aims to embody the same qualities as NGINX and become familiar, trustworthy and reliable -software. The principles outlined below serve as a guide for engineering the NGINX Kubernetes Gateway with the intention +The NGINX Gateway Fabric aims to embody the same qualities as NGINX and become familiar, trustworthy and reliable +software. The principles outlined below serve as a guide for engineering the NGINX Gateway Fabric with the intention of achieving this goal. ## Security @@ -22,7 +22,7 @@ authentication, authorization, and encryption mechanisms. ## Availability As a critical infrastructure component, we must be highly available. We design and review features with redundancy and -fault tolerance in mind. We regularly test the NGINX Kubernetes Gateway's availability by simulating failure scenarios +fault tolerance in mind. We regularly test the NGINX Gateway Fabric's availability by simulating failure scenarios and conducting load testing. We work to identify potential weaknesses and bottlenecks, and address them to ensure high availability under various conditions. @@ -43,10 +43,10 @@ policies. We provide comprehensive logging, metrics, and tracing capabilities to gain insights into our behavior and performance. We prioritize Kubernetes-native observability tools like Prometheus, Grafana, and distributed tracing systems to help -users monitor the health of NGINX Kubernetes Gateway and to assist in diagnosing issues. +users monitor the health of NGINX Gateway Fabric and to assist in diagnosing issues. ## Ease of Use -NGINX Kubernetes Gateway must be easy and intuitive to use. This means that it should be easy to install, easy to +NGINX Gateway Fabric must be easy and intuitive to use. This means that it should be easy to install, easy to configure, and easy to monitor. Its defaults should be sane and should lead to "out-of-box" success. The documentation should be clear and provide meaningful examples that customer's can use to inform their deployments and configurations. diff --git a/docs/developer/go-style-guide.md b/docs/developer/go-style-guide.md index 4be183e443..57955c205c 100644 --- a/docs/developer/go-style-guide.md +++ b/docs/developer/go-style-guide.md @@ -359,7 +359,7 @@ func main() { Panics should be used in the following cases: -1. Unrecoverable errors. An unrecoverable error is when NKG cannot continue running or its behavior or internal state +1. Unrecoverable errors. An unrecoverable error is when NGF cannot continue running or its behavior or internal state cannot be guaranteed. One example of this is if an error occurs when adding the Kubernetes API types to the Scheme, or if an error occurs when marking a CLI flag as required. 2. Programming errors. A programming error is an error that is only possible if there was a programming mistake. For diff --git a/docs/developer/implementing-a-feature.md b/docs/developer/implementing-a-feature.md index fad70cabee..262a93ef7c 100644 --- a/docs/developer/implementing-a-feature.md +++ b/docs/developer/implementing-a-feature.md @@ -14,7 +14,7 @@ practices to ensure a successful feature development process. visibility. If any discussions regarding the issue occur outside the issue thread, provide a summary of the conversation as a comment on the issue itself. This ensures that all relevant information and discussions are consolidated in one place for easy reference. -3. **Fork the repo**: NKG follows a fork workflow, which you can learn more about in +3. **Fork the repo**: NGF follows a fork workflow, which you can learn more about in the [branching and workflow](/docs/developer/branching-and-workflow.md) documentation. 4. **Branch**: Create a branch following the [naming conventions](/docs/developer/branching-and-workflow.md#branch-naming-conventions). @@ -38,13 +38,13 @@ practices to ensure a successful feature development process. - **New Use Case:** If your feature introduces a new use case, add an example of how to use it in the [examples](/examples) directory. This example will help users understand how to leverage the new feature. > For security, a Docker image used in an example must be either managed by F5/NGINX or be an [official image](https://docs.docker.com/docker-hub/official_images/). - - **Installation Changes**: If your feature involves changes to the installation process of NKG, update + - **Installation Changes**: If your feature involves changes to the installation process of NGF, update the [installation](/docs/installation.md) documentation. - - **Helm Changes**: If your feature introduces or changes any values of the NKG Helm Chart, update the + - **Helm Changes**: If your feature introduces or changes any values of the NGF Helm Chart, update the [Helm README](/deploy/helm-chart/README.md). - **Command-line Changes**: If your feature introduces or changes a command-line flag or subcommand, update the [cli help](/docs/cli-help.md) documentation. - - **Other Documentation Updates**: For any other changes that affect the behavior, usage, or configuration of NKG, + - **Other Documentation Updates**: For any other changes that affect the behavior, usage, or configuration of NGF, review the existing documentation and update it as necessary. Ensure that the documentation remains accurate and up to date with the latest changes. 11. **Lint code**: See the [run the linter](/docs/developer/quickstart.md#run-the-linter) section of the quickstart @@ -53,8 +53,8 @@ practices to ensure a successful feature development process. [Update Generated Manifests](/docs/developer/quickstart.md#update-generated-manifests) sections of the quickstart guide for instructions. 13. **Open pull request**: Open a pull request targeting the `main` branch of - the [nginx-kubernetes-gateway](https://github.com/nginxinc/nginx-kubernetes-gateway/tree/main) repository. The - entire `nginx-kubernetes-gateway` group will be automatically requested for review. If you have a specific or + the [nginx-gateway-fabric](https://github.com/nginxinc/nginx-gateway-fabric/tree/main) repository. The + entire `nginx-gateway-fabric` group will be automatically requested for review. If you have a specific or different reviewer in mind, you can request them as well. Refer to the [pull request](/docs/developer/pull-request.md) documentation for expectations and guidelines. 14. **Obtain the necessary approvals**: Work with code reviewers to maintain the required number of approvals. diff --git a/docs/developer/logging-guidelines.md b/docs/developer/logging-guidelines.md index 10f3208e62..dfda385fdf 100644 --- a/docs/developer/logging-guidelines.md +++ b/docs/developer/logging-guidelines.md @@ -1,8 +1,8 @@ # Logging Guidelines -This document describes the logging guidelines for the control plane of NGINX Kubernetes Gateway (NKG). +This document describes the logging guidelines for the control plane of NGINX Gateway Fabric (NGF). -> The data plane logging is not covered here: such a concern is owned by NGINX developers, and NKG developers +> The data plane logging is not covered here: such a concern is owned by NGINX developers, and NGF developers > don't have control over it. ## Table of Contents @@ -50,11 +50,11 @@ understanding of what these guidelines intend to address: ### User Stories -There are two distinct personas of NKG: +There are two distinct personas of NGF: -- *User*, who uses NKG. For logging, the user persona maps to the cluster operator from +- *User*, who uses NGF. For logging, the user persona maps to the cluster operator from the [Gateway API personas](https://gateway-api.sigs.k8s.io/concepts/security-model/#roles-and-personas). -- *Developer*, who develops NKG. +- *Developer*, who develops NGF. Below are common user stories for both personas and also persona-specific stories. @@ -365,7 +365,7 @@ because the runtime adds context to that logger with the group, kind, namespace more key-value pairs. Note that the runtime creates that logger from the one we inject into it during the runtime initialization (see [External Libraries](#external-libraries)). Also note that logger is compatible with our logging guidelines. -[reconciler-logger]:https://github.com/nginxinc/nginx-kubernetes-gateway/blob/5547fe5472d1742a937c8adbbd399893ee30f9e1/internal/framework/controller/reconciler.go#L63 +[reconciler-logger]:https://github.com/nginxinc/nginx-gateway-fabric/blob/5547fe5472d1742a937c8adbbd399893ee30f9e1/internal/framework/controller/reconciler.go#L63 #### Unit Tests @@ -375,7 +375,7 @@ To initialize a logger, use `zap.New()` from [controller-runtime helpers][cr-zap ### External Libraries -There are two critical libraries for NKG that log: +There are two critical libraries for NGF that log: - [controller-runtime](https://github.com/kubernetes-sigs/controller-runtime). - The [log levels][cr-log-levels] are compatible with our project. @@ -389,17 +389,17 @@ There are two critical libraries for NKG that log: verbosity. However, errors are logged at the default verbosity like in [this line](https://github.com/kubernetes/client-go/blob/c5b1c13ccbedeb03c00ba162ef27566b0dfb512d/tools/record/event.go#L240). -[inject]:https://github.com/nginxinc/nginx-kubernetes-gateway/blob/9b3ae2c7c59f28213a7690e049d9996443dbd3fc/internal/mode/static/manager.go#L54 +[inject]:https://github.com/nginxinc/nginx-gateway-fabric/blob/9b3ae2c7c59f28213a7690e049d9996443dbd3fc/internal/mode/static/manager.go#L54 [cr-logging-guidelines]:https://github.com/kubernetes-sigs/controller-runtime/blob/b1d6919d3e12fa85a119dd9792bdfdc17bdf8c3b/TMP-LOGGING.md When adding a new library, evaluate if it does logging and how. If it is possible, configure the library logging to -be compatible with NKG logging. If not, document the logs in the user documentation for control plane logging, so that +be compatible with NGF logging. If not, document the logs in the user documentation for control plane logging, so that the users are prepared for them. ### Evolution -As NKG evolves, we might change the logging. For example: +As NGF evolves, we might change the logging. For example: - Change the meaning of levels. - Change the default key-value pairs and their representation. diff --git a/docs/developer/quickstart.md b/docs/developer/quickstart.md index 85e905a355..20d90f6a6a 100644 --- a/docs/developer/quickstart.md +++ b/docs/developer/quickstart.md @@ -1,6 +1,6 @@ # Development Quickstart -This guide will assist you in setting up your development environment for NGINX Kubernetes Gateway, covering the steps +This guide will assist you in setting up your development environment for NGINX Gateway Fabric, covering the steps to build, install, and execute tasks necessary for submitting pull requests. By following this guide, you'll have a fully prepared development environment that allows you to contribute to the project effectively. @@ -36,12 +36,12 @@ Follow these steps to set up your development environment. in the project root directory to install the git hooks. -2. [Fork the project repository](https://github.com/nginxinc/nginx-kubernetes-gateway/fork) +2. [Fork the project repository](https://github.com/nginxinc/nginx-gateway-fabric/fork) 3. Clone your repository, and install the project dependencies: ```shell - git clone https://github.com//nginx-kubernetes-gateway.git - cd nginx-kubernetes-gateway + git clone https://github.com//nginx-gateway-fabric.git + cd nginx-gateway-fabric ``` ```makefile @@ -62,13 +62,13 @@ This command will build the binary and output it to the `/build/.out` directory. ### Build the Images -To build the NGINX Kubernetes Gateway and NGINX container images from source run the following make command: +To build the NGINX Gateway Fabric and NGINX container images from source run the following make command: ```makefile make TAG=$(whoami) build-images ``` -This will build the docker images `nginx-kubernetes-gateway:` and `nginx-kubernetes-gateway/nginx:`. +This will build the docker images `nginx-gateway-fabric:` and `nginx-gateway-fabric/nginx:`. ## Deploy on Kind @@ -81,7 +81,7 @@ This will build the docker images `nginx-kubernetes-gateway:` and `ng 2. Load the previously built images onto your `kind` cluster: ```shell - kind load docker-image nginx-kubernetes-gateway:$(whoami) nginx-kubernetes-gateway/nginx:$(whoami) + kind load docker-image nginx-gateway-fabric:$(whoami) nginx-gateway-fabric/nginx:$(whoami) ``` 3. Install Gateway API Resources @@ -90,12 +90,12 @@ This will build the docker images `nginx-kubernetes-gateway:` and `ng kubectl apply -f https://github.com/kubernetes-sigs/gateway-api/releases/download/v0.8.0/standard-install.yaml ``` -4. Install NKG using your custom image and expose NKG with a NodePort Service: +4. Install NGF using your custom image and expose NGF with a NodePort Service: - To install with Helm (where your release name is `my-release`): ```shell - helm install my-release ./deploy/helm-chart --create-namespace --wait --set service.type=NodePort --set nginxGateway.image.repository=nginx-kubernetes-gateway --set nginxGateway.image.tag=$(whoami) --set nginxGateway.image.pullPolicy=Never --set nginx.image.repository=nginx-kubernetes-gateway/nginx --set nginx.image.tag=$(whoami) --set nginx.image.pullPolicy=Never -n nginx-gateway + helm install my-release ./deploy/helm-chart --create-namespace --wait --set service.type=NodePort --set nginxGateway.image.repository=nginx-gateway-fabric --set nginxGateway.image.tag=$(whoami) --set nginxGateway.image.pullPolicy=Never --set nginx.image.repository=nginx-gateway-fabric/nginx --set nginx.image.tag=$(whoami) --set nginx.image.pullPolicy=Never -n nginx-gateway ``` > For more information on helm configuration options see the Helm [README](/deploy/helm-chart/README.md). @@ -103,7 +103,7 @@ This will build the docker images `nginx-kubernetes-gateway:` and `ng - To install with manifests: ```shell - make generate-manifests HELM_TEMPLATE_COMMON_ARGS="--set nginxGateway.image.repository=nginx-kubernetes-gateway --set nginxGateway.image.tag=$(whoami) --set nginxGateway.image.pullPolicy=Never --set nginx.image.repository=nginx-kubernetes-gateway/nginx --set nginx.image.tag=$(whoami) --set nginx.image.pullPolicy=Never" + make generate-manifests HELM_TEMPLATE_COMMON_ARGS="--set nginxGateway.image.repository=nginx-gateway-fabric --set nginxGateway.image.tag=$(whoami) --set nginxGateway.image.pullPolicy=Never --set nginx.image.repository=nginx-gateway-fabric/nginx --set nginx.image.tag=$(whoami) --set nginx.image.pullPolicy=Never" kubectl apply -f deploy/manifests/crds kubectl apply -f deploy/manifests/nginx-gateway.yaml kubectl apply -f deploy/manifests/service/nodeport.yaml @@ -111,7 +111,7 @@ This will build the docker images `nginx-kubernetes-gateway:` and `ng ### Run Examples -To make sure NKG is running properly, try out the [examples](/examples). +To make sure NGF is running properly, try out the [examples](/examples). ## Run the Unit Tests diff --git a/docs/developer/release-process.md b/docs/developer/release-process.md index 5aa411ede3..6d099eeb01 100644 --- a/docs/developer/release-process.md +++ b/docs/developer/release-process.md @@ -1,17 +1,17 @@ # Release Process -This document outlines the release process for NGINX Kubernetes Gateway (NKG). +This document outlines the release process for NGINX Gateway Fabric (NGF). ## Versioning -NKG uses semantic versioning for its releases. For more information, see https://semver.org. +NGF uses semantic versioning for its releases. For more information, see https://semver.org. > Major version zero `(0.Y.Z)` is reserved for development, anything MAY change at any time. The public API is not stable. ## Release Planning and Development The features that will go into the next release are reflected in the -corresponding [milestone](https://github.com/nginxinc/nginx-kubernetes-gateway/milestones). Refer to +corresponding [milestone](https://github.com/nginxinc/nginx-gateway-fabric/milestones). Refer to the [Issue Lifecycle](/ISSUE_LIFECYCLE.md) document for information on issue creation and assignment to releases. ## Releasing @@ -34,9 +34,9 @@ To create a new release, follow these steps: 6. Prepare and merge a PR into the release branch to update the repo files for the release: 1. Update the Helm [Chart.yaml](../deploy/helm-chart/Chart.yaml): the `appVersion` to `X.Y.Z`, the icon and source URLs to point at `vX.Y.Z`, and bump the `version`. - 2. Adjust the `VERSION` variable in the [Makefile](../Makefile) and the `NKG_TAG` in the + 2. Adjust the `VERSION` variable in the [Makefile](../Makefile) and the `NGF_TAG` in the [conformance tests Makefile](../conformance/Makefile) to `X.Y.Z`. - 3. Update the tag of NKG container images used in the Helm [values.yaml](../deploy/helm-chart/values.yaml) file, the + 3. Update the tag of NGF container images used in the Helm [values.yaml](../deploy/helm-chart/values.yaml) file, the [provisioner manifest](../conformance/provisioner/provisioner.yaml), and all docs to `X.Y.Z`. 4. Ensure that the `imagePullPolicy` is `IfNotPresent` in the Helm [values.yaml](../deploy/helm-chart/values.yaml) file. @@ -45,13 +45,13 @@ To create a new release, follow these steps: 7. Modify any docs links that refer to `main` to instead refer to `vX.Y.Z`. 8. Update the [README](../README.md) to include information about the release. 9. Update the [changelog](../CHANGELOG.md). The changelog includes only important (from the user perspective) - changes to NKG. This is in contrast with the autogenerated full changelog, which is created in the next step. As + changes to NGF. This is in contrast with the autogenerated full changelog, which is created in the next step. As a starting point, copy the important features, bug fixes, and dependencies from the autogenerated draft of the full changelog. This draft can be found under - the [GitHub releases](https://github.com/nginxinc/nginx-kubernetes-gateway/releases) after the release branch is + the [GitHub releases](https://github.com/nginxinc/nginx-gateway-fabric/releases) after the release branch is created. Use the previous changelog entries for formatting and content guidance. 7. Create and push the release tag in the format `vX.Y.Z`. As a result, the CI/CD pipeline will: - - Build NKG container images with the release tag `X.Y.Z` and push it to the registry. + - Build NGF container images with the release tag `X.Y.Z` and push it to the registry. - Package and publish the Helm chart to the registry. - Create a GitHub release with an autogenerated changelog and attached release artifacts. 8. Prepare and merge a PR into the main branch to update the [README](../README.md) to include the information about the @@ -59,8 +59,8 @@ To create a new release, follow these steps: 9. Close the issue created in Step 1. 10. Submit the `conformance-profile.yaml` artifact from the release to the [Gateway API repo](https://github.com/kubernetes-sigs/gateway-api/tree/main/conformance/reports). - Create a fork of the repository - - Name the file `nginxinc-nginx-kubernetes-gateway.yaml` and set `gatewayAPIVersion` in the file to the - supported version by NKG. Also update the site source if necessary (see following example). + - Name the file `nginxinc-nginx-gateway-fabric.yaml` and set `gatewayAPIVersion` in the file to the + supported version by NGF. Also update the site source if necessary (see following example). - Open a PR. [Example](https://github.com/kubernetes-sigs/gateway-api/pull/2368) If it's your first time submitting a PR, you will need to sign a CLA using F5, Inc. as the organization. diff --git a/docs/gateway-api-compatibility.md b/docs/gateway-api-compatibility.md index 0c1f867bd6..488ca4ed61 100644 --- a/docs/gateway-api-compatibility.md +++ b/docs/gateway-api-compatibility.md @@ -1,6 +1,6 @@ # Gateway API Compatibility -This document describes which Gateway API resources NGINX Kubernetes Gateway supports and the extent of that support. +This document describes which Gateway API resources NGINX Gateway Fabric supports and the extent of that support. ## Summary @@ -27,10 +27,10 @@ resource field: - *Not supported*. The resource or field is not yet supported. It will become partially or fully supported in future releases. -> Note: it might be possible that NGINX Kubernetes Gateway will never support some resources +> Note: it might be possible that NGINX Gateway Fabric will never support some resources > and/or fields of the Gateway API. We will document these decisions on a case by case basis. > -> NGINX Kubernetes Gateway doesn't support any features from the experimental release channel. +> NGINX Gateway Fabric doesn't support any features from the experimental release channel. ## Resources @@ -47,7 +47,7 @@ the [Gateway API documentation](https://gateway-api.sigs.k8s.io/references/spec/ > - Extended: Not supported. > - Implementation-specific: Not supported. -NGINX Kubernetes Gateway supports only a single GatewayClass resource configured via `--gatewayclass` flag of +NGINX Gateway Fabric supports only a single GatewayClass resource configured via `--gatewayclass` flag of the [static-mode](./cli-help.md#static-mode) command. Fields: @@ -71,8 +71,8 @@ Fields: > - Extended: Not supported. > - Implementation-specific: Not supported. -NGINX Kubernetes Gateway supports only a single Gateway resource. The Gateway resource must reference NGINX Kubernetes -Gateway's corresponding GatewayClass. See [static-mode](./cli-help.md#static-mode) command for more info. +NGINX Gateway Fabric supports only a single Gateway resource. The Gateway resource must reference NGINX Gateway +Fabric's corresponding GatewayClass. See [static-mode](./cli-help.md#static-mode) command for more info. Fields: @@ -100,11 +100,11 @@ Fields: - `Accepted/False/UnsupportedValue`- custom reason for when a value of a field in a Gateway is invalid or not supported. - `Accepted/False/GatewayConflict`- custom reason for when the Gateway is ignored due to a conflicting Gateway. - NKG only supports a single Gateway. + NGF only supports a single Gateway. - `Programmed/True/Programmed` - `Programmed/False/Invalid` - `Programmed/False/GatewayConflict`- custom reason for when the Gateway is ignored due to a conflicting - Gateway. NKG only supports a single Gateway. + Gateway. NGF only supports a single Gateway. - `listeners` - `name` - supported. - `supportedKinds` - supported. @@ -117,7 +117,7 @@ Fields: - `Accepted/False/UnsupportedValue`- custom reason for when a value of a field in a Listener is invalid or not supported. - `Accepted/False/GatewayConflict` - custom reason for when the Gateway is ignored due to a conflicting - Gateway. NKG only supports a single Gateway. + Gateway. NGF only supports a single Gateway. - `Programmed/True/Programmed` - `Programmed/False/Invalid` - `ResolvedRefs/True/ResolvedRefs` @@ -148,10 +148,10 @@ Fields: - `filters` - `type` - supported. - `requestRedirect` - supported except for the experimental `path` field. If multiple filters - with `requestRedirect` are configured, NGINX Kubernetes Gateway will choose the first one and ignore the + with `requestRedirect` are configured, NGINX Gateway Fabric will choose the first one and ignore the rest. - `requestHeaderModifier` - supported. If multiple filters with `requestHeaderModifier` are configured, - NGINX Kubernetes Gateway will choose the first one and ignore the rest. + NGINX Gateway Fabric will choose the first one and ignore the rest. - `responseHeaderModifier`, `requestMirror`, `urlRewrite`, `extensionRef` - not supported. - `backendRefs` - partially supported. Backend ref `filters` are not supported. - `status` @@ -211,7 +211,7 @@ Fields: > Status: Not supported. -Custom policies will be NGINX Kubernetes Gateway-specific CRDs that will allow supporting features like timeouts, +Custom policies will be NGINX Gateway Fabric-specific CRDs that will allow supporting features like timeouts, load-balancing methods, authentication, etc. - important data-plane features that are not part of the Gateway API spec. While those CRDs are not part of the Gateway API, the mechanism of attaching them to Gateway API resources is part of diff --git a/docs/guides/README.md b/docs/guides/README.md index 2268d72087..6869f98838 100644 --- a/docs/guides/README.md +++ b/docs/guides/README.md @@ -1,14 +1,14 @@ # Guides -This directory contains guides for configuring NGINX Kubernetes Gateway for various use cases. +This directory contains guides for configuring NGINX Gateway Fabric for various use cases. ## Contents -- [Routing Traffic to Your Application](routing-traffic-to-your-app.md): How to use NGINX Kubernetes Gateway to route +- [Routing Traffic to Your Application](routing-traffic-to-your-app.md): How to use NGINX Gateway Fabric to route all Ingress traffic to your Kubernetes application. - [Routing to Applications Using HTTP Matching Conditions](advanced-routing.md): Guide on how to deploy multiple applications and HTTPRoutes with request conditions such as paths, methods, headers, and query parameters. - [Securing Traffic using Let's Encrypt and Cert-Manager](integrating-cert-manager.md): Shows how to secure - traffic from clients to NGINX Kubernetes Gateway with TLS using Let's Encrypt and Cert-Manager. -- [Using NGINX Kubernetes Gateway to Upgrade Applications without Downtime](upgrade-apps-without-downtime.md): - Explains how to use NGINX Kubernetes Gateway to upgrade applications without downtime. + traffic from clients to NGINX Gateway Fabric with TLS using Let's Encrypt and Cert-Manager. +- [Using NGINX Gateway Fabric to Upgrade Applications without Downtime](upgrade-apps-without-downtime.md): + Explains how to use NGINX Gateway Fabric to upgrade applications without downtime. diff --git a/docs/guides/advanced-routing.md b/docs/guides/advanced-routing.md index d930b7b6c0..6ddba9249b 100644 --- a/docs/guides/advanced-routing.md +++ b/docs/guides/advanced-routing.md @@ -16,9 +16,9 @@ and `coffee` applications share the same Gateway. ## Prerequisites -- [Install](/docs/installation.md) NGINX Kubernetes Gateway. -- [Expose NGINX Kubernetes Gateway](/docs/installation.md#expose-nginx-kubernetes-gateway) and save the public IP - address and port of NGINX Kubernetes Gateway into shell variables: +- [Install](/docs/installation.md) NGINX Gateway Fabric. +- [Expose NGINX Gateway Fabric](/docs/installation.md#expose-nginx-gateway-fabric) and save the public IP + address and port of NGINX Gateway Fabric into shell variables: ```text GW_IP=XXX.YYY.ZZZ.III @@ -36,7 +36,7 @@ and `coffee` applications share the same Gateway. Begin by deploying the `coffee-v1` and `coffee-v2` applications: ```shell -kubectl apply -f https://raw.githubusercontent.com/nginxinc/nginx-kubernetes-gateway/main/examples/advanced-routing/coffee.yaml +kubectl apply -f https://raw.githubusercontent.com/nginxinc/nginx-gateway-fabric/main/examples/advanced-routing/coffee.yaml ``` ### Deploy the Gateway API Resources for the Coffee Applications @@ -120,7 +120,7 @@ the `coffee-v2` Service: ### Send Traffic to Coffee -Using the external IP address and port for NGINX Kubernetes Gateway, we can send traffic to our coffee +Using the external IP address and port for NGINX Gateway Fabric, we can send traffic to our coffee applications. > **Note** @@ -166,7 +166,7 @@ have their own set of rules, but will still attach to the same Gateway listener ### Deploy the Tea Applications ```shell -kubectl apply -f https://raw.githubusercontent.com/nginxinc/nginx-kubernetes-gateway/main/examples/advanced-routing/tea.yaml +kubectl apply -f https://raw.githubusercontent.com/nginxinc/nginx-gateway-fabric/main/examples/advanced-routing/tea.yaml ``` ### Deploy the HTTPRoute for the Tea Services @@ -213,7 +213,7 @@ The properties of this HTTPRoute include: ### Send Traffic to Tea -Using the external IP address and port for NGINX Kubernetes Gateway, we can send traffic to our tea +Using the external IP address and port for NGINX Gateway Fabric, we can send traffic to our tea applications. > **Note** @@ -250,8 +250,8 @@ result in a `404 Not Found` response. If you have any issues while sending traffic, try the following to debug your configuration and setup: -- Make sure you set the shell variables $GW_IP and $GW_PORT to the public IP and port of the NGINX Kubernetes Gateway - Service. Instructions for finding those values are [here](/docs/installation.md#expose-nginx-kubernetes-gateway). +- Make sure you set the shell variables $GW_IP and $GW_PORT to the public IP and port of the NGINX Gateway Fabric + Service. Instructions for finding those values are [here](/docs/installation.md#expose-nginx-gateway-fabric). - Check the status of the Gateway: diff --git a/docs/guides/integrating-cert-manager.md b/docs/guides/integrating-cert-manager.md index 2ac6c41d00..543da76068 100644 --- a/docs/guides/integrating-cert-manager.md +++ b/docs/guides/integrating-cert-manager.md @@ -17,8 +17,8 @@ This guide will demonstrate how to: 1. Administrator access to a Kubernetes cluster. 2. [Helm](https://helm.sh) and [kubectl](https://kubernetes.io/docs/tasks/tools/#kubectl) must be installed locally. -3. Deploy NGINX Kubernetes Gateway (NKG) following the [deployment instructions](/docs/installation.md). -4. A DNS resolvable domain name is required. It must resolve to the public endpoint of the NKG deployment, and this +3. Deploy NGINX Gateway Fabric (NGF) following the [deployment instructions](/docs/installation.md). +4. A DNS resolvable domain name is required. It must resolve to the public endpoint of the NGF deployment, and this public endpoint must be an external IP address or alias accessible over the internet. The process here will depend on your DNS provider. This DNS name will need to be resolvable from the Let’s Encrypt servers, which may require that you wait for the record to propagate before it will work. @@ -39,7 +39,7 @@ At a high level, the process looks like this: annotation. 3. This kicks off the certificate issuance process – cert-manager contacts Let’s Encrypt to obtain a certificate, and Let’s Encrypt starts the ACME challenge. As part of this challenge, a temporary HTTPRoute resource is created by - cert-manager which directs the traffic through NKG to verify we control the domain name in the certificate request. + cert-manager which directs the traffic through NGF to verify we control the domain name in the certificate request. 4. Once the domain has been verified, the certificate is issued. Cert-manager stores the keypair in a Kubernetes secret that is referenced by the Gateway resource. As a result, NGINX is configured to terminate HTTPS traffic from clients using this signed keypair. @@ -49,7 +49,7 @@ At a high level, the process looks like this: 6. When the client connects to https://cafe.example.com/coffee, the request is routed to the coffee-app application and the communication is secured using the signed keypair contained in the cafe-secret Secret. 7. The certificate will be automatically renewed when it is close to expiry, the Secret will be updated using the new - Certificate, and NKG will dynamically update the keypair on the filesystem used by NGINX for HTTPS termination once + Certificate, and NGF will dynamically update the keypair on the filesystem used by NGINX for HTTPS termination once the Secret is updated. ## Details @@ -105,7 +105,7 @@ spec: privateKeySecretRef: # Secret resource that will be used to store the account's private key. name: issuer-account-key - # Add a single challenge solver, HTTP01 using NKG + # Add a single challenge solver, HTTP01 using NGF solvers: - http01: gatewayHTTPRoute: @@ -299,7 +299,7 @@ Request ID: e64c54a2ac253375ac085d48980f000a [ACME troubleshooting guide](https://cert-manager.io/docs/troubleshooting/acme/). - Note that for the HTTP01 Challenge to work using the Gateway resource, HTTPS redirect must not be configured. - The temporary HTTPRoute created by cert-manager routes the traffic between cert-manager and the Let's Encrypt server - through NKG. If the Challenge is not successful, it may be useful to inspect the NGINX logs to see the ACME + through NGF. If the Challenge is not successful, it may be useful to inspect the NGINX logs to see the ACME Challenge requests. You should see something like the following: ```shell diff --git a/docs/guides/routing-traffic-to-your-app.md b/docs/guides/routing-traffic-to-your-app.md index 5316aaff43..200e8dd826 100644 --- a/docs/guides/routing-traffic-to-your-app.md +++ b/docs/guides/routing-traffic-to-your-app.md @@ -1,14 +1,14 @@ # Routing Traffic to Your Application In this guide, you will learn how to route external traffic to your Kubernetes applications using the Gateway API and -NGINX Kubernetes Gateway. Whether you're managing a web application or a REST backend API, you can use NGINX Kubernetes -Gateway to expose your application outside the cluster. +NGINX Gateway Fabric. Whether you're managing a web application or a REST backend API, you can use NGINX Gateway +Fabric to expose your application outside the cluster. ## Prerequisites -- [Install](/docs/installation.md) NGINX Kubernetes Gateway. -- [Expose NGINX Kubernetes Gateway](/docs/installation.md#expose-nginx-kubernetes-gateway) and save the public IP - address and port of NGINX Kubernetes Gateway into shell variables: +- [Install](/docs/installation.md) NGINX Gateway Fabric. +- [Expose NGINX Gateway Fabric](/docs/installation.md#expose-nginx-gateway-fabric) and save the public IP + address and port of NGINX Gateway Fabric into shell variables: ```text GW_IP=XXX.YYY.ZZZ.III @@ -24,7 +24,7 @@ The application we are going to use in this guide is a simple coffee application With this architecture, the coffee application is not accessible outside the cluster. We want to expose this application on the hostname `cafe.example.com` so that clients outside the cluster can access it. -To do this, we will install NGINX Kubernetes Gateway and create two Gateway API resources: +To do this, we will install NGINX Gateway Fabric and create two Gateway API resources: a [Gateway](https://gateway-api.sigs.k8s.io/v1alpha2/references/spec/#gateway.networking.k8s.io/v1beta1.Gateway) and an [HTTPRoute](https://gateway-api.sigs.k8s.io/v1alpha2/references/spec/#gateway.networking.k8s.io/v1beta1.HTTPRoute). With these resources, we will configure a simple routing rule to match all HTTP traffic with the @@ -90,7 +90,7 @@ NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE service/coffee ClusterIP 10.96.75.77 80/TCP 77s ``` -## Application Architecture with NGINX Kubernetes Gateway +## Application Architecture with NGINX Gateway Fabric To route traffic to the coffee application, we will create a Gateway and HTTPRoute. The following diagram shows the configuration we'll be creating in the next step: @@ -104,12 +104,12 @@ To route HTTP traffic from the Gateway to the coffee Service, we need to create to the Gateway. This HTTPRoute will have a single routing rule that routes all traffic to the hostname `cafe.example.com` from the Gateway to the coffee Service. -Once NGINX Kubernetes Gateway processes the `cafe` Gateway and `coffee` HTTPRoute, it will configure its dataplane, NGINX, +Once NGINX Gateway Fabric processes the `cafe` Gateway and `coffee` HTTPRoute, it will configure its dataplane, NGINX, to route all HTTP requests to `cafe.example.com` to the Pods that the `coffee` Service targets: ![Traffic Flow](/docs/images/route-all-traffic-flow.png) -The coffee Service is omitted from the diagram above because the NGINX Kubernetes Gateway routes directly to the Pods +The coffee Service is omitted from the diagram above because the NGINX Gateway Fabric routes directly to the Pods that the coffee Service targets. > **Note** @@ -137,8 +137,8 @@ spec: EOF ``` -This Gateway is associated with the NGINX Kubernetes Gateway through the `gatewayClassName` field. The default -installation of NGINX Kubernetes Gateway creates a GatewayClass with the name `nginx`. NGINX Kubernetes Gateway will +This Gateway is associated with the NGINX Gateway Fabric through the `gatewayClassName` field. The default +installation of NGINX Gateway Fabric creates a GatewayClass with the name `nginx`. NGINX Gateway Fabric will only configure Gateways with a `gatewayClassName` of `nginx` unless you change the name via the `--gatewayclass` [command-line flag](/docs/cli-help.md#static-mode). @@ -193,12 +193,12 @@ Service using the `backendRef` field. ## Test the Configuration -To test the configuration, we will send a request to the public IP and port of NGINX Kubernetes Gateway that you saved +To test the configuration, we will send a request to the public IP and port of NGINX Gateway Fabric that you saved in the [prerequisites](#prerequisites) section and verify that the response comes from one of the coffee Pods. > **Note** > Your clients should be able to resolve the domain name `cafe.example.com` to the public IP of the -> NGINX Kubernetes Gateway. In this guide we will simulate that using curl's `--resolve` option. +> NGINX Gateway Fabric. In this guide we will simulate that using curl's `--resolve` option. First, let's send a request to the path `/`: @@ -259,8 +259,8 @@ You should receive a 404 Not Found error: If you have any issues while testing the configuration, try the following to debug your configuration and setup: -- Make sure you set the shell variables $GW_IP and $GW_PORT to the public IP and port of the NGINX Kubernetes Gateway - Service. Instructions for finding those values are [here](/docs/installation.md#expose-nginx-kubernetes-gateway). +- Make sure you set the shell variables $GW_IP and $GW_PORT to the public IP and port of the NGINX Gateway Fabric + Service. Instructions for finding those values are [here](/docs/installation.md#expose-nginx-gateway-fabric). - Check the status of the Gateway: @@ -394,7 +394,7 @@ If you have any issues while testing the configuration, try the following to deb > The entire configuration is not shown because it is subject to change. > Ellipses indicate that there's configuration not shown. -If your issue persists, [contact us](https://github.com/nginxinc/nginx-kubernetes-gateway#contacts). +If your issue persists, [contact us](https://github.com/nginxinc/nginx-gateway-fabric#contacts). ## Further Reading diff --git a/docs/guides/upgrade-apps-without-downtime.md b/docs/guides/upgrade-apps-without-downtime.md index e6c068d8ac..4287c3b1b2 100644 --- a/docs/guides/upgrade-apps-without-downtime.md +++ b/docs/guides/upgrade-apps-without-downtime.md @@ -1,21 +1,21 @@ -# Using NGINX Kubernetes Gateway to Upgrade Applications without Downtime +# Using NGINX Gateway Fabric to Upgrade Applications without Downtime -This guide explains how to use NGINX Kubernetes Gateway to upgrade applications without downtime. +This guide explains how to use NGINX Gateway Fabric to upgrade applications without downtime. Multiple upgrade methods are mentioned, assuming existing familiarity: this guide focuses primarily on how to use NGINX -Kubernetes Gateway to accomplish them. +Gateway Fabric to accomplish them. -> See the [Architecture document](/docs/architecture.md) to learn more about NGINX Kubernetes Gateway architecture. +> See the [Architecture document](/docs/architecture.md) to learn more about NGINX Gateway Fabric architecture. -## NGINX Kubernetes Gateway Functionality +## NGINX Gateway Fabric Functionality To understand the upgrade methods, you should be aware of the NGINX features that help prevent application downtime: graceful configuration reloads and upstream server updates. ### Graceful Configuration Reloads -If a relevant Gateway API or built-in Kubernetes resource is changed, NGINX Kubernetes Gateway will update NGINX by -regenerating the NGINX configuration. NGINX Kubernetes Gateway then sends a reload signal to the master NGINX process to +If a relevant Gateway API or built-in Kubernetes resource is changed, NGINX Gateway Fabric will update NGINX by +regenerating the NGINX configuration. NGINX Gateway Fabric then sends a reload signal to the master NGINX process to apply the new configuration. We call such an operation a reload, during which client requests are not dropped - which defines it as a graceful reload. @@ -27,7 +27,7 @@ This process is further explained in [NGINX's documentation](https://nginx.org/e Endpoints frequently change during application upgrades: Kubernetes creates Pods for the new version of an application and removes the old ones, creating and removing the respective Endpoints as well. -NGINX Kubernetes Gateway detects changes to Endpoints by watching their corresponding [EndpointSlices][endpoint-slices]. +NGINX Gateway Fabric detects changes to Endpoints by watching their corresponding [EndpointSlices][endpoint-slices]. [endpoint-slices]:https://kubernetes.io/docs/concepts/services-networking/endpoint-slices/ @@ -40,16 +40,16 @@ In NGINX configuration, a Service is represented as an [upstream][upstream], and Two common cases are adding and removing Endpoints: -- If an Endpoint is added, NGINX Kubernetes Gateway adds an upstream server to NGINX that corresponds to the Endpoint, +- If an Endpoint is added, NGINX Gateway Fabric adds an upstream server to NGINX that corresponds to the Endpoint, then reload NGINX. After that, NGINX will start proxying traffic to that Endpoint. -- If an Endpoint is removed, NGINX Kubernetes Gateway removes the corresponding upstream server from NGINX. After +- If an Endpoint is removed, NGINX Gateway Fabric removes the corresponding upstream server from NGINX. After a reload, NGINX will stop proxying traffic to it. However, it will finish proxying any pending requests to that server before switching to another Endpoint. As long as you have more than one ready Endpoint, the clients should not experience any downtime during upgrades. > It is good practice to configure a [Readiness probe][readiness-probe] in the Deployment so that a Pod can advertise -> when it is ready to receive traffic. Note that NGINX Kubernetes Gateway will not add any Endpoint to NGINX that is not +> when it is ready to receive traffic. Note that NGINX Gateway Fabric will not add any Endpoint to NGINX that is not > ready. [readiness-probe]:https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/ @@ -114,8 +114,8 @@ back to the green. There are two ways to switch the traffic: -- Update the Service selector to select the Pods of the blue version instead of the green. As a result, NGINX Kubernetes - Gateway removes the green upstream servers from NGINX and add the blue ones. With this approach, it is not +- Update the Service selector to select the Pods of the blue version instead of the green. As a result, NGINX Gateway + Fabric removes the green upstream servers from NGINX and add the blue ones. With this approach, it is not necessary to update the HTTPRoute. - Create a separate Service for the blue version and update the backend reference in the HTTPRoute to reference this Service, which leads to the same result as with the previous option. @@ -125,7 +125,7 @@ There are two ways to switch the traffic: To support canary releases, you can implement an approach with two Deployments behind the same Service (see [Canary deployment][canary] in the Kubernetes documentation). However, this approach lacks precision for defining the traffic split between the old and the canary version. You can greatly influence it by controlling the number of Pods -(for example, four Pods of the old version and one Pod of the canary). However, note that NGINX Kubernetes Gateway uses +(for example, four Pods of the old version and one Pod of the canary). However, note that NGINX Gateway Fabric uses [`random two least_conn`][random-method] load balancing method, which doesn't guarantee an exact split based on the number of Pods (80/20 in the given example). diff --git a/docs/images/cert-manager-gateway-workflow.png b/docs/images/cert-manager-gateway-workflow.png index ff248df02b..c4de785951 100644 Binary files a/docs/images/cert-manager-gateway-workflow.png and b/docs/images/cert-manager-gateway-workflow.png differ diff --git a/docs/images/ngf-high-level.png b/docs/images/ngf-high-level.png new file mode 100644 index 0000000000..6f2bef6f05 Binary files /dev/null and b/docs/images/ngf-high-level.png differ diff --git a/docs/images/ngf-pod.png b/docs/images/ngf-pod.png new file mode 100644 index 0000000000..d7b67e5b04 Binary files /dev/null and b/docs/images/ngf-pod.png differ diff --git a/docs/images/nkg-high-level.png b/docs/images/nkg-high-level.png deleted file mode 100644 index aa87f15975..0000000000 Binary files a/docs/images/nkg-high-level.png and /dev/null differ diff --git a/docs/images/nkg-pod.png b/docs/images/nkg-pod.png deleted file mode 100644 index 48e2e60a35..0000000000 Binary files a/docs/images/nkg-pod.png and /dev/null differ diff --git a/docs/images/src/advanced-routing.mermaid b/docs/images/src/advanced-routing.mermaid index e17679cc9a..dda2c78883 100644 --- a/docs/images/src/advanced-routing.mermaid +++ b/docs/images/src/advanced-routing.mermaid @@ -1,12 +1,12 @@ %% mermaid source for advanced-routing.png diagram graph LR users[Users] - nkgSvc["Public Endpoint\nfor\ncafe.example.com"] + ngfSvc["Public Endpoint\nfor\ncafe.example.com"] subgraph cluster [Kubernetes Cluster] subgraph clusterPadding [" "] subgraph clusterPadding2 [" "] subgraph gwNS [Namespace\nnginx-gateway] - nkgPod[Pod\nnginx-gateway] + ngfPod[Pod\nnginx-gateway] end end end @@ -19,15 +19,15 @@ graph LR end end end - nkgSvc --> nkgPod - nkgPod --/coffee--> coffeeV1Pod - nkgPod --/coffee\nheader: version=v2\nOR\n/coffee?TEST=v2--> coffeeV2Pod - nkgPod --GET /tea--> teaPod - nkgPod --POST /tea--> teaPostPod - users --> nkgSvc + ngfSvc --> ngfPod + ngfPod --/coffee--> coffeeV1Pod + ngfPod --/coffee\nheader: version=v2\nOR\n/coffee?TEST=v2--> coffeeV2Pod + ngfPod --GET /tea--> teaPod + ngfPod --POST /tea--> teaPostPod + users --> ngfSvc class clusterPadding,nsPadding,clusterPadding2 noBorder class gwNS,appNs namespace - class nkgSvc,nkgPod nginxNode + class ngfSvc,ngfPod nginxNode class coffeeV1Pod,coffeeV2Pod coffeeNode class teaPod,teaPostPod teaNode classDef noBorder stroke:none,fill:none diff --git a/docs/images/src/route-all-traffic-flow.mermaid b/docs/images/src/route-all-traffic-flow.mermaid index c136618128..f53d35ae54 100644 --- a/docs/images/src/route-all-traffic-flow.mermaid +++ b/docs/images/src/route-all-traffic-flow.mermaid @@ -1,14 +1,14 @@ %% mermaid source for route-all-traffic-flow.png diagram graph LR clients[Clients] - nkgSvc["Public IP Address\nfor\ncafe.example.com"] + ngfSvc["Public IP Address\nfor\ncafe.example.com"] subgraph cluster [Kubernetes Cluster] style cluster fill:#FFFFFF,stroke:#000000 subgraph clusterPadding [" "] subgraph clusterPadding2 [" "] subgraph gwNS [Namespace\nnginx-gateway] - nkgPod[Pod\nnginx-gateway] + ngfPod[Pod\nnginx-gateway] end end end @@ -23,13 +23,13 @@ graph LR - nkgSvc --> nkgPod - nkgPod --> coffeePod1 & coffeePod2 - clients --> nkgSvc + ngfSvc --> ngfPod + ngfPod --> coffeePod1 & coffeePod2 + clients --> ngfSvc class clusterPadding,nsPadding,clusterPadding2 noBorder class gwNS,appNs namespace - class nkgPod,nkgSvc nginxNode + class ngfPod,ngfSvc nginxNode class coffeePod1,coffeePod2 coffeeNode class clients clientNode diff --git a/docs/installation.md b/docs/installation.md index a6a0f4e7db..3eb7899da2 100644 --- a/docs/installation.md +++ b/docs/installation.md @@ -1,27 +1,35 @@ # Installation -This guide walks you through how to install NGINX Kubernetes Gateway on a generic Kubernetes cluster. +This guide walks you through how to install NGINX Gateway Fabric on a generic Kubernetes cluster. ## Prerequisites - [kubectl](https://kubernetes.io/docs/tasks/tools/) -## Deploy NGINX Kubernetes Gateway using Helm +## Deploy NGINX Gateway Fabric using Helm -To deploy NGINX Kubernetes Gateway using Helm, please follow the instructions on [this](/deploy/helm-chart/README.md) +To deploy NGINX Gateway Fabric using Helm, please follow the instructions on [this](/deploy/helm-chart/README.md) page. -## Deploy NGINX Kubernetes Gateway from Manifests +## Deploy NGINX Gateway Fabric from Manifests -> Note: By default, NGINX Kubernetes Gateway (NKG) will be installed into the nginx-gateway Namespace. -> It is possible to run NKG in a different Namespace, although you'll need to make modifications to the installation +> Note: By default, NGINX Gateway Fabric (NGF) will be installed into the nginx-gateway Namespace. +> It is possible to run NGF in a different Namespace, although you'll need to make modifications to the installation > manifests. -1. Clone the repo and change into the `nginx-kubernetes-gateway` directory: +1. Clone the repo and change into the `nginx-gateway-fabric` directory: ```shell - git clone https://github.com/nginxinc/nginx-kubernetes-gateway.git - cd nginx-kubernetes-gateway + git clone https://github.com/nginxinc/nginx-gateway-fabric.git + cd nginx-gateway-fabric + ``` + +1. Check out the latest tag (unless you are installing the `edge` version from the `main` branch): + + ```shell + git fetch --tags + latestTag=$(git describe --tags `git rev-list --tags --max-count=1`) + git checkout $latestTag ``` 1. Install the Gateway API resources from the standard channel (the CRDs and the validating webhook): @@ -30,19 +38,19 @@ page. kubectl apply -f https://github.com/kubernetes-sigs/gateway-api/releases/download/v0.8.0/standard-install.yaml ``` -1. Deploy the NGINX Kubernetes Gateway CRDs: +1. Deploy the NGINX Gateway Fabric CRDs: ```shell kubectl apply -f deploy/manifests/crds ``` -1. Deploy the NGINX Kubernetes Gateway: +1. Deploy the NGINX Gateway Fabric: ```shell kubectl apply -f deploy/manifests/nginx-gateway.yaml ``` -1. Confirm the NGINX Kubernetes Gateway is running in `nginx-gateway` namespace: +1. Confirm the NGINX Gateway Fabric is running in `nginx-gateway` namespace: ```shell kubectl get pods -n nginx-gateway @@ -53,13 +61,13 @@ page. nginx-gateway-5d4f4c7db7-xk2kq 2/2 Running 0 112s ``` -## Expose NGINX Kubernetes Gateway +## Expose NGINX Gateway Fabric -You can gain access to NGINX Kubernetes Gateway by creating a `NodePort` Service or a `LoadBalancer` Service. +You can gain access to NGINX Gateway Fabric by creating a `NodePort` Service or a `LoadBalancer` Service. > Important > -> The Service manifests expose NGINX Kubernetes Gateway on ports 80 and 443, which exposes any +> The Service manifests expose NGINX Gateway Fabric on ports 80 and 443, which exposes any > Gateway [Listener](https://gateway-api.sigs.k8s.io/references/spec/#gateway.networking.k8s.io/v1beta1.Listener) > configured for those ports. If you'd like to use different ports in your listeners, > update the manifests accordingly. @@ -72,7 +80,7 @@ Create a Service with type `NodePort`: kubectl apply -f deploy/manifests/service/nodeport.yaml ``` -A `NodePort` Service will randomly allocate one port on every Node of the cluster. To access NGINX Kubernetes Gateway, +A `NodePort` Service will randomly allocate one port on every Node of the cluster. To access NGINX Gateway Fabric, use an IP address of any Node in the cluster along with the allocated port. ### Create a LoadBalancer Service @@ -92,7 +100,7 @@ Create a Service with type `LoadBalancer` using the appropriate manifest for you kubectl get svc nginx-gateway -n nginx-gateway ``` - Use the public IP of the load balancer to access NGINX Kubernetes Gateway. + Use the public IP of the load balancer to access NGINX Gateway Fabric. - For AWS: @@ -114,11 +122,11 @@ Create a Service with type `LoadBalancer` using the appropriate manifest for you nslookup ``` -## Uninstalling NGINX Kubernetes Gateway +## Uninstalling NGINX Gateway Fabric -### Uninstall NGINX Kubernetes Gateway from Manifests +### Uninstall NGINX Gateway Fabric from Manifests -1. Uninstall the NGINX Kubernetes Gateway: +1. Uninstall the NGINX Gateway Fabric: ```shell kubectl delete -f deploy/manifests/nginx-gateway.yaml @@ -138,7 +146,7 @@ Create a Service with type `LoadBalancer` using the appropriate manifest for you kubectl delete -f https://github.com/kubernetes-sigs/gateway-api/releases/download/v0.8.0/standard-install.yaml ``` -### Uninstall NGINX Kubernetes Gateway using Helm +### Uninstall NGINX Gateway Fabric using Helm -To uninstall NGINX Kubernetes Gateway when the deployment method is Helm, please follow the instructions +To uninstall NGINX Gateway Fabric when the deployment method is Helm, please follow the instructions [here](/deploy/helm-chart/README.md#uninstalling-the-chart). diff --git a/docs/monitoring.md b/docs/monitoring.md index 1a47141a7c..34b7af8624 100644 --- a/docs/monitoring.md +++ b/docs/monitoring.md @@ -1,6 +1,6 @@ # Monitoring -The NGINX Kubernetes Gateway exposes a number of metrics in the [Prometheus](https://prometheus.io/) format. Those +The NGINX Gateway Fabric exposes a number of metrics in the [Prometheus](https://prometheus.io/) format. Those include NGINX and the controller-runtime metrics. These are delivered using a metrics server orchestrated by the controller-runtime package. Metrics are enabled by default, and are served via http on port `9113`. @@ -14,12 +14,12 @@ controller-runtime package. Metrics are enabled by default, and are served via h ### Using Helm -If you're using *Helm* to install the NGINX Kubernetes Gateway, set the `metrics.*` parameters to the required values +If you're using *Helm* to install the NGINX Gateway Fabric, set the `metrics.*` parameters to the required values for your environment. See the [Helm README](/deploy/helm-chart/README.md). ### Using Manifests -If you're using *Kubernetes manifests* to install NGINX Kubernetes Gateway, you can modify the +If you're using *Kubernetes manifests* to install NGINX Gateway Fabric, you can modify the [manifest](/deploy/manifests/nginx-gateway.yaml) to change the default metrics configuration: #### Disabling metrics @@ -27,15 +27,15 @@ If you're using *Kubernetes manifests* to install NGINX Kubernetes Gateway, you 1. Set the `-metrics-disable` [command-line argument](/docs/cli-help.md) to `true` and remove the other `-metrics-*` command line arguments. -2. Remove the metrics port entry from the list of the ports of the NGINX Kubernetes Gateway container in the template - of the NGINX Kubernetes Gateway Pod: +2. Remove the metrics port entry from the list of the ports of the NGINX Gateway Fabric container in the template + of the NGINX Gateway Fabric Pod: ```yaml - name: metrics containerPort: 9113 ``` -3. Remove the following annotations from the template of the NGINX Kubernetes Gateway Pod: +3. Remove the following annotations from the template of the NGINX Gateway Fabric Pod: ```yaml annotations: @@ -47,15 +47,15 @@ If you're using *Kubernetes manifests* to install NGINX Kubernetes Gateway, you 1. Set the `-metrics-port` [command-line argument](/docs/cli-help.md) to the required value. -2. Change the metrics port entry in the list of the ports of the NGINX Kubernetes Gateway container in the template - of the NGINX Kubernetes Gateway Pod: +2. Change the metrics port entry in the list of the ports of the NGINX Gateway Fabric container in the template + of the NGINX Gateway Fabric Pod: ```yaml - name: metrics containerPort: ``` -3. Change the following annotation in the template of the NGINX Kubernetes Gateway Pod: +3. Change the following annotation in the template of the NGINX Gateway Fabric Pod: ```yaml annotations: @@ -68,7 +68,7 @@ If you're using *Kubernetes manifests* to install NGINX Kubernetes Gateway, you 1. Set the `-metrics-secure-serving` [command-line argument](/docs/cli-help.md) to `true`. -2. Add the following annotation in the template of the NGINX Kubernetes Gateway Pod: +2. Add the following annotation in the template of the NGINX Gateway Fabric Pod: ```yaml annotations: @@ -79,21 +79,21 @@ If you're using *Kubernetes manifests* to install NGINX Kubernetes Gateway, you ## Available Metrics -NGINX Kubernetes Gateway exports the following metrics: +NGINX Gateway Fabric exports the following metrics: - NGINX metrics: - Exported by NGINX. Refer to the [NGINX Prometheus Exporter developer docs](https://github.com/nginxinc/nginx-prometheus-exporter#metrics-for-nginx-oss) - - These metrics have the namespace `nginx_kubernetes_gateway`, and include the label `class` which is set to the - Gateway class of NKG. For example, `nginx_kubernetes_gateway_connections_accepted{class="nginx"}`. + - These metrics have the namespace `nginx_gateway_fabric`, and include the label `class` which is set to the + Gateway class of NGF. For example, `nginx_gateway_fabric_connections_accepted{class="nginx"}`. -- NGINX Kubernetes Gateway metrics: +- NGINX Gateway Fabric metrics: - nginx_reloads_total. Number of successful NGINX reloads. - nginx_reload_errors_total. Number of unsuccessful NGINX reloads. - - nginx_stale_config. 1 means NKG failed to configure NGINX with the latest version of the configuration, which means + - nginx_stale_config. 1 means NGF failed to configure NGINX with the latest version of the configuration, which means NGINX is running with a stale version. - nginx_last_reload_milliseconds. Duration in milliseconds of NGINX reloads (histogram). - - These metrics have the namespace `nginx_kubernetes_gateway`, and include the label `class` which is set to the - Gateway class of NKG. For example, `nginx_kubernetes_gateway_nginx_reloads_total{class="nginx"}`. + - These metrics have the namespace `nginx_gateway_fabric`, and include the label `class` which is set to the + Gateway class of NGF. For example, `nginx_gateway_fabric_nginx_reloads_total{class="nginx"}`. - [controller-runtime](https://github.com/kubernetes-sigs/controller-runtime) metrics. These include: - Total number of reconciliation errors per controller diff --git a/docs/proposals/README.md b/docs/proposals/README.md index dcc0e5e0c3..c36104fb8b 100644 --- a/docs/proposals/README.md +++ b/docs/proposals/README.md @@ -1,7 +1,7 @@ # Enhancement Proposal This document describes the process of submitting an Enhancement Proposal. Enhancement Proposals are a way to propose, -communicate, and coordinate on enhancements for the NGINX Kubernetes Gateway. It is based off of +communicate, and coordinate on enhancements for the NGINX Gateway Fabric. It is based off of the [Gateway Enhancement Proposals][gep]. Their purpose is to: - Make changes and proposals discoverable (current and future). @@ -21,7 +21,7 @@ Enhancement Proposal. For example, here are some examples of requests that may n - Small changes (validation, documentation, fixups). It is always possible that the maintainers will determine a "small" change ends up requiring a Enhancement Proposal. -[discussion]: https://github.com/nginxinc/nginx-kubernetes-gateway/discussions +[discussion]: https://github.com/nginxinc/nginx-gateway-fabric/discussions ## Process @@ -41,7 +41,7 @@ Before creating an issue or Enhancement Proposal, [open an idea][idea] on GitHub you would like, any use cases you have, and other relevant details. Beginning with a discussion allows you to get feedback from the maintainers and the community before you invest time in writing an Enhancement Proposal. -[idea]: https://github.com/nginxinc/nginx-kubernetes-gateway/discussions/new?category=ideas +[idea]: https://github.com/nginxinc/nginx-gateway-fabric/discussions/new?category=ideas ### 2. Create an Issue @@ -51,7 +51,7 @@ maintainer will ask you to [open an issue][issue] on GitHub. Not every enhancement warrants an Enhancement Proposal. _If_ the enhancement issue requires an Enhancement Proposals, the maintainers will add the label `enhancement-proposal` to the issue. -[issue]: https://github.com/nginxinc/nginx-kubernetes-gateway/issues/new?assignees=&labels=proposal&projects=&template=enhancement.md&title= +[issue]: https://github.com/nginxinc/nginx-gateway-fabric/issues/new?assignees=&labels=proposal&projects=&template=enhancement.md&title= ### 3. Agree on the Goals (Provisional) diff --git a/docs/proposals/control-plane-config.md b/docs/proposals/control-plane-config.md index fc781776f5..8ae2bc07bd 100644 --- a/docs/proposals/control-plane-config.md +++ b/docs/proposals/control-plane-config.md @@ -1,17 +1,17 @@ # Enhancement Proposal-928: Control Plane Dynamic Configuration -- Issue: https://github.com/nginxinc/nginx-kubernetes-gateway/issues/928 +- Issue: https://github.com/nginxinc/nginx-gateway-fabric/issues/928 - Status: Completed ## Summary -This proposal contains the design for how to dynamically configure the NGINX Kubernetes Gateway (NKG) control plane. +This proposal contains the design for how to dynamically configure the NGINX Gateway Fabric (NGF) control plane. Through the use of a Custom Resource Definition (CRD), we'll be able to configure fields such as log level or telemetry at runtime. ## Goals -Define a CRD to dynamically configure mutable options for the NKG control plane. The only initial configurable +Define a CRD to dynamically configure mutable options for the NGF control plane. The only initial configurable option that we will support is log level. ## Non-Goals @@ -20,12 +20,12 @@ This proposal is *not* defining a way to dynamically configure the data plane. ## Introduction -The NKG control plane will evolve to have various user-configurable options. These could include, but are not +The NGF control plane will evolve to have various user-configurable options. These could include, but are not limited to, log level, tracing, or metrics. For the best user experience, these options should be able to be -changed at runtime, to avoid having to restart NKG. The first option that we will allow users to configure is the +changed at runtime, to avoid having to restart NGF. The first option that we will allow users to configure is the log level. The easiest and most intuitive way to implement a Kubernetes-native API is through a CRD. -In this doc, the term "user" will refer to the cluster operator (the person who installs and manages NKG). The +In this doc, the term "user" will refer to the cluster operator (the person who installs and manages NGF). The cluster operator owns this CRD resource. ## API, Customer Driven Interfaces, and User Experience @@ -51,10 +51,10 @@ status: ``` - The CRD would be Namespace-scoped, living in the same Namespace as the controller that it applies to. -- CRD is initialized and created when NKG is deployed. -- NKG references the name of this CRD via CLI arg (`--nginx-gateway-config-name`), and only watches this CRD. +- CRD is initialized and created when NGF is deployed. +- NGF references the name of this CRD via CLI arg (`--nginx-gateway-config-name`), and only watches this CRD. If the resource doesn't exist, then an error is logged and event created, and default values are used. -- If user deletes resource, NKG logs an error and creates an event. NKG will revert to default values. +- If user deletes resource, NGF logs an error and creates an event. NGF will revert to default values. This resource won't be referenced in the `parametersRef` of the GatewayClass, reserving that option for a data plane CRD. The control plane may end up supporting multiple GatewayClasses, so linking the control CRD to a @@ -68,10 +68,10 @@ For discussion with team: ## Use Cases -The high level use case for dynamically changing settings in the NKG control plane is to allow users to alter -behavior without the need for restarting NKG and experiencing downtime. +The high level use case for dynamically changing settings in the NGF control plane is to allow users to alter +behavior without the need for restarting NGF and experiencing downtime. -For the specific log level use case, users may be experiencing problems with NKG that require more information to +For the specific log level use case, users may be experiencing problems with NGF that require more information to diagnose. These problems could include: - Not seeing or processing Kubernetes resources that it should be. @@ -83,7 +83,7 @@ the state of the control plane without losing that state due to a required resta ## Testing -Unit tests can be leveraged for verifying that NKG properly watches and acts on CRD changes. These tests would +Unit tests can be leveraged for verifying that NGF properly watches and acts on CRD changes. These tests would be similar in behavior as the current unit tests that verify Gateway API resource processing. ## Security Considerations @@ -96,7 +96,7 @@ OpenAPI schema validation. If necessary as the CRD evolves, CEL or webhooks coul - Have a valid use case. The more fields we expose, the more attack vectors we create. We should only be exposing fields that are genuinely useful for a user to change dynamically. -RBAC via the Kubernetes API server will ensure that only authorized users can update the CRD containing NKG control +RBAC via the Kubernetes API server will ensure that only authorized users can update the CRD containing NGF control plane configuration. ## Alternatives @@ -106,7 +106,7 @@ A ConfigMap is another type of resource that a user can provide configuration op benefits of a CRD, specifically built-in schema validation, versioning, and conversion webhooks. - Custom API server -The NKG control plane could implement its own custom API server. However the overhead of implementing this, which +The NGF control plane could implement its own custom API server. However the overhead of implementing this, which would include auth, validation, endpoints, and so on, would not be worth it due to the fact that the Kubernetes API server already does all of these things for us. diff --git a/docs/resource-validation.md b/docs/resource-validation.md index da2647be67..26461e12c2 100644 --- a/docs/resource-validation.md +++ b/docs/resource-validation.md @@ -1,10 +1,10 @@ # Gateway API Resource Validation -This document describes how NGINX Kubernetes Gateway (NKG) validates Gateway API resources. +This document describes how NGINX Gateway Fabric (NGF) validates Gateway API resources. ## Overview -There are several reasons why NKG validates Gateway API resources: +There are several reasons why NGF validates Gateway API resources: - *Robustness*: to gracefully handle invalid resources. - *Security*: to prevent malicious input from propagating to the NGINX configuration. @@ -17,11 +17,11 @@ A Gateway API resource (a new resource or an update for the existing one) is val 1. OpenAPI schema validation by the Kubernetes API server. 2. Webhook validation by the Gateway API webhook. -3. Webhook validation by NKG. -4. Validation by NKG. +3. Webhook validation by NGF. +4. Validation by NGF. -To confirm that a resource is valid and accepted by NKG, check that the `Accepted` condition in the resource status -has the Status field set to `True`. For example, in a status of a valid HTTPRoute, if NKG accepts a parentRef, +To confirm that a resource is valid and accepted by NGF, check that the `Accepted` condition in the resource status +has the Status field set to `True`. For example, in a status of a valid HTTPRoute, if NGF accepts a parentRef, the status of that parentRef will look like this: ```text @@ -82,13 +82,13 @@ Error from server: error when creating "prod-gateway.yaml": admission webhook "v > Bypassing this validation step is possible if the webhook is not running in the cluster. > If this happens, Step 3 will reject the invalid values. -### Step 3 - Webhook validation by NKG +### Step 3 - Webhook validation by NGF The previous step relies on the Gateway API webhook running in the cluster. To ensure that the resources are validated -with the webhook validation rules, even if the webhook is not running, NKG performs the same validation. However, NKG +with the webhook validation rules, even if the webhook is not running, NGF performs the same validation. However, NGF performs the validation *after* the Kubernetes API server accepts the resource. -Below is an example of how NKG rejects an invalid resource (a Gateway resource with a TCP listener that configures a +Below is an example of how NGF rejects an invalid resource (a Gateway resource with a TCP listener that configures a hostname) with a Kubernetes event: ```shell @@ -100,18 +100,18 @@ kubectl describe gateway prod-gateway Events: Type Reason Age From Message ---- ------ ---- ---- ------- - Warning Rejected 6s nginx-kubernetes-gateway-nginx the resource failed webhook validation, however the Gateway API webhook failed to reject it with the error; make sure the webhook is installed and running correctly; validation error: spec.listeners[1].hostname: Forbidden: should be empty for protocol TCP; NKG will delete any existing NGINX configuration that corresponds to the resource + Warning Rejected 6s nginx-gateway-fabric-nginx the resource failed webhook validation, however the Gateway API webhook failed to reject it with the error; make sure the webhook is installed and running correctly; validation error: spec.listeners[1].hostname: Forbidden: should be empty for protocol TCP; NGF will delete any existing NGINX configuration that corresponds to the resource ``` > This validation step always runs and cannot be bypassed. -> NKG will ignore any resources that fail the webhook validation, like in the example above. -> If the resource previously existed, NKG will remove any existing NGINX configuration for that resource. +> NGF will ignore any resources that fail the webhook validation, like in the example above. +> If the resource previously existed, NGF will remove any existing NGINX configuration for that resource. -### Step 4 - Validation by NKG +### Step 4 - Validation by NGF This step catches the following cases of invalid values: -- Valid values from the Gateway API perspective but not supported by NKG yet. For example, a feature in an +- Valid values from the Gateway API perspective but not supported by NGF yet. For example, a feature in an HTTPRoute routing rule. Note: for the list of supported features, see [Gateway API Compatibility](gateway-api-compatibility.md) doc. - Valid values from the Gateway API perspective, but invalid for NGINX, because NGINX has stricter validation @@ -121,7 +121,7 @@ This step catches the following cases of invalid values: - Malicious values that inject unrestricted NGINX config into the NGINX configuration (similar to an SQL injection attack). -Below is an example of how NKG rejects an invalid resource. The validation error is reported via the status: +Below is an example of how NGF rejects an invalid resource. The validation error is reported via the status: ```shell kubectl describe httproutes.gateway.networking.k8s.io coffee diff --git a/docs/running-on-kind.md b/docs/running-on-kind.md index efa90c53e4..db181b3d15 100644 --- a/docs/running-on-kind.md +++ b/docs/running-on-kind.md @@ -1,6 +1,6 @@ # Running on `kind` -This guide walks you through how to run NGINX Kubernetes Gateway on a [kind](https://kind.sigs.k8s.io/) cluster. +This guide walks you through how to run NGINX Gateway Fabric on a [kind](https://kind.sigs.k8s.io/) cluster. ## Prerequisites @@ -17,11 +17,11 @@ command at the root of the repository: make create-kind-cluster ``` -## Deploy NGINX Kubernetes Gateway +## Deploy NGINX Gateway Fabric -Follow the [installation](./installation.md) instructions to deploy NGINX Kubernetes Gateway on your Kind cluster. +Follow the [installation](./installation.md) instructions to deploy NGINX Gateway Fabric on your Kind cluster. -## Access NGINX Kubernetes Gateway +## Access NGINX Gateway Fabric Forward local ports 8080 and 8443 to ports 80 and 443 of the nginx-gateway Pod: @@ -32,6 +32,6 @@ 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. -## Use NGINX Kubernetes Gateway +## Use NGINX Gateway Fabric To get started, follow the tutorials in the [examples](../examples) directory. diff --git a/examples/cafe-example/README.md b/examples/cafe-example/README.md index 28f60ea76f..fba0e30dba 100644 --- a/examples/cafe-example/README.md +++ b/examples/cafe-example/README.md @@ -1,21 +1,21 @@ # Example -In this example we deploy NGINX Kubernetes Gateway, a simple web application, and then configure NGINX Gateway to route -traffic to that application using HTTPRoute resources. +In this example we deploy NGINX Gateway Fabric, a simple web application, and then configure NGINX Gateway Fabric +to route traffic to that application using HTTPRoute resources. ## Running the Example -## 1. Deploy NGINX Kubernetes Gateway +## 1. Deploy NGINX Gateway Fabric -1. Follow the [installation instructions](/docs/installation.md) to deploy NGINX Kubernetes Gateway. +1. Follow the [installation instructions](/docs/installation.md) to deploy NGINX Gateway Fabric. -1. Save the public IP address of NGINX Kubernetes Gateway into a shell variable: +1. Save the public IP address of NGINX Gateway Fabric into a shell variable: ```text GW_IP=XXX.YYY.ZZZ.III ``` -1. Save the port of NGINX Kubernetes Gateway: +1. Save the port of NGINX Gateway Fabric: ```text GW_PORT= diff --git a/examples/cross-namespace-routing/README.md b/examples/cross-namespace-routing/README.md index 955e214801..d8c2ba2e41 100644 --- a/examples/cross-namespace-routing/README.md +++ b/examples/cross-namespace-routing/README.md @@ -5,17 +5,17 @@ in a different namespace from our HTTPRoutes. ## Running the Example -## 1. Deploy NGINX Kubernetes Gateway +## 1. Deploy NGINX Gateway Fabric -1. Follow the [installation instructions](/docs/installation.md) to deploy NGINX Kubernetes Gateway. +1. Follow the [installation instructions](/docs/installation.md) to deploy NGINX Gateway Fabric. -1. Save the public IP address of NGINX Kubernetes Gateway into a shell variable: +1. Save the public IP address of NGINX Gateway Fabric into a shell variable: ```text GW_IP=XXX.YYY.ZZZ.III ``` -1. Save the port of NGINX Kubernetes Gateway: +1. Save the port of NGINX Gateway Fabric: ```text GW_PORT= diff --git a/examples/http-header-filter/README.md b/examples/http-header-filter/README.md index 33b1687844..6bc85d0f31 100644 --- a/examples/http-header-filter/README.md +++ b/examples/http-header-filter/README.md @@ -1,21 +1,21 @@ # Example -In this example we will deploy NGINX Kubernetes Gateway and configure traffic routing for a simple echo server. +In this example we will deploy NGINX Gateway Fabric and configure traffic routing for a simple echo server. We will use HTTPRoute resources to route traffic to the echo server, using the `RequestHeaderModifier` filter to modify headers to the request. ## Running the Example -## 1. Deploy NGINX Kubernetes Gateway +## 1. Deploy NGINX Gateway Fabric -1. Follow the [installation instructions](/docs/installation.md) to deploy NGINX Kubernetes Gateway. +1. Follow the [installation instructions](/docs/installation.md) to deploy NGINX Gateway Fabric. -1. Save the public IP address of NGINX Kubernetes Gateway into a shell variable: +1. Save the public IP address of NGINX Gateway Fabric into a shell variable: ```text GW_IP=XXX.YYY.ZZZ.III ``` -1. Save the port of NGINX Kubernetes Gateway: +1. Save the port of NGINX Gateway Fabric: ```text GW_PORT= diff --git a/examples/https-termination/README.md b/examples/https-termination/README.md index c6d6a8b63f..1fc37dab3c 100644 --- a/examples/https-termination/README.md +++ b/examples/https-termination/README.md @@ -6,17 +6,17 @@ reference a Secret in a different Namespace. ## Running the Example -## 1. Deploy NGINX Kubernetes Gateway +## 1. Deploy NGINX Gateway Fabric -1. Follow the [installation instructions](/docs/installation.md) to deploy NGINX Kubernetes Gateway. +1. Follow the [installation instructions](/docs/installation.md) to deploy NGINX Gateway Fabric. -1. Save the public IP address of NGINX Kubernetes Gateway into a shell variable: +1. Save the public IP address of NGINX Gateway Fabric into a shell variable: ```text GW_IP=XXX.YYY.ZZZ.III ``` -1. Save the ports of NGINX Kubernetes Gateway: +1. Save the ports of NGINX Gateway Fabric: ```text GW_HTTP_PORT= diff --git a/examples/traffic-splitting/README.md b/examples/traffic-splitting/README.md index c84fcba5d5..02c3d2fef4 100644 --- a/examples/traffic-splitting/README.md +++ b/examples/traffic-splitting/README.md @@ -1,23 +1,23 @@ # Example -In this example we will deploy NGINX Kubernetes Gateway and configure traffic splitting for a simple cafe application. +In this example we will deploy NGINX Gateway Fabric and configure traffic splitting for a simple cafe application. We will use HTTPRoute resources to split traffic between two versions of the application -- `coffee-v1` and `coffee-v2`. ## Running the Example -## 1. Deploy NGINX Kubernetes Gateway +## 1. Deploy NGINX Gateway Fabric -1. Follow the [installation instructions](/docs/installation.md) to deploy NGINX Kubernetes Gateway. +1. Follow the [installation instructions](/docs/installation.md) to deploy NGINX Gateway Fabric. -1. Save the public IP address of NGINX Kubernetes Gateway into a shell variable: +1. Save the public IP address of NGINX Gateway Fabric into a shell variable: ```text GW_IP=XXX.YYY.ZZZ.III ``` -1. Save the port of NGINX Kubernetes Gateway: +1. Save the port of NGINX Gateway Fabric: ```text GW_PORT= diff --git a/go.mod b/go.mod index 16a2f4c0a0..656886bbe7 100644 --- a/go.mod +++ b/go.mod @@ -1,4 +1,4 @@ -module github.com/nginxinc/nginx-kubernetes-gateway +module github.com/nginxinc/nginx-gateway-fabric go 1.21.1 diff --git a/internal/framework/controller/controllerfakes/fake_getter.go b/internal/framework/controller/controllerfakes/fake_getter.go index 466622e1e1..47a344cdef 100644 --- a/internal/framework/controller/controllerfakes/fake_getter.go +++ b/internal/framework/controller/controllerfakes/fake_getter.go @@ -5,7 +5,7 @@ import ( "context" "sync" - "github.com/nginxinc/nginx-kubernetes-gateway/internal/framework/controller" + "github.com/nginxinc/nginx-gateway-fabric/internal/framework/controller" "k8s.io/apimachinery/pkg/types" "sigs.k8s.io/controller-runtime/pkg/client" ) diff --git a/internal/framework/controller/filter/filter.go b/internal/framework/controller/filter/filter.go index 86901fd809..7a9a1c2349 100644 --- a/internal/framework/controller/filter/filter.go +++ b/internal/framework/controller/filter/filter.go @@ -5,7 +5,7 @@ import ( "k8s.io/apimachinery/pkg/types" - "github.com/nginxinc/nginx-kubernetes-gateway/internal/framework/controller" + "github.com/nginxinc/nginx-gateway-fabric/internal/framework/controller" ) // CreateSingleResourceFilter creates a filter function that filters out all resources except the one diff --git a/internal/framework/controller/reconciler.go b/internal/framework/controller/reconciler.go index d3bc000583..7d7f84115f 100644 --- a/internal/framework/controller/reconciler.go +++ b/internal/framework/controller/reconciler.go @@ -11,7 +11,7 @@ import ( "sigs.k8s.io/controller-runtime/pkg/log" "sigs.k8s.io/controller-runtime/pkg/reconcile" - "github.com/nginxinc/nginx-kubernetes-gateway/internal/framework/events" + "github.com/nginxinc/nginx-gateway-fabric/internal/framework/events" ) // NamespacedNameFilterFunc is a function that returns true if the resource should be processed by the reconciler. diff --git a/internal/framework/controller/reconciler_test.go b/internal/framework/controller/reconciler_test.go index 103abd7a7a..120a40a2ee 100644 --- a/internal/framework/controller/reconciler_test.go +++ b/internal/framework/controller/reconciler_test.go @@ -14,9 +14,9 @@ import ( "sigs.k8s.io/controller-runtime/pkg/reconcile" "sigs.k8s.io/gateway-api/apis/v1beta1" - "github.com/nginxinc/nginx-kubernetes-gateway/internal/framework/controller" - "github.com/nginxinc/nginx-kubernetes-gateway/internal/framework/controller/controllerfakes" - "github.com/nginxinc/nginx-kubernetes-gateway/internal/framework/events" + "github.com/nginxinc/nginx-gateway-fabric/internal/framework/controller" + "github.com/nginxinc/nginx-gateway-fabric/internal/framework/controller/controllerfakes" + "github.com/nginxinc/nginx-gateway-fabric/internal/framework/events" ) type getFunc func(ctx context.Context, key client.ObjectKey, obj client.Object, opts ...client.GetOption) error diff --git a/internal/framework/controller/register.go b/internal/framework/controller/register.go index a101e66c65..b48fd2258a 100644 --- a/internal/framework/controller/register.go +++ b/internal/framework/controller/register.go @@ -10,7 +10,7 @@ import ( "sigs.k8s.io/controller-runtime/pkg/manager" "sigs.k8s.io/controller-runtime/pkg/predicate" - "github.com/nginxinc/nginx-kubernetes-gateway/internal/framework/controller/index" + "github.com/nginxinc/nginx-gateway-fabric/internal/framework/controller/index" ) const ( diff --git a/internal/framework/controller/register_test.go b/internal/framework/controller/register_test.go index 97faa26ae0..ea55464088 100644 --- a/internal/framework/controller/register_test.go +++ b/internal/framework/controller/register_test.go @@ -16,10 +16,10 @@ import ( "sigs.k8s.io/controller-runtime/pkg/log/zap" "sigs.k8s.io/gateway-api/apis/v1beta1" - "github.com/nginxinc/nginx-kubernetes-gateway/internal/framework/controller" - "github.com/nginxinc/nginx-kubernetes-gateway/internal/framework/controller/controllerfakes" - "github.com/nginxinc/nginx-kubernetes-gateway/internal/framework/controller/index" - "github.com/nginxinc/nginx-kubernetes-gateway/internal/framework/controller/predicate" + "github.com/nginxinc/nginx-gateway-fabric/internal/framework/controller" + "github.com/nginxinc/nginx-gateway-fabric/internal/framework/controller/controllerfakes" + "github.com/nginxinc/nginx-gateway-fabric/internal/framework/controller/index" + "github.com/nginxinc/nginx-gateway-fabric/internal/framework/controller/predicate" ) func TestRegister(t *testing.T) { diff --git a/internal/framework/events/eventsfakes/fake_event_handler.go b/internal/framework/events/eventsfakes/fake_event_handler.go index bfb6ab896b..0b0df59437 100644 --- a/internal/framework/events/eventsfakes/fake_event_handler.go +++ b/internal/framework/events/eventsfakes/fake_event_handler.go @@ -5,7 +5,7 @@ import ( "context" "sync" - "github.com/nginxinc/nginx-kubernetes-gateway/internal/framework/events" + "github.com/nginxinc/nginx-gateway-fabric/internal/framework/events" ) type FakeEventHandler struct { diff --git a/internal/framework/events/eventsfakes/fake_first_event_batch_preparer.go b/internal/framework/events/eventsfakes/fake_first_event_batch_preparer.go index 874543c64b..66f02b6455 100644 --- a/internal/framework/events/eventsfakes/fake_first_event_batch_preparer.go +++ b/internal/framework/events/eventsfakes/fake_first_event_batch_preparer.go @@ -5,7 +5,7 @@ import ( "context" "sync" - "github.com/nginxinc/nginx-kubernetes-gateway/internal/framework/events" + "github.com/nginxinc/nginx-gateway-fabric/internal/framework/events" ) type FakeFirstEventBatchPreparer struct { diff --git a/internal/framework/events/eventsfakes/fake_reader.go b/internal/framework/events/eventsfakes/fake_reader.go index 1674faf3cc..7e6c2d4fa2 100644 --- a/internal/framework/events/eventsfakes/fake_reader.go +++ b/internal/framework/events/eventsfakes/fake_reader.go @@ -5,7 +5,7 @@ import ( "context" "sync" - "github.com/nginxinc/nginx-kubernetes-gateway/internal/framework/events" + "github.com/nginxinc/nginx-gateway-fabric/internal/framework/events" "k8s.io/apimachinery/pkg/types" "sigs.k8s.io/controller-runtime/pkg/client" ) diff --git a/internal/framework/events/first_eventbatch_preparer_test.go b/internal/framework/events/first_eventbatch_preparer_test.go index 69972d8105..5450325528 100644 --- a/internal/framework/events/first_eventbatch_preparer_test.go +++ b/internal/framework/events/first_eventbatch_preparer_test.go @@ -16,8 +16,8 @@ import ( "sigs.k8s.io/controller-runtime/pkg/client" "sigs.k8s.io/gateway-api/apis/v1beta1" - "github.com/nginxinc/nginx-kubernetes-gateway/internal/framework/events" - "github.com/nginxinc/nginx-kubernetes-gateway/internal/framework/events/eventsfakes" + "github.com/nginxinc/nginx-gateway-fabric/internal/framework/events" + "github.com/nginxinc/nginx-gateway-fabric/internal/framework/events/eventsfakes" ) var _ = Describe("FirstEventBatchPreparer", func() { diff --git a/internal/framework/events/loop.go b/internal/framework/events/loop.go index ee330080f8..a7e8055047 100644 --- a/internal/framework/events/loop.go +++ b/internal/framework/events/loop.go @@ -21,7 +21,7 @@ import ( // (2) A reload can have side-effects for the data plane traffic. // FIXME(pleshakov): better document the side effects and how to prevent and mitigate them. // So when the EventLoop have 100 saved events, it is better to process them at once rather than one by one. -// https://github.com/nginxinc/nginx-kubernetes-gateway/issues/551 +// https://github.com/nginxinc/nginx-gateway-fabric/issues/551 type EventLoop struct { handler EventHandler preparer FirstEventBatchPreparer diff --git a/internal/framework/events/loop_test.go b/internal/framework/events/loop_test.go index 5fbdf7277d..ea53d9ade3 100644 --- a/internal/framework/events/loop_test.go +++ b/internal/framework/events/loop_test.go @@ -8,8 +8,8 @@ import ( . "github.com/onsi/gomega" "sigs.k8s.io/controller-runtime/pkg/log/zap" - "github.com/nginxinc/nginx-kubernetes-gateway/internal/framework/events" - "github.com/nginxinc/nginx-kubernetes-gateway/internal/framework/events/eventsfakes" + "github.com/nginxinc/nginx-gateway-fabric/internal/framework/events" + "github.com/nginxinc/nginx-gateway-fabric/internal/framework/events/eventsfakes" ) var _ = Describe("EventLoop", func() { diff --git a/internal/framework/status/conditions.go b/internal/framework/status/conditions.go index ba958bc63c..a3dd38bfda 100644 --- a/internal/framework/status/conditions.go +++ b/internal/framework/status/conditions.go @@ -3,7 +3,7 @@ package status import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "github.com/nginxinc/nginx-kubernetes-gateway/internal/framework/conditions" + "github.com/nginxinc/nginx-gateway-fabric/internal/framework/conditions" ) func convertConditions( diff --git a/internal/framework/status/conditions_test.go b/internal/framework/status/conditions_test.go index eb247a9479..0685508bb1 100644 --- a/internal/framework/status/conditions_test.go +++ b/internal/framework/status/conditions_test.go @@ -7,8 +7,8 @@ import ( . "github.com/onsi/gomega" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "github.com/nginxinc/nginx-kubernetes-gateway/internal/framework/conditions" - "github.com/nginxinc/nginx-kubernetes-gateway/internal/framework/helpers" + "github.com/nginxinc/nginx-gateway-fabric/internal/framework/conditions" + "github.com/nginxinc/nginx-gateway-fabric/internal/framework/helpers" ) func CreateTestConditions(condType string) []conditions.Condition { diff --git a/internal/framework/status/gateway.go b/internal/framework/status/gateway.go index 4e2c26d2b5..366aaa920b 100644 --- a/internal/framework/status/gateway.go +++ b/internal/framework/status/gateway.go @@ -16,7 +16,7 @@ func prepareGatewayStatus( listenerStatuses := make([]v1beta1.ListenerStatus, 0, len(gatewayStatus.ListenerStatuses)) // FIXME(pleshakov) Maintain the order from the Gateway resource - // https://github.com/nginxinc/nginx-kubernetes-gateway/issues/689 + // https://github.com/nginxinc/nginx-gateway-fabric/issues/689 names := make([]string, 0, len(gatewayStatus.ListenerStatuses)) for name := range gatewayStatus.ListenerStatuses { names = append(names, name) diff --git a/internal/framework/status/gateway_test.go b/internal/framework/status/gateway_test.go index 4af1ad4659..b01832915d 100644 --- a/internal/framework/status/gateway_test.go +++ b/internal/framework/status/gateway_test.go @@ -8,7 +8,7 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "sigs.k8s.io/gateway-api/apis/v1beta1" - "github.com/nginxinc/nginx-kubernetes-gateway/internal/framework/helpers" + "github.com/nginxinc/nginx-gateway-fabric/internal/framework/helpers" ) func TestPrepareGatewayStatus(t *testing.T) { diff --git a/internal/framework/status/gatewayclass_test.go b/internal/framework/status/gatewayclass_test.go index 65b23f85f2..9918c603c4 100644 --- a/internal/framework/status/gatewayclass_test.go +++ b/internal/framework/status/gatewayclass_test.go @@ -8,7 +8,7 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "sigs.k8s.io/gateway-api/apis/v1beta1" - "github.com/nginxinc/nginx-kubernetes-gateway/internal/framework/helpers" + "github.com/nginxinc/nginx-gateway-fabric/internal/framework/helpers" ) func TestPrepareGatewayClassStatus(t *testing.T) { diff --git a/internal/framework/status/httproute_test.go b/internal/framework/status/httproute_test.go index b0363e6ceb..deafbde2d6 100644 --- a/internal/framework/status/httproute_test.go +++ b/internal/framework/status/httproute_test.go @@ -9,7 +9,7 @@ import ( "k8s.io/apimachinery/pkg/types" "sigs.k8s.io/gateway-api/apis/v1beta1" - "github.com/nginxinc/nginx-kubernetes-gateway/internal/framework/helpers" + "github.com/nginxinc/nginx-gateway-fabric/internal/framework/helpers" ) func TestPrepareHTTPRouteStatus(t *testing.T) { diff --git a/internal/framework/status/statuses.go b/internal/framework/status/statuses.go index 9da49c4b9f..89284f1661 100644 --- a/internal/framework/status/statuses.go +++ b/internal/framework/status/statuses.go @@ -4,8 +4,8 @@ import ( "k8s.io/apimachinery/pkg/types" "sigs.k8s.io/gateway-api/apis/v1beta1" - nkgAPI "github.com/nginxinc/nginx-kubernetes-gateway/apis/v1alpha1" - "github.com/nginxinc/nginx-kubernetes-gateway/internal/framework/conditions" + ngfAPI "github.com/nginxinc/nginx-gateway-fabric/apis/v1alpha1" + "github.com/nginxinc/nginx-gateway-fabric/internal/framework/conditions" ) // Status is the status of one or more Kubernetes resources that the StatusUpdater will update. @@ -36,7 +36,7 @@ type NginxGatewayStatus struct { } func (n *NginxGatewayStatus) APIGroup() string { - return nkgAPI.GroupName + return ngfAPI.GroupName } // ListenerStatuses holds the statuses of listeners where the key is the name of a listener in the Gateway resource. diff --git a/internal/framework/status/statusfakes/fake_clock.go b/internal/framework/status/statusfakes/fake_clock.go index a1a33166c2..5b51ea34e9 100644 --- a/internal/framework/status/statusfakes/fake_clock.go +++ b/internal/framework/status/statusfakes/fake_clock.go @@ -4,7 +4,7 @@ package statusfakes import ( "sync" - "github.com/nginxinc/nginx-kubernetes-gateway/internal/framework/status" + "github.com/nginxinc/nginx-gateway-fabric/internal/framework/status" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" ) diff --git a/internal/framework/status/statusfakes/fake_updater.go b/internal/framework/status/statusfakes/fake_updater.go index 423b4f6584..6fcc488c62 100644 --- a/internal/framework/status/statusfakes/fake_updater.go +++ b/internal/framework/status/statusfakes/fake_updater.go @@ -5,7 +5,7 @@ import ( "context" "sync" - "github.com/nginxinc/nginx-kubernetes-gateway/internal/framework/status" + "github.com/nginxinc/nginx-gateway-fabric/internal/framework/status" ) type FakeUpdater struct { diff --git a/internal/framework/status/updater.go b/internal/framework/status/updater.go index c11dc7a8a1..7ed2c08bd6 100644 --- a/internal/framework/status/updater.go +++ b/internal/framework/status/updater.go @@ -11,7 +11,7 @@ import ( "sigs.k8s.io/controller-runtime/pkg/client" "sigs.k8s.io/gateway-api/apis/v1beta1" - nkgAPI "github.com/nginxinc/nginx-kubernetes-gateway/apis/v1alpha1" + ngfAPI "github.com/nginxinc/nginx-gateway-fabric/apis/v1alpha1" ) //go:generate go run github.com/maxbrunsfeld/counterfeiter/v6 . Updater @@ -76,7 +76,7 @@ type UpdaterConfig struct { // Gateway is removed, our Gateway will not restore the status until the EventLoop invokes the StatusUpdater as a // result of processing some other new change to a resource(s). // FIXME(pleshakov): Make updater production ready -// https://github.com/nginxinc/nginx-kubernetes-gateway/issues/691 +// https://github.com/nginxinc/nginx-gateway-fabric/issues/691 // UpdaterImpl needs to be modified to support new resources. Consider making UpdaterImpl extendable, so that it // goes along the Open-closed principle. @@ -128,7 +128,7 @@ func NewUpdater(cfg UpdaterConfig) *UpdaterImpl { func (upd *UpdaterImpl) Update(ctx context.Context, status Status) { // FIXME(pleshakov) Merge the new Conditions in the status with the existing Conditions - // https://github.com/nginxinc/nginx-kubernetes-gateway/issues/558 + // https://github.com/nginxinc/nginx-gateway-fabric/issues/558 defer upd.lock.Unlock() upd.lock.Lock() @@ -154,9 +154,9 @@ func (upd *UpdaterImpl) updateNginxGateway(ctx context.Context, status *NginxGat upd.cfg.Logger.Info("Updating Nginx Gateway status") if status != nil { - upd.writeStatuses(ctx, status.NsName, &nkgAPI.NginxGateway{}, func(object client.Object) { - ng := object.(*nkgAPI.NginxGateway) - ng.Status = nkgAPI.NginxGatewayStatus{ + upd.writeStatuses(ctx, status.NsName, &ngfAPI.NginxGateway{}, func(object client.Object) { + ng := object.(*ngfAPI.NginxGateway) + ng.Status = ngfAPI.NginxGatewayStatus{ Conditions: convertConditions( status.Conditions, status.ObservedGeneration, diff --git a/internal/framework/status/updater_test.go b/internal/framework/status/updater_test.go index c3ee8876e9..05b6af4ba6 100644 --- a/internal/framework/status/updater_test.go +++ b/internal/framework/status/updater_test.go @@ -15,11 +15,11 @@ import ( "sigs.k8s.io/controller-runtime/pkg/log/zap" "sigs.k8s.io/gateway-api/apis/v1beta1" - nkgAPI "github.com/nginxinc/nginx-kubernetes-gateway/apis/v1alpha1" - "github.com/nginxinc/nginx-kubernetes-gateway/internal/framework/helpers" - "github.com/nginxinc/nginx-kubernetes-gateway/internal/framework/status" - "github.com/nginxinc/nginx-kubernetes-gateway/internal/framework/status/statusfakes" - staticConds "github.com/nginxinc/nginx-kubernetes-gateway/internal/mode/static/state/conditions" + ngfAPI "github.com/nginxinc/nginx-gateway-fabric/apis/v1alpha1" + "github.com/nginxinc/nginx-gateway-fabric/internal/framework/helpers" + "github.com/nginxinc/nginx-gateway-fabric/internal/framework/status" + "github.com/nginxinc/nginx-gateway-fabric/internal/framework/status/statusfakes" + staticConds "github.com/nginxinc/nginx-gateway-fabric/internal/mode/static/state/conditions" ) type unsupportedStatus struct{} @@ -42,7 +42,7 @@ var _ = Describe("Updater", func() { scheme := runtime.NewScheme() Expect(v1beta1.AddToScheme(scheme)).Should(Succeed()) - Expect(nkgAPI.AddToScheme(scheme)).Should(Succeed()) + Expect(ngfAPI.AddToScheme(scheme)).Should(Succeed()) client = fake.NewClientBuilder(). WithScheme(scheme). @@ -50,7 +50,7 @@ var _ = Describe("Updater", func() { &v1beta1.GatewayClass{}, &v1beta1.Gateway{}, &v1beta1.HTTPRoute{}, - &nkgAPI.NginxGateway{}, + &ngfAPI.NginxGateway{}, ). Build() @@ -72,7 +72,7 @@ var _ = Describe("Updater", func() { gc *v1beta1.GatewayClass gw, ignoredGw *v1beta1.Gateway hr *v1beta1.HTTPRoute - ng *nkgAPI.NginxGateway + ng *ngfAPI.NginxGateway ipAddrType = v1beta1.IPAddressType addr = v1beta1.GatewayStatusAddress{ Type: &ipAddrType, @@ -232,8 +232,8 @@ var _ = Describe("Updater", func() { } } - createExpectedNGWithGeneration = func(gen int64) *nkgAPI.NginxGateway { - return &nkgAPI.NginxGateway{ + createExpectedNGWithGeneration = func(gen int64) *ngfAPI.NginxGateway { + return &ngfAPI.NginxGateway{ ObjectMeta: metav1.ObjectMeta{ Namespace: "nginx-gateway", Name: "nginx-gateway-config", @@ -242,7 +242,7 @@ var _ = Describe("Updater", func() { Kind: "NginxGateway", APIVersion: "gateway.nginx.org/v1alpha1", }, - Status: nkgAPI.NginxGatewayStatus{ + Status: ngfAPI.NginxGatewayStatus{ Conditions: status.CreateExpectedAPIConditions("Test", gen, fakeClockTime), }, } @@ -299,7 +299,7 @@ var _ = Describe("Updater", func() { APIVersion: "gateway.networking.k8s.io/v1beta1", }, } - ng = &nkgAPI.NginxGateway{ + ng = &ngfAPI.NginxGateway{ ObjectMeta: metav1.ObjectMeta{ Namespace: "nginx-gateway", Name: "nginx-gateway-config", @@ -383,7 +383,7 @@ var _ = Describe("Updater", func() { }) It("should have the updated status of NginxGateway in the API server", func() { - latestNG := &nkgAPI.NginxGateway{} + latestNG := &ngfAPI.NginxGateway{} expectedNG := createExpectedNGWithGeneration(1) err := client.Get( @@ -497,7 +497,7 @@ var _ = Describe("Updater", func() { }) It("should not have the updated status of the Nginx Gateway resource in the API server", func() { - latestNG := &nkgAPI.NginxGateway{} + latestNG := &ngfAPI.NginxGateway{} expectedNG := createExpectedNGWithGeneration(1) err := client.Get( @@ -534,7 +534,7 @@ var _ = Describe("Updater", func() { }) It("should have the updated status of the Nginx Gateway resource in the API server", func() { - latestNG := &nkgAPI.NginxGateway{} + latestNG := &ngfAPI.NginxGateway{} expectedNG := createExpectedNGWithGeneration(2) err := client.Get( @@ -577,7 +577,7 @@ var _ = Describe("Updater", func() { updater.Update(context.Background(), createNGStatus(3)) }) It("should have the updated status of Nginx Gateway in the API server", func() { - latestNG := &nkgAPI.NginxGateway{} + latestNG := &ngfAPI.NginxGateway{} expectedNG := createExpectedNGWithGeneration(3) err := client.Get( diff --git a/internal/mode/provisioner/doc.go b/internal/mode/provisioner/doc.go index 689924d87c..589ab68527 100644 --- a/internal/mode/provisioner/doc.go +++ b/internal/mode/provisioner/doc.go @@ -1,6 +1,6 @@ /* -Package provisioner contains all the packages that relate to the provisioner-mode implementation of NKG. -Provisioner-mode implements data plane provisioning for NGINX Kubernetes Gateway (NKG): it creates an NKG static mode +Package provisioner contains all the packages that relate to the provisioner-mode implementation of NGF. +Provisioner-mode implements data plane provisioning for NGINX Gateway Fabric (NGF): it creates an NGF static mode Deployment for each Gateway that belongs to the provisioner GatewayClass. */ package provisioner diff --git a/internal/mode/provisioner/handler.go b/internal/mode/provisioner/handler.go index 3dafc663a5..14d3cdd77d 100644 --- a/internal/mode/provisioner/handler.go +++ b/internal/mode/provisioner/handler.go @@ -9,13 +9,13 @@ import ( "k8s.io/apimachinery/pkg/types" "sigs.k8s.io/controller-runtime/pkg/client" - "github.com/nginxinc/nginx-kubernetes-gateway/internal/framework/conditions" - "github.com/nginxinc/nginx-kubernetes-gateway/internal/framework/events" - "github.com/nginxinc/nginx-kubernetes-gateway/internal/framework/status" + "github.com/nginxinc/nginx-gateway-fabric/internal/framework/conditions" + "github.com/nginxinc/nginx-gateway-fabric/internal/framework/events" + "github.com/nginxinc/nginx-gateway-fabric/internal/framework/status" ) // eventHandler ensures each Gateway for the specific GatewayClass has a corresponding Deployment -// of NKG configured to use that specific Gateway. +// of NGF configured to use that specific Gateway. // // eventHandler implements events.Handler interface. type eventHandler struct { diff --git a/internal/mode/provisioner/handler_test.go b/internal/mode/provisioner/handler_test.go index 2ef1bddff3..38d105c438 100644 --- a/internal/mode/provisioner/handler_test.go +++ b/internal/mode/provisioner/handler_test.go @@ -16,12 +16,12 @@ import ( . "github.com/onsi/gomega" - embeddedfiles "github.com/nginxinc/nginx-kubernetes-gateway" - "github.com/nginxinc/nginx-kubernetes-gateway/internal/framework/conditions" - "github.com/nginxinc/nginx-kubernetes-gateway/internal/framework/events" - "github.com/nginxinc/nginx-kubernetes-gateway/internal/framework/helpers" - "github.com/nginxinc/nginx-kubernetes-gateway/internal/framework/status" - "github.com/nginxinc/nginx-kubernetes-gateway/internal/framework/status/statusfakes" + embeddedfiles "github.com/nginxinc/nginx-gateway-fabric" + "github.com/nginxinc/nginx-gateway-fabric/internal/framework/conditions" + "github.com/nginxinc/nginx-gateway-fabric/internal/framework/events" + "github.com/nginxinc/nginx-gateway-fabric/internal/framework/helpers" + "github.com/nginxinc/nginx-gateway-fabric/internal/framework/status" + "github.com/nginxinc/nginx-gateway-fabric/internal/framework/status/statusfakes" ) var _ = Describe("handler", func() { diff --git a/internal/mode/provisioner/manager.go b/internal/mode/provisioner/manager.go index 16f481a67f..2a1b4a09b2 100644 --- a/internal/mode/provisioner/manager.go +++ b/internal/mode/provisioner/manager.go @@ -13,11 +13,11 @@ import ( "sigs.k8s.io/controller-runtime/pkg/manager" gatewayv1beta1 "sigs.k8s.io/gateway-api/apis/v1beta1" - embeddedfiles "github.com/nginxinc/nginx-kubernetes-gateway" - "github.com/nginxinc/nginx-kubernetes-gateway/internal/framework/controller" - "github.com/nginxinc/nginx-kubernetes-gateway/internal/framework/controller/predicate" - "github.com/nginxinc/nginx-kubernetes-gateway/internal/framework/events" - "github.com/nginxinc/nginx-kubernetes-gateway/internal/framework/status" + embeddedfiles "github.com/nginxinc/nginx-gateway-fabric" + "github.com/nginxinc/nginx-gateway-fabric/internal/framework/controller" + "github.com/nginxinc/nginx-gateway-fabric/internal/framework/controller/predicate" + "github.com/nginxinc/nginx-gateway-fabric/internal/framework/events" + "github.com/nginxinc/nginx-gateway-fabric/internal/framework/status" ) // Config is configuration for the provisioner mode. @@ -28,13 +28,13 @@ type Config struct { } // StartManager starts a Manager for the provisioner mode, which provisions -// a Deployment of NKG (static mode) for each Gateway of the provisioner GatewayClass. +// a Deployment of NGF (static mode) for each Gateway of the provisioner GatewayClass. // -// The provisioner mode is introduced to allow running Gateway API conformance tests for NKG, which expects +// The provisioner mode is introduced to allow running Gateway API conformance tests for NGF, which expects // an independent data plane instance being provisioned for each Gateway. // // The provisioner mode is not intended to be used in production (in the short term), as it lacks support for -// many important features. See https://github.com/nginxinc/nginx-kubernetes-gateway/issues/634 for more details. +// many important features. See https://github.com/nginxinc/nginx-gateway-fabric/issues/634 for more details. func StartManager(cfg Config) error { scheme := runtime.NewScheme() utilruntime.Must(gatewayv1beta1.AddToScheme(scheme)) diff --git a/internal/mode/provisioner/store.go b/internal/mode/provisioner/store.go index c1a861165f..2c262ed1c1 100644 --- a/internal/mode/provisioner/store.go +++ b/internal/mode/provisioner/store.go @@ -7,7 +7,7 @@ import ( "sigs.k8s.io/controller-runtime/pkg/client" "sigs.k8s.io/gateway-api/apis/v1beta1" - "github.com/nginxinc/nginx-kubernetes-gateway/internal/framework/events" + "github.com/nginxinc/nginx-gateway-fabric/internal/framework/events" ) // store stores the cluster state needed by the provisioner and allows to update it from the events. diff --git a/internal/mode/static/build_statuses.go b/internal/mode/static/build_statuses.go index 82ef6edf4b..8a51dd4cbd 100644 --- a/internal/mode/static/build_statuses.go +++ b/internal/mode/static/build_statuses.go @@ -5,10 +5,10 @@ import ( "sigs.k8s.io/controller-runtime/pkg/client" "sigs.k8s.io/gateway-api/apis/v1beta1" - "github.com/nginxinc/nginx-kubernetes-gateway/internal/framework/conditions" - "github.com/nginxinc/nginx-kubernetes-gateway/internal/framework/status" - staticConds "github.com/nginxinc/nginx-kubernetes-gateway/internal/mode/static/state/conditions" - "github.com/nginxinc/nginx-kubernetes-gateway/internal/mode/static/state/graph" + "github.com/nginxinc/nginx-gateway-fabric/internal/framework/conditions" + "github.com/nginxinc/nginx-gateway-fabric/internal/framework/status" + staticConds "github.com/nginxinc/nginx-gateway-fabric/internal/mode/static/state/conditions" + "github.com/nginxinc/nginx-gateway-fabric/internal/mode/static/state/graph" ) type nginxReloadResult struct { diff --git a/internal/mode/static/build_statuses_test.go b/internal/mode/static/build_statuses_test.go index b84c3f0bf2..77d803840a 100644 --- a/internal/mode/static/build_statuses_test.go +++ b/internal/mode/static/build_statuses_test.go @@ -10,11 +10,11 @@ import ( "sigs.k8s.io/controller-runtime/pkg/client" "sigs.k8s.io/gateway-api/apis/v1beta1" - "github.com/nginxinc/nginx-kubernetes-gateway/internal/framework/conditions" - "github.com/nginxinc/nginx-kubernetes-gateway/internal/framework/helpers" - "github.com/nginxinc/nginx-kubernetes-gateway/internal/framework/status" - staticConds "github.com/nginxinc/nginx-kubernetes-gateway/internal/mode/static/state/conditions" - "github.com/nginxinc/nginx-kubernetes-gateway/internal/mode/static/state/graph" + "github.com/nginxinc/nginx-gateway-fabric/internal/framework/conditions" + "github.com/nginxinc/nginx-gateway-fabric/internal/framework/helpers" + "github.com/nginxinc/nginx-gateway-fabric/internal/framework/status" + staticConds "github.com/nginxinc/nginx-gateway-fabric/internal/mode/static/state/conditions" + "github.com/nginxinc/nginx-gateway-fabric/internal/mode/static/state/graph" ) var ( diff --git a/internal/mode/static/config_updater.go b/internal/mode/static/config_updater.go index 92eebc33a5..c08c9b12ca 100644 --- a/internal/mode/static/config_updater.go +++ b/internal/mode/static/config_updater.go @@ -13,8 +13,8 @@ import ( "k8s.io/apimachinery/pkg/util/validation/field" "k8s.io/client-go/tools/record" - nkgAPI "github.com/nginxinc/nginx-kubernetes-gateway/apis/v1alpha1" - "github.com/nginxinc/nginx-kubernetes-gateway/internal/framework/helpers" + ngfAPI "github.com/nginxinc/nginx-gateway-fabric/apis/v1alpha1" + "github.com/nginxinc/nginx-gateway-fabric/internal/framework/helpers" ) // ZapLogLevelSetter defines an interface for setting the logging level of a zap logger. @@ -41,9 +41,9 @@ func (z zapSetterImpl) SetLevel(level string) error { field.NewPath("logging.level"), level, []string{ - string(nkgAPI.ControllerLogLevelInfo), - string(nkgAPI.ControllerLogLevelDebug), - string(nkgAPI.ControllerLogLevelError), + string(ngfAPI.ControllerLogLevelInfo), + string(ngfAPI.ControllerLogLevelDebug), + string(ngfAPI.ControllerLogLevelError), }) return fieldErr } @@ -60,16 +60,16 @@ func (z zapSetterImpl) Enabled(level zapcore.Level) bool { // updateControlPlane updates the control plane configuration with the given user spec. // If any fields are not set within the user spec, the default configuration values are used. func updateControlPlane( - cfg *nkgAPI.NginxGateway, + cfg *ngfAPI.NginxGateway, logger logr.Logger, eventRecorder record.EventRecorder, configNSName types.NamespacedName, logLevelSetter ZapLogLevelSetter, ) error { // build up default configuration - controlConfig := nkgAPI.NginxGatewaySpec{ - Logging: &nkgAPI.Logging{ - Level: helpers.GetPointer(nkgAPI.ControllerLogLevelInfo), + controlConfig := ngfAPI.NginxGatewaySpec{ + Logging: &ngfAPI.Logging{ + Level: helpers.GetPointer(ngfAPI.ControllerLogLevelInfo), }, } @@ -88,7 +88,7 @@ func updateControlPlane( msg := "NginxGateway configuration was deleted; using defaults" logger.Info(msg) eventRecorder.Event( - &nkgAPI.NginxGateway{ + &ngfAPI.NginxGateway{ ObjectMeta: metav1.ObjectMeta{ Namespace: configNSName.Namespace, Name: configNSName.Name, diff --git a/internal/mode/static/doc.go b/internal/mode/static/doc.go index 5dcf35b75a..3b386ac027 100644 --- a/internal/mode/static/doc.go +++ b/internal/mode/static/doc.go @@ -1,5 +1,5 @@ /* -Package static contains all the packages that relate to the static-mode implementation of NKG. +Package static contains all the packages that relate to the static-mode implementation of NGF. Static-mode configures NGINX in the scope of a single Gateway resource. */ package static diff --git a/internal/mode/static/handler.go b/internal/mode/static/handler.go index 442d7ba171..eededfa5f7 100644 --- a/internal/mode/static/handler.go +++ b/internal/mode/static/handler.go @@ -10,17 +10,17 @@ import ( "k8s.io/client-go/tools/record" "sigs.k8s.io/controller-runtime/pkg/client" - nkgAPI "github.com/nginxinc/nginx-kubernetes-gateway/apis/v1alpha1" - "github.com/nginxinc/nginx-kubernetes-gateway/internal/framework/conditions" - "github.com/nginxinc/nginx-kubernetes-gateway/internal/framework/events" - "github.com/nginxinc/nginx-kubernetes-gateway/internal/framework/status" - "github.com/nginxinc/nginx-kubernetes-gateway/internal/mode/static/nginx/config" - "github.com/nginxinc/nginx-kubernetes-gateway/internal/mode/static/nginx/file" - "github.com/nginxinc/nginx-kubernetes-gateway/internal/mode/static/nginx/runtime" - "github.com/nginxinc/nginx-kubernetes-gateway/internal/mode/static/state" - staticConds "github.com/nginxinc/nginx-kubernetes-gateway/internal/mode/static/state/conditions" - "github.com/nginxinc/nginx-kubernetes-gateway/internal/mode/static/state/dataplane" - "github.com/nginxinc/nginx-kubernetes-gateway/internal/mode/static/state/resolver" + ngfAPI "github.com/nginxinc/nginx-gateway-fabric/apis/v1alpha1" + "github.com/nginxinc/nginx-gateway-fabric/internal/framework/conditions" + "github.com/nginxinc/nginx-gateway-fabric/internal/framework/events" + "github.com/nginxinc/nginx-gateway-fabric/internal/framework/status" + "github.com/nginxinc/nginx-gateway-fabric/internal/mode/static/nginx/config" + "github.com/nginxinc/nginx-gateway-fabric/internal/mode/static/nginx/file" + "github.com/nginxinc/nginx-gateway-fabric/internal/mode/static/nginx/runtime" + "github.com/nginxinc/nginx-gateway-fabric/internal/mode/static/state" + staticConds "github.com/nginxinc/nginx-gateway-fabric/internal/mode/static/state/conditions" + "github.com/nginxinc/nginx-gateway-fabric/internal/mode/static/state/dataplane" + "github.com/nginxinc/nginx-gateway-fabric/internal/mode/static/state/resolver" ) // eventHandlerConfig holds configuration parameters for eventHandlerImpl. @@ -71,13 +71,13 @@ func (h *eventHandlerImpl) HandleEventBatch(ctx context.Context, batch events.Ev for _, event := range batch { switch e := event.(type) { case *events.UpsertEvent: - if cfg, ok := e.Resource.(*nkgAPI.NginxGateway); ok { + if cfg, ok := e.Resource.(*ngfAPI.NginxGateway); ok { h.updateControlPlaneAndSetStatus(ctx, cfg) } else { h.cfg.processor.CaptureUpsertChange(e.Resource) } case *events.DeleteEvent: - if _, ok := e.Type.(*nkgAPI.NginxGateway); ok { + if _, ok := e.Type.(*ngfAPI.NginxGateway); ok { h.updateControlPlaneAndSetStatus(ctx, nil) } else { h.cfg.processor.CaptureDeleteChange(e.Type, e.NamespacedName) @@ -133,7 +133,7 @@ func (h *eventHandlerImpl) updateNginx(ctx context.Context, conf dataplane.Confi // updateControlPlaneAndSetStatus updates the control plane configuration and then sets the status // based on the outcome -func (h *eventHandlerImpl) updateControlPlaneAndSetStatus(ctx context.Context, cfg *nkgAPI.NginxGateway) { +func (h *eventHandlerImpl) updateControlPlaneAndSetStatus(ctx context.Context, cfg *ngfAPI.NginxGateway) { var cond []conditions.Condition if err := updateControlPlane( cfg, diff --git a/internal/mode/static/handler_test.go b/internal/mode/static/handler_test.go index 04b68e3b74..799e041985 100644 --- a/internal/mode/static/handler_test.go +++ b/internal/mode/static/handler_test.go @@ -13,20 +13,20 @@ import ( ctlrZap "sigs.k8s.io/controller-runtime/pkg/log/zap" "sigs.k8s.io/gateway-api/apis/v1beta1" - nkgAPI "github.com/nginxinc/nginx-kubernetes-gateway/apis/v1alpha1" - "github.com/nginxinc/nginx-kubernetes-gateway/internal/framework/conditions" - "github.com/nginxinc/nginx-kubernetes-gateway/internal/framework/events" - "github.com/nginxinc/nginx-kubernetes-gateway/internal/framework/helpers" - "github.com/nginxinc/nginx-kubernetes-gateway/internal/framework/status" - "github.com/nginxinc/nginx-kubernetes-gateway/internal/framework/status/statusfakes" - "github.com/nginxinc/nginx-kubernetes-gateway/internal/mode/static/nginx/config/configfakes" - "github.com/nginxinc/nginx-kubernetes-gateway/internal/mode/static/nginx/file" - "github.com/nginxinc/nginx-kubernetes-gateway/internal/mode/static/nginx/file/filefakes" - "github.com/nginxinc/nginx-kubernetes-gateway/internal/mode/static/nginx/runtime/runtimefakes" - staticConds "github.com/nginxinc/nginx-kubernetes-gateway/internal/mode/static/state/conditions" - "github.com/nginxinc/nginx-kubernetes-gateway/internal/mode/static/state/dataplane" - "github.com/nginxinc/nginx-kubernetes-gateway/internal/mode/static/state/graph" - "github.com/nginxinc/nginx-kubernetes-gateway/internal/mode/static/state/statefakes" + ngfAPI "github.com/nginxinc/nginx-gateway-fabric/apis/v1alpha1" + "github.com/nginxinc/nginx-gateway-fabric/internal/framework/conditions" + "github.com/nginxinc/nginx-gateway-fabric/internal/framework/events" + "github.com/nginxinc/nginx-gateway-fabric/internal/framework/helpers" + "github.com/nginxinc/nginx-gateway-fabric/internal/framework/status" + "github.com/nginxinc/nginx-gateway-fabric/internal/framework/status/statusfakes" + "github.com/nginxinc/nginx-gateway-fabric/internal/mode/static/nginx/config/configfakes" + "github.com/nginxinc/nginx-gateway-fabric/internal/mode/static/nginx/file" + "github.com/nginxinc/nginx-gateway-fabric/internal/mode/static/nginx/file/filefakes" + "github.com/nginxinc/nginx-gateway-fabric/internal/mode/static/nginx/runtime/runtimefakes" + staticConds "github.com/nginxinc/nginx-gateway-fabric/internal/mode/static/state/conditions" + "github.com/nginxinc/nginx-gateway-fabric/internal/mode/static/state/dataplane" + "github.com/nginxinc/nginx-gateway-fabric/internal/mode/static/state/graph" + "github.com/nginxinc/nginx-gateway-fabric/internal/mode/static/state/statefakes" ) var _ = Describe("eventHandler", func() { @@ -155,14 +155,14 @@ var _ = Describe("eventHandler", func() { }) When("receiving control plane configuration updates", func() { - cfg := func(level nkgAPI.ControllerLogLevel) *nkgAPI.NginxGateway { - return &nkgAPI.NginxGateway{ + cfg := func(level ngfAPI.ControllerLogLevel) *ngfAPI.NginxGateway { + return &ngfAPI.NginxGateway{ ObjectMeta: metav1.ObjectMeta{ Namespace: namespace, Name: configName, }, - Spec: nkgAPI.NginxGatewaySpec{ - Logging: &nkgAPI.Logging{ + Spec: ngfAPI.NginxGatewaySpec{ + Logging: &ngfAPI.Logging{ Level: helpers.GetPointer(level), }, }, @@ -181,7 +181,7 @@ var _ = Describe("eventHandler", func() { } It("handles a valid config", func() { - batch := []interface{}{&events.UpsertEvent{Resource: cfg(nkgAPI.ControllerLogLevelError)}} + batch := []interface{}{&events.UpsertEvent{Resource: cfg(ngfAPI.ControllerLogLevelError)}} handler.HandleEventBatch(context.Background(), batch) Expect(fakeStatusUpdater.UpdateCallCount()).Should(Equal(1)) @@ -192,7 +192,7 @@ var _ = Describe("eventHandler", func() { }) It("handles an invalid config", func() { - batch := []interface{}{&events.UpsertEvent{Resource: cfg(nkgAPI.ControllerLogLevel("invalid"))}} + batch := []interface{}{&events.UpsertEvent{Resource: cfg(ngfAPI.ControllerLogLevel("invalid"))}} handler.HandleEventBatch(context.Background(), batch) Expect(fakeStatusUpdater.UpdateCallCount()).Should(Equal(1)) @@ -211,7 +211,7 @@ var _ = Describe("eventHandler", func() { }) It("handles a deleted config", func() { - batch := []interface{}{&events.DeleteEvent{Type: &nkgAPI.NginxGateway{}}} + batch := []interface{}{&events.DeleteEvent{Type: &ngfAPI.NginxGateway{}}} handler.HandleEventBatch(context.Background(), batch) Expect(len(fakeEventRecorder.Events)).To(Equal(1)) event := <-fakeEventRecorder.Events diff --git a/internal/mode/static/manager.go b/internal/mode/static/manager.go index e84bc1404f..bcde121ee0 100644 --- a/internal/mode/static/manager.go +++ b/internal/mode/static/manager.go @@ -21,23 +21,23 @@ import ( k8spredicate "sigs.k8s.io/controller-runtime/pkg/predicate" gatewayv1beta1 "sigs.k8s.io/gateway-api/apis/v1beta1" - nkgAPI "github.com/nginxinc/nginx-kubernetes-gateway/apis/v1alpha1" - "github.com/nginxinc/nginx-kubernetes-gateway/internal/framework/controller" - "github.com/nginxinc/nginx-kubernetes-gateway/internal/framework/controller/filter" - "github.com/nginxinc/nginx-kubernetes-gateway/internal/framework/controller/index" - "github.com/nginxinc/nginx-kubernetes-gateway/internal/framework/controller/predicate" - "github.com/nginxinc/nginx-kubernetes-gateway/internal/framework/events" - "github.com/nginxinc/nginx-kubernetes-gateway/internal/framework/status" - "github.com/nginxinc/nginx-kubernetes-gateway/internal/mode/static/config" - nkgmetrics "github.com/nginxinc/nginx-kubernetes-gateway/internal/mode/static/metrics" - ngxcfg "github.com/nginxinc/nginx-kubernetes-gateway/internal/mode/static/nginx/config" - ngxvalidation "github.com/nginxinc/nginx-kubernetes-gateway/internal/mode/static/nginx/config/validation" - "github.com/nginxinc/nginx-kubernetes-gateway/internal/mode/static/nginx/file" - ngxruntime "github.com/nginxinc/nginx-kubernetes-gateway/internal/mode/static/nginx/runtime" - "github.com/nginxinc/nginx-kubernetes-gateway/internal/mode/static/state" - "github.com/nginxinc/nginx-kubernetes-gateway/internal/mode/static/state/relationship" - "github.com/nginxinc/nginx-kubernetes-gateway/internal/mode/static/state/resolver" - "github.com/nginxinc/nginx-kubernetes-gateway/internal/mode/static/state/validation" + ngfAPI "github.com/nginxinc/nginx-gateway-fabric/apis/v1alpha1" + "github.com/nginxinc/nginx-gateway-fabric/internal/framework/controller" + "github.com/nginxinc/nginx-gateway-fabric/internal/framework/controller/filter" + "github.com/nginxinc/nginx-gateway-fabric/internal/framework/controller/index" + "github.com/nginxinc/nginx-gateway-fabric/internal/framework/controller/predicate" + "github.com/nginxinc/nginx-gateway-fabric/internal/framework/events" + "github.com/nginxinc/nginx-gateway-fabric/internal/framework/status" + "github.com/nginxinc/nginx-gateway-fabric/internal/mode/static/config" + ngfmetrics "github.com/nginxinc/nginx-gateway-fabric/internal/mode/static/metrics" + ngxcfg "github.com/nginxinc/nginx-gateway-fabric/internal/mode/static/nginx/config" + ngxvalidation "github.com/nginxinc/nginx-gateway-fabric/internal/mode/static/nginx/config/validation" + "github.com/nginxinc/nginx-gateway-fabric/internal/mode/static/nginx/file" + ngxruntime "github.com/nginxinc/nginx-gateway-fabric/internal/mode/static/nginx/runtime" + "github.com/nginxinc/nginx-gateway-fabric/internal/mode/static/state" + "github.com/nginxinc/nginx-gateway-fabric/internal/mode/static/state/relationship" + "github.com/nginxinc/nginx-gateway-fabric/internal/mode/static/state/resolver" + "github.com/nginxinc/nginx-gateway-fabric/internal/mode/static/state/validation" ) const ( @@ -51,7 +51,7 @@ func init() { utilruntime.Must(gatewayv1beta1.AddToScheme(scheme)) utilruntime.Must(apiv1.AddToScheme(scheme)) utilruntime.Must(discoveryV1.AddToScheme(scheme)) - utilruntime.Must(nkgAPI.AddToScheme(scheme)) + utilruntime.Must(ngfAPI.AddToScheme(scheme)) } func StartManager(cfg config.Config) error { @@ -82,7 +82,7 @@ func StartManager(cfg config.Config) error { } } - recorderName := fmt.Sprintf("nginx-kubernetes-gateway-%s", cfg.GatewayClassName) + recorderName := fmt.Sprintf("nginx-gateway-fabric-%s", cfg.GatewayClassName) recorder := mgr.GetEventRecorderFor(recorderName) logLevelSetter := newZapLogLevelSetter(cfg.AtomicLevel) @@ -274,7 +274,7 @@ func registerControllers( if cfg.ConfigName != "" { controllerRegCfgs = append(controllerRegCfgs, ctlrCfg{ - objectType: &nkgAPI.NginxGateway{}, + objectType: &ngfAPI.NginxGateway{}, options: []controller.Option{ controller.WithNamespacedNameFilter(filter.CreateSingleResourceFilter(controlConfigNSName)), }, @@ -342,7 +342,7 @@ func setInitialConfig( ctx, cancel := context.WithTimeout(context.Background(), 10*time.Second) defer cancel() - var config nkgAPI.NginxGateway + var config ngfAPI.NginxGateway if err := reader.Get(ctx, configName, &config); err != nil { return err } @@ -357,11 +357,11 @@ func setInitialConfig( func createAndRegisterMetricsCollectors(metricsEnabled bool, gwClassName string) (ngxruntime.ManagerCollector, error) { if !metricsEnabled { // return a no-op collector to avoid nil pointer errors when metrics are disabled - return nkgmetrics.NewManagerNoopCollector(), nil + return ngfmetrics.NewManagerNoopCollector(), nil } constLabels := map[string]string{"class": gwClassName} - ngxCollector, err := nkgmetrics.NewNginxMetricsCollector(constLabels) + ngxCollector, err := ngfmetrics.NewNginxMetricsCollector(constLabels) if err != nil { return nil, fmt.Errorf("cannot create NGINX status metrics collector: %w", err) } @@ -369,7 +369,7 @@ func createAndRegisterMetricsCollectors(metricsEnabled bool, gwClassName string) return nil, fmt.Errorf("failed to register NGINX status metrics collector: %w", err) } - mgrCollector := nkgmetrics.NewManagerMetricsCollector(constLabels) + mgrCollector := ngfmetrics.NewManagerMetricsCollector(constLabels) if err := metrics.Registry.Register(mgrCollector); err != nil { return nil, fmt.Errorf("failed to register NGINX manager runtime metrics collector: %w", err) } diff --git a/internal/mode/static/manager_test.go b/internal/mode/static/manager_test.go index 43f2d95616..4bd34230ed 100644 --- a/internal/mode/static/manager_test.go +++ b/internal/mode/static/manager_test.go @@ -12,7 +12,7 @@ import ( metricsserver "sigs.k8s.io/controller-runtime/pkg/metrics/server" gatewayv1beta1 "sigs.k8s.io/gateway-api/apis/v1beta1" - "github.com/nginxinc/nginx-kubernetes-gateway/internal/mode/static/config" + "github.com/nginxinc/nginx-gateway-fabric/internal/mode/static/config" ) func TestPrepareFirstEventBatchPreparerArgs(t *testing.T) { diff --git a/internal/mode/static/metrics/metrics.go b/internal/mode/static/metrics/metrics.go index 1d9e85e7e6..1f6b62b127 100644 --- a/internal/mode/static/metrics/metrics.go +++ b/internal/mode/static/metrics/metrics.go @@ -1,4 +1,4 @@ package metrics // nolint:gosec // flagged as potential hardcoded credentials, but is not sensitive -const metricsNamespace = "nginx_kubernetes_gateway" +const metricsNamespace = "nginx_gateway_fabric" diff --git a/internal/mode/static/nginx/config/configfakes/fake_generator.go b/internal/mode/static/nginx/config/configfakes/fake_generator.go index 4b058a3553..828e41951b 100644 --- a/internal/mode/static/nginx/config/configfakes/fake_generator.go +++ b/internal/mode/static/nginx/config/configfakes/fake_generator.go @@ -4,9 +4,9 @@ package configfakes import ( "sync" - "github.com/nginxinc/nginx-kubernetes-gateway/internal/mode/static/nginx/config" - "github.com/nginxinc/nginx-kubernetes-gateway/internal/mode/static/nginx/file" - "github.com/nginxinc/nginx-kubernetes-gateway/internal/mode/static/state/dataplane" + "github.com/nginxinc/nginx-gateway-fabric/internal/mode/static/nginx/config" + "github.com/nginxinc/nginx-gateway-fabric/internal/mode/static/nginx/file" + "github.com/nginxinc/nginx-gateway-fabric/internal/mode/static/state/dataplane" ) type FakeGenerator struct { diff --git a/internal/mode/static/nginx/config/execute_test.go b/internal/mode/static/nginx/config/execute_test.go index 0e452f7b6a..4456c7370a 100644 --- a/internal/mode/static/nginx/config/execute_test.go +++ b/internal/mode/static/nginx/config/execute_test.go @@ -5,7 +5,7 @@ import ( . "github.com/onsi/gomega" - "github.com/nginxinc/nginx-kubernetes-gateway/internal/mode/static/nginx/config/http" + "github.com/nginxinc/nginx-gateway-fabric/internal/mode/static/nginx/config/http" ) func TestExecute(t *testing.T) { diff --git a/internal/mode/static/nginx/config/generator.go b/internal/mode/static/nginx/config/generator.go index 851d8147f8..77cb2220d0 100644 --- a/internal/mode/static/nginx/config/generator.go +++ b/internal/mode/static/nginx/config/generator.go @@ -3,8 +3,8 @@ package config import ( "path/filepath" - "github.com/nginxinc/nginx-kubernetes-gateway/internal/mode/static/nginx/file" - "github.com/nginxinc/nginx-kubernetes-gateway/internal/mode/static/state/dataplane" + "github.com/nginxinc/nginx-gateway-fabric/internal/mode/static/nginx/file" + "github.com/nginxinc/nginx-gateway-fabric/internal/mode/static/state/dataplane" ) //go:generate go run github.com/maxbrunsfeld/counterfeiter/v6 . Generator diff --git a/internal/mode/static/nginx/config/generator_test.go b/internal/mode/static/nginx/config/generator_test.go index 465a1d5fe1..34cd858d05 100644 --- a/internal/mode/static/nginx/config/generator_test.go +++ b/internal/mode/static/nginx/config/generator_test.go @@ -7,9 +7,9 @@ import ( . "github.com/onsi/gomega" "k8s.io/apimachinery/pkg/types" - "github.com/nginxinc/nginx-kubernetes-gateway/internal/mode/static/nginx/config" - "github.com/nginxinc/nginx-kubernetes-gateway/internal/mode/static/nginx/file" - "github.com/nginxinc/nginx-kubernetes-gateway/internal/mode/static/state/dataplane" + "github.com/nginxinc/nginx-gateway-fabric/internal/mode/static/nginx/config" + "github.com/nginxinc/nginx-gateway-fabric/internal/mode/static/nginx/file" + "github.com/nginxinc/nginx-gateway-fabric/internal/mode/static/state/dataplane" ) func TestGenerate(t *testing.T) { diff --git a/internal/mode/static/nginx/config/maps.go b/internal/mode/static/nginx/config/maps.go index b5cc695f4f..2ced93fece 100644 --- a/internal/mode/static/nginx/config/maps.go +++ b/internal/mode/static/nginx/config/maps.go @@ -4,8 +4,8 @@ import ( "strings" gotemplate "text/template" - "github.com/nginxinc/nginx-kubernetes-gateway/internal/mode/static/nginx/config/http" - "github.com/nginxinc/nginx-kubernetes-gateway/internal/mode/static/state/dataplane" + "github.com/nginxinc/nginx-gateway-fabric/internal/mode/static/nginx/config/http" + "github.com/nginxinc/nginx-gateway-fabric/internal/mode/static/state/dataplane" ) var mapsTemplate = gotemplate.Must(gotemplate.New("maps").Parse(mapsTemplateText)) diff --git a/internal/mode/static/nginx/config/maps_test.go b/internal/mode/static/nginx/config/maps_test.go index b6ac952a82..1e6f1a30a9 100644 --- a/internal/mode/static/nginx/config/maps_test.go +++ b/internal/mode/static/nginx/config/maps_test.go @@ -6,8 +6,8 @@ import ( . "github.com/onsi/gomega" - "github.com/nginxinc/nginx-kubernetes-gateway/internal/mode/static/nginx/config/http" - "github.com/nginxinc/nginx-kubernetes-gateway/internal/mode/static/state/dataplane" + "github.com/nginxinc/nginx-gateway-fabric/internal/mode/static/nginx/config/http" + "github.com/nginxinc/nginx-gateway-fabric/internal/mode/static/state/dataplane" ) func TestExecuteMaps(t *testing.T) { diff --git a/internal/mode/static/nginx/config/servers.go b/internal/mode/static/nginx/config/servers.go index cd62e68871..d91d33d8f1 100644 --- a/internal/mode/static/nginx/config/servers.go +++ b/internal/mode/static/nginx/config/servers.go @@ -6,8 +6,8 @@ import ( "strings" gotemplate "text/template" - "github.com/nginxinc/nginx-kubernetes-gateway/internal/mode/static/nginx/config/http" - "github.com/nginxinc/nginx-kubernetes-gateway/internal/mode/static/state/dataplane" + "github.com/nginxinc/nginx-gateway-fabric/internal/mode/static/nginx/config/http" + "github.com/nginxinc/nginx-gateway-fabric/internal/mode/static/state/dataplane" ) var serversTemplate = gotemplate.Must(gotemplate.New("servers").Parse(serversTemplateText)) @@ -109,7 +109,7 @@ func createLocations(pathRules []dataplane.PathRule, listenerPort int32) []http. // FIXME(pleshakov): Ensure dataplane.Configuration -related types don't include v1beta1 types, so that // we don't need to make any assumptions like above here. After fixing this, ensure that there is a test // for checking the imported Webhook validation catches the case above. - // https://github.com/nginxinc/nginx-kubernetes-gateway/issues/660 + // https://github.com/nginxinc/nginx-gateway-fabric/issues/660 // RequestRedirect and proxying are mutually exclusive. if r.Filters.RequestRedirect != nil { @@ -419,7 +419,7 @@ func convertSetHeaders(headers []dataplane.HTTPHeader) []http.Header { func convertMatchesToString(matches []httpMatch) string { // FIXME(sberman): De-dupe matches and associated locations // so we don't need nginx/njs to perform unnecessary matching. - // https://github.com/nginxinc/nginx-kubernetes-gateway/issues/662 + // https://github.com/nginxinc/nginx-gateway-fabric/issues/662 b, err := json.Marshal(matches) if err != nil { // panic is safe here because we should never fail to marshal the match unless we constructed it incorrectly. diff --git a/internal/mode/static/nginx/config/servers_test.go b/internal/mode/static/nginx/config/servers_test.go index 1741be30fc..ef9477f739 100644 --- a/internal/mode/static/nginx/config/servers_test.go +++ b/internal/mode/static/nginx/config/servers_test.go @@ -9,9 +9,9 @@ import ( . "github.com/onsi/gomega" "k8s.io/apimachinery/pkg/types" - "github.com/nginxinc/nginx-kubernetes-gateway/internal/framework/helpers" - "github.com/nginxinc/nginx-kubernetes-gateway/internal/mode/static/nginx/config/http" - "github.com/nginxinc/nginx-kubernetes-gateway/internal/mode/static/state/dataplane" + "github.com/nginxinc/nginx-gateway-fabric/internal/framework/helpers" + "github.com/nginxinc/nginx-gateway-fabric/internal/mode/static/nginx/config/http" + "github.com/nginxinc/nginx-gateway-fabric/internal/mode/static/state/dataplane" ) func TestExecuteServers(t *testing.T) { diff --git a/internal/mode/static/nginx/config/split_clients.go b/internal/mode/static/nginx/config/split_clients.go index 7728c52307..61d63aaec0 100644 --- a/internal/mode/static/nginx/config/split_clients.go +++ b/internal/mode/static/nginx/config/split_clients.go @@ -5,8 +5,8 @@ import ( "math" gotemplate "text/template" - "github.com/nginxinc/nginx-kubernetes-gateway/internal/mode/static/nginx/config/http" - "github.com/nginxinc/nginx-kubernetes-gateway/internal/mode/static/state/dataplane" + "github.com/nginxinc/nginx-gateway-fabric/internal/mode/static/nginx/config/http" + "github.com/nginxinc/nginx-gateway-fabric/internal/mode/static/state/dataplane" ) var splitClientsTemplate = gotemplate.Must(gotemplate.New("split_clients").Parse(splitClientsTemplateText)) diff --git a/internal/mode/static/nginx/config/split_clients_test.go b/internal/mode/static/nginx/config/split_clients_test.go index 685de1a28f..31e0ed445b 100644 --- a/internal/mode/static/nginx/config/split_clients_test.go +++ b/internal/mode/static/nginx/config/split_clients_test.go @@ -6,8 +6,8 @@ import ( . "github.com/onsi/gomega" "k8s.io/apimachinery/pkg/types" - "github.com/nginxinc/nginx-kubernetes-gateway/internal/mode/static/nginx/config/http" - "github.com/nginxinc/nginx-kubernetes-gateway/internal/mode/static/state/dataplane" + "github.com/nginxinc/nginx-gateway-fabric/internal/mode/static/nginx/config/http" + "github.com/nginxinc/nginx-gateway-fabric/internal/mode/static/state/dataplane" ) func TestExecuteSplitClients(t *testing.T) { diff --git a/internal/mode/static/nginx/config/upstreams.go b/internal/mode/static/nginx/config/upstreams.go index 3410f01c18..75f36e3ae9 100644 --- a/internal/mode/static/nginx/config/upstreams.go +++ b/internal/mode/static/nginx/config/upstreams.go @@ -4,8 +4,8 @@ import ( "fmt" gotemplate "text/template" - "github.com/nginxinc/nginx-kubernetes-gateway/internal/mode/static/nginx/config/http" - "github.com/nginxinc/nginx-kubernetes-gateway/internal/mode/static/state/dataplane" + "github.com/nginxinc/nginx-gateway-fabric/internal/mode/static/nginx/config/http" + "github.com/nginxinc/nginx-gateway-fabric/internal/mode/static/state/dataplane" ) var upstreamsTemplate = gotemplate.Must(gotemplate.New("upstreams").Parse(upstreamsTemplateText)) diff --git a/internal/mode/static/nginx/config/upstreams_template.go b/internal/mode/static/nginx/config/upstreams_template.go index ff9a4f9198..bf28a6e2e7 100644 --- a/internal/mode/static/nginx/config/upstreams_template.go +++ b/internal/mode/static/nginx/config/upstreams_template.go @@ -2,7 +2,7 @@ package config // FIXME(kate-osborn): Dynamically calculate upstream zone size based on the number of upstreams. // 512k will support up to 648 upstream servers. -// https://github.com/nginxinc/nginx-kubernetes-gateway/issues/483 +// https://github.com/nginxinc/nginx-gateway-fabric/issues/483 var upstreamsTemplateText = ` {{ range $u := . }} upstream {{ $u.Name }} { diff --git a/internal/mode/static/nginx/config/upstreams_test.go b/internal/mode/static/nginx/config/upstreams_test.go index c24a5820f2..6ec0bbfd48 100644 --- a/internal/mode/static/nginx/config/upstreams_test.go +++ b/internal/mode/static/nginx/config/upstreams_test.go @@ -5,9 +5,9 @@ import ( . "github.com/onsi/gomega" - "github.com/nginxinc/nginx-kubernetes-gateway/internal/mode/static/nginx/config/http" - "github.com/nginxinc/nginx-kubernetes-gateway/internal/mode/static/state/dataplane" - "github.com/nginxinc/nginx-kubernetes-gateway/internal/mode/static/state/resolver" + "github.com/nginxinc/nginx-gateway-fabric/internal/mode/static/nginx/config/http" + "github.com/nginxinc/nginx-gateway-fabric/internal/mode/static/state/dataplane" + "github.com/nginxinc/nginx-gateway-fabric/internal/mode/static/state/resolver" ) func TestExecuteUpstreams(t *testing.T) { diff --git a/internal/mode/static/nginx/config/validation/doc.go b/internal/mode/static/nginx/config/validation/doc.go index f733288138..ab0cb5a162 100644 --- a/internal/mode/static/nginx/config/validation/doc.go +++ b/internal/mode/static/nginx/config/validation/doc.go @@ -4,7 +4,7 @@ Package validation includes validators to validate values that will propagate to The validation rules prevent two cases: (1) Invalid values. Such values will cause NGINX to fail to reload the configuration. (2) Malicious values. Such values will cause NGINX to succeed to reload, but will configure NGINX maliciously, outside -of the NKG capabilities. For example, configuring NGINX to serve the contents of the file system of its container. +of the NGF capabilities. For example, configuring NGINX to serve the contents of the file system of its container. The validation rules are based on the types in the parent config package and how they are used in the NGINX configuration templates. Changes to those might require changing the validation rules. diff --git a/internal/mode/static/nginx/config/validation/http_njs_match.go b/internal/mode/static/nginx/config/validation/http_njs_match.go index 6675f049fa..d207766c20 100644 --- a/internal/mode/static/nginx/config/validation/http_njs_match.go +++ b/internal/mode/static/nginx/config/validation/http_njs_match.go @@ -8,7 +8,7 @@ import ( k8svalidation "k8s.io/apimachinery/pkg/util/validation" - "github.com/nginxinc/nginx-kubernetes-gateway/internal/mode/static/nginx/config" + "github.com/nginxinc/nginx-gateway-fabric/internal/mode/static/nginx/config" ) // HTTPNJSMatchValidator validates values used for matching a request. @@ -38,7 +38,7 @@ func (HTTPNJSMatchValidator) ValidatePathInMatch(path string) error { } // FIXME(pleshakov): This function will no longer be - // needed once https://github.com/nginxinc/nginx-kubernetes-gateway/issues/428 is fixed. + // needed once https://github.com/nginxinc/nginx-gateway-fabric/issues/428 is fixed. // That's because the location path gets into the set directive in the location block. // Example: set $http_matches "[{\"redirectPath\":\"/coffee_route0\" ... // Where /coffee is tha path. diff --git a/internal/mode/static/nginx/config/validation/http_validator.go b/internal/mode/static/nginx/config/validation/http_validator.go index 55af7e3367..10c98aec34 100644 --- a/internal/mode/static/nginx/config/validation/http_validator.go +++ b/internal/mode/static/nginx/config/validation/http_validator.go @@ -1,7 +1,7 @@ package validation import ( - "github.com/nginxinc/nginx-kubernetes-gateway/internal/mode/static/state/validation" + "github.com/nginxinc/nginx-gateway-fabric/internal/mode/static/state/validation" ) // HTTPValidator validates values that will propagate into the NGINX configuration http context. diff --git a/internal/mode/static/nginx/config/variable_names.go b/internal/mode/static/nginx/config/variable_names.go index 7e5680b8fb..0b8cd6430d 100644 --- a/internal/mode/static/nginx/config/variable_names.go +++ b/internal/mode/static/nginx/config/variable_names.go @@ -15,7 +15,7 @@ func convertStringToSafeVariableName(s string) string { // proxy_headers_hash_max_size and variables_hash_max_size to 1024 to support the longest header name as allowed // by the schema (256 characters). This ensures NGINX will not fail to reload. // FIXME(ciarams87): Investigate if any there are any performance related concerns with changing these directives. -// https://github.com/nginxinc/nginx-kubernetes-gateway/issues/772 +// https://github.com/nginxinc/nginx-gateway-fabric/issues/772 func generateAddHeaderMapVariableName(name string) string { return strings.ToLower(convertStringToSafeVariableName(name)) + "_header_var" } diff --git a/internal/mode/static/nginx/file/filefakes/fake_clear_folders_osfile_manager.go b/internal/mode/static/nginx/file/filefakes/fake_clear_folders_osfile_manager.go index dc4595e44c..49bd5658ee 100644 --- a/internal/mode/static/nginx/file/filefakes/fake_clear_folders_osfile_manager.go +++ b/internal/mode/static/nginx/file/filefakes/fake_clear_folders_osfile_manager.go @@ -5,7 +5,7 @@ import ( "io/fs" "sync" - "github.com/nginxinc/nginx-kubernetes-gateway/internal/mode/static/nginx/file" + "github.com/nginxinc/nginx-gateway-fabric/internal/mode/static/nginx/file" ) type FakeClearFoldersOSFileManager struct { diff --git a/internal/mode/static/nginx/file/filefakes/fake_manager.go b/internal/mode/static/nginx/file/filefakes/fake_manager.go index 1e03abfefe..557202ae1d 100644 --- a/internal/mode/static/nginx/file/filefakes/fake_manager.go +++ b/internal/mode/static/nginx/file/filefakes/fake_manager.go @@ -4,7 +4,7 @@ package filefakes import ( "sync" - "github.com/nginxinc/nginx-kubernetes-gateway/internal/mode/static/nginx/file" + "github.com/nginxinc/nginx-gateway-fabric/internal/mode/static/nginx/file" ) type FakeManager struct { diff --git a/internal/mode/static/nginx/file/filefakes/fake_osfile_manager.go b/internal/mode/static/nginx/file/filefakes/fake_osfile_manager.go index edcac47d2b..d1e5128a33 100644 --- a/internal/mode/static/nginx/file/filefakes/fake_osfile_manager.go +++ b/internal/mode/static/nginx/file/filefakes/fake_osfile_manager.go @@ -6,7 +6,7 @@ import ( "os" "sync" - "github.com/nginxinc/nginx-kubernetes-gateway/internal/mode/static/nginx/file" + "github.com/nginxinc/nginx-gateway-fabric/internal/mode/static/nginx/file" ) type FakeOSFileManager struct { diff --git a/internal/mode/static/nginx/file/folders_test.go b/internal/mode/static/nginx/file/folders_test.go index 67fa0d12f7..10057be477 100644 --- a/internal/mode/static/nginx/file/folders_test.go +++ b/internal/mode/static/nginx/file/folders_test.go @@ -8,8 +8,8 @@ import ( . "github.com/onsi/gomega" - "github.com/nginxinc/nginx-kubernetes-gateway/internal/mode/static/nginx/file" - "github.com/nginxinc/nginx-kubernetes-gateway/internal/mode/static/nginx/file/filefakes" + "github.com/nginxinc/nginx-gateway-fabric/internal/mode/static/nginx/file" + "github.com/nginxinc/nginx-gateway-fabric/internal/mode/static/nginx/file/filefakes" ) func writeFile(t *testing.T, name string, data []byte) { diff --git a/internal/mode/static/nginx/file/manager_test.go b/internal/mode/static/nginx/file/manager_test.go index 783a3314fc..c6f52a526c 100644 --- a/internal/mode/static/nginx/file/manager_test.go +++ b/internal/mode/static/nginx/file/manager_test.go @@ -9,8 +9,8 @@ import ( . "github.com/onsi/gomega" "sigs.k8s.io/controller-runtime/pkg/log/zap" - "github.com/nginxinc/nginx-kubernetes-gateway/internal/mode/static/nginx/file" - "github.com/nginxinc/nginx-kubernetes-gateway/internal/mode/static/nginx/file/filefakes" + "github.com/nginxinc/nginx-gateway-fabric/internal/mode/static/nginx/file" + "github.com/nginxinc/nginx-gateway-fabric/internal/mode/static/nginx/file/filefakes" ) var _ = Describe("EventHandler", func() { diff --git a/internal/mode/static/nginx/modules/README.md b/internal/mode/static/nginx/modules/README.md index d75409df83..11dfbcf162 100644 --- a/internal/mode/static/nginx/modules/README.md +++ b/internal/mode/static/nginx/modules/README.md @@ -1,6 +1,6 @@ # NGINX JavaScript Modules -This directory contains the [njs](http://nginx.org/en/docs/njs/) modules for NGINX Kubernetes Gateway. +This directory contains the [njs](http://nginx.org/en/docs/njs/) modules for NGINX Gateway Fabric. ## Prerequisites diff --git a/internal/mode/static/nginx/runtime/runtimefakes/fake_manager.go b/internal/mode/static/nginx/runtime/runtimefakes/fake_manager.go index 1fd6724c7d..f841eaf099 100644 --- a/internal/mode/static/nginx/runtime/runtimefakes/fake_manager.go +++ b/internal/mode/static/nginx/runtime/runtimefakes/fake_manager.go @@ -5,7 +5,7 @@ import ( "context" "sync" - "github.com/nginxinc/nginx-kubernetes-gateway/internal/mode/static/nginx/runtime" + "github.com/nginxinc/nginx-gateway-fabric/internal/mode/static/nginx/runtime" ) type FakeManager struct { diff --git a/internal/mode/static/state/change_processor.go b/internal/mode/static/state/change_processor.go index 6ccf00d751..cbce3340fd 100644 --- a/internal/mode/static/state/change_processor.go +++ b/internal/mode/static/state/change_processor.go @@ -17,9 +17,9 @@ import ( gwapivalidation "sigs.k8s.io/gateway-api/apis/v1beta1/validation" - "github.com/nginxinc/nginx-kubernetes-gateway/internal/mode/static/state/graph" - "github.com/nginxinc/nginx-kubernetes-gateway/internal/mode/static/state/relationship" - "github.com/nginxinc/nginx-kubernetes-gateway/internal/mode/static/state/validation" + "github.com/nginxinc/nginx-gateway-fabric/internal/mode/static/state/graph" + "github.com/nginxinc/nginx-gateway-fabric/internal/mode/static/state/relationship" + "github.com/nginxinc/nginx-gateway-fabric/internal/mode/static/state/validation" ) const ( @@ -172,7 +172,7 @@ func NewChangeProcessorImpl(cfg ChangeProcessorConfig) *ChangeProcessorImpl { // We don't validate GatewayClass or ReferenceGrant, because as of the latest version, // the webhook doesn't validate them. // It only validates a GatewayClass update that requires the previous version of the resource, - // which NKG cannot reliably provide - for example, after NKG restarts). + // which NGF cannot reliably provide - for example, after NGF restarts). // https://github.com/kubernetes-sigs/gateway-api/blob/v0.8.0/apis/v1beta1/validation/gatewayclass.go#L28 case *v1beta1.Gateway: err = gwapivalidation.ValidateGateway(o).ToAggregate() @@ -196,8 +196,9 @@ func NewChangeProcessorImpl(cfg ChangeProcessorConfig) *ChangeProcessorImpl { // Currently, changes (upserts/delete) trigger rebuilding of the configuration, even if the change doesn't change // the configuration or the statuses of the resources. For example, a change in a Gateway resource that doesn't -// belong to the NGINX Gateway or an HTTPRoute that doesn't belong to any of the Gateways of the NGINX Gateway. -// Find a way to ignore changes that don't affect the configuration and/or statuses of the resources. +// belong to the NGINX Gateway Fabric or an HTTPRoute that doesn't belong to any of the Gateways of the +// NGINX Gateway Fabric. Find a way to ignore changes that don't affect the configuration and/or statuses of +// the resources. // FIXME(pleshakov) // Remove CaptureUpsertChange() and CaptureDeleteChange() from ChangeProcessor and pass all changes directly to diff --git a/internal/mode/static/state/change_processor_test.go b/internal/mode/static/state/change_processor_test.go index a22088b7ad..1a3fee8bb4 100644 --- a/internal/mode/static/state/change_processor_test.go +++ b/internal/mode/static/state/change_processor_test.go @@ -16,16 +16,16 @@ import ( "sigs.k8s.io/gateway-api/apis/v1alpha2" "sigs.k8s.io/gateway-api/apis/v1beta1" - "github.com/nginxinc/nginx-kubernetes-gateway/internal/framework/conditions" - "github.com/nginxinc/nginx-kubernetes-gateway/internal/framework/controller/index" - "github.com/nginxinc/nginx-kubernetes-gateway/internal/framework/helpers" - "github.com/nginxinc/nginx-kubernetes-gateway/internal/mode/static/state" - staticConds "github.com/nginxinc/nginx-kubernetes-gateway/internal/mode/static/state/conditions" - "github.com/nginxinc/nginx-kubernetes-gateway/internal/mode/static/state/graph" - "github.com/nginxinc/nginx-kubernetes-gateway/internal/mode/static/state/relationship" - "github.com/nginxinc/nginx-kubernetes-gateway/internal/mode/static/state/relationship/relationshipfakes" - "github.com/nginxinc/nginx-kubernetes-gateway/internal/mode/static/state/validation" - "github.com/nginxinc/nginx-kubernetes-gateway/internal/mode/static/state/validation/validationfakes" + "github.com/nginxinc/nginx-gateway-fabric/internal/framework/conditions" + "github.com/nginxinc/nginx-gateway-fabric/internal/framework/controller/index" + "github.com/nginxinc/nginx-gateway-fabric/internal/framework/helpers" + "github.com/nginxinc/nginx-gateway-fabric/internal/mode/static/state" + staticConds "github.com/nginxinc/nginx-gateway-fabric/internal/mode/static/state/conditions" + "github.com/nginxinc/nginx-gateway-fabric/internal/mode/static/state/graph" + "github.com/nginxinc/nginx-gateway-fabric/internal/mode/static/state/relationship" + "github.com/nginxinc/nginx-gateway-fabric/internal/mode/static/state/relationship/relationshipfakes" + "github.com/nginxinc/nginx-gateway-fabric/internal/mode/static/state/validation" + "github.com/nginxinc/nginx-gateway-fabric/internal/mode/static/state/validation/validationfakes" ) const ( diff --git a/internal/mode/static/state/conditions/conditions.go b/internal/mode/static/state/conditions/conditions.go index 9ad84eb35b..0c3b33c104 100644 --- a/internal/mode/static/state/conditions/conditions.go +++ b/internal/mode/static/state/conditions/conditions.go @@ -6,8 +6,8 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "sigs.k8s.io/gateway-api/apis/v1beta1" - nkgAPI "github.com/nginxinc/nginx-kubernetes-gateway/apis/v1alpha1" - "github.com/nginxinc/nginx-kubernetes-gateway/internal/framework/conditions" + ngfAPI "github.com/nginxinc/nginx-gateway-fabric/apis/v1alpha1" + "github.com/nginxinc/nginx-gateway-fabric/internal/framework/conditions" ) const ( @@ -546,9 +546,9 @@ func NewGatewayConflictNotProgrammed() conditions.Condition { // NewNginxGatewayValid returns a Condition that indicates that the NginxGateway config is valid. func NewNginxGatewayValid() conditions.Condition { return conditions.Condition{ - Type: string(nkgAPI.NginxGatewayConditionValid), + Type: string(ngfAPI.NginxGatewayConditionValid), Status: metav1.ConditionTrue, - Reason: string(nkgAPI.NginxGatewayReasonValid), + Reason: string(ngfAPI.NginxGatewayReasonValid), Message: "NginxGateway is valid", } } @@ -556,9 +556,9 @@ func NewNginxGatewayValid() conditions.Condition { // NewNginxGatewayInvalid returns a Condition that indicates that the NginxGateway config is invalid. func NewNginxGatewayInvalid(msg string) conditions.Condition { return conditions.Condition{ - Type: string(nkgAPI.NginxGatewayConditionValid), + Type: string(ngfAPI.NginxGatewayConditionValid), Status: metav1.ConditionFalse, - Reason: string(nkgAPI.NginxGatewayReasonInvalid), + Reason: string(ngfAPI.NginxGatewayReasonInvalid), Message: msg, } } diff --git a/internal/mode/static/state/conditions/conditions_test.go b/internal/mode/static/state/conditions/conditions_test.go index 2f7aea48b9..8729994c29 100644 --- a/internal/mode/static/state/conditions/conditions_test.go +++ b/internal/mode/static/state/conditions/conditions_test.go @@ -6,7 +6,7 @@ import ( . "github.com/onsi/gomega" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "github.com/nginxinc/nginx-kubernetes-gateway/internal/framework/conditions" + "github.com/nginxinc/nginx-gateway-fabric/internal/framework/conditions" ) func TestDeduplicateConditions(t *testing.T) { diff --git a/internal/mode/static/state/dataplane/configuration.go b/internal/mode/static/state/dataplane/configuration.go index d438c1ec66..f47eed14f2 100644 --- a/internal/mode/static/state/dataplane/configuration.go +++ b/internal/mode/static/state/dataplane/configuration.go @@ -9,8 +9,8 @@ import ( "k8s.io/apimachinery/pkg/types" "sigs.k8s.io/gateway-api/apis/v1beta1" - "github.com/nginxinc/nginx-kubernetes-gateway/internal/mode/static/state/graph" - "github.com/nginxinc/nginx-kubernetes-gateway/internal/mode/static/state/resolver" + "github.com/nginxinc/nginx-gateway-fabric/internal/mode/static/state/graph" + "github.com/nginxinc/nginx-gateway-fabric/internal/mode/static/state/resolver" ) const wildcardHostname = "~^" diff --git a/internal/mode/static/state/dataplane/configuration_test.go b/internal/mode/static/state/dataplane/configuration_test.go index 4e8ecc3c64..a2c819edae 100644 --- a/internal/mode/static/state/dataplane/configuration_test.go +++ b/internal/mode/static/state/dataplane/configuration_test.go @@ -13,10 +13,10 @@ import ( "sigs.k8s.io/controller-runtime/pkg/client" "sigs.k8s.io/gateway-api/apis/v1beta1" - "github.com/nginxinc/nginx-kubernetes-gateway/internal/framework/helpers" - "github.com/nginxinc/nginx-kubernetes-gateway/internal/mode/static/state/graph" - "github.com/nginxinc/nginx-kubernetes-gateway/internal/mode/static/state/resolver" - "github.com/nginxinc/nginx-kubernetes-gateway/internal/mode/static/state/resolver/resolverfakes" + "github.com/nginxinc/nginx-gateway-fabric/internal/framework/helpers" + "github.com/nginxinc/nginx-gateway-fabric/internal/mode/static/state/graph" + "github.com/nginxinc/nginx-gateway-fabric/internal/mode/static/state/resolver" + "github.com/nginxinc/nginx-gateway-fabric/internal/mode/static/state/resolver/resolverfakes" ) func TestBuildConfiguration(t *testing.T) { diff --git a/internal/mode/static/state/dataplane/convert_test.go b/internal/mode/static/state/dataplane/convert_test.go index 19ea4bf232..0d944d6e37 100644 --- a/internal/mode/static/state/dataplane/convert_test.go +++ b/internal/mode/static/state/dataplane/convert_test.go @@ -6,7 +6,7 @@ import ( . "github.com/onsi/gomega" "sigs.k8s.io/gateway-api/apis/v1beta1" - "github.com/nginxinc/nginx-kubernetes-gateway/internal/framework/helpers" + "github.com/nginxinc/nginx-gateway-fabric/internal/framework/helpers" ) func TestConvertMatch(t *testing.T) { diff --git a/internal/mode/static/state/dataplane/sort.go b/internal/mode/static/state/dataplane/sort.go index 23c4c19bff..553d522768 100644 --- a/internal/mode/static/state/dataplane/sort.go +++ b/internal/mode/static/state/dataplane/sort.go @@ -3,7 +3,7 @@ package dataplane import ( "sort" - nkgsort "github.com/nginxinc/nginx-kubernetes-gateway/internal/mode/static/sort" + ngfsort "github.com/nginxinc/nginx-gateway-fabric/internal/mode/static/sort" ) func sortMatchRules(matchRules []MatchRule) { @@ -67,5 +67,5 @@ func higherPriority(rule1, rule2 MatchRule) bool { } // If still tied, compare the object meta of the two routes. - return nkgsort.LessObjectMeta(rule1.Source, rule2.Source) + return ngfsort.LessObjectMeta(rule1.Source, rule2.Source) } diff --git a/internal/mode/static/state/dataplane/sort_test.go b/internal/mode/static/state/dataplane/sort_test.go index edaca77da3..9ab1ca5b4b 100644 --- a/internal/mode/static/state/dataplane/sort_test.go +++ b/internal/mode/static/state/dataplane/sort_test.go @@ -8,7 +8,7 @@ import ( . "github.com/onsi/gomega" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "github.com/nginxinc/nginx-kubernetes-gateway/internal/framework/helpers" + "github.com/nginxinc/nginx-gateway-fabric/internal/framework/helpers" ) func TestSort(t *testing.T) { diff --git a/internal/mode/static/state/dataplane/types.go b/internal/mode/static/state/dataplane/types.go index 9964227829..98d61c73f5 100644 --- a/internal/mode/static/state/dataplane/types.go +++ b/internal/mode/static/state/dataplane/types.go @@ -6,7 +6,7 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/types" - "github.com/nginxinc/nginx-kubernetes-gateway/internal/mode/static/state/resolver" + "github.com/nginxinc/nginx-gateway-fabric/internal/mode/static/state/resolver" ) // PathType is the type of the path in a PathRule. diff --git a/internal/mode/static/state/graph/backend_refs.go b/internal/mode/static/state/graph/backend_refs.go index a5a9b2b42f..2bfbb5695d 100644 --- a/internal/mode/static/state/graph/backend_refs.go +++ b/internal/mode/static/state/graph/backend_refs.go @@ -8,8 +8,8 @@ import ( "k8s.io/apimachinery/pkg/util/validation/field" "sigs.k8s.io/gateway-api/apis/v1beta1" - "github.com/nginxinc/nginx-kubernetes-gateway/internal/framework/conditions" - staticConds "github.com/nginxinc/nginx-kubernetes-gateway/internal/mode/static/state/conditions" + "github.com/nginxinc/nginx-gateway-fabric/internal/framework/conditions" + staticConds "github.com/nginxinc/nginx-gateway-fabric/internal/mode/static/state/conditions" ) // BackendRef is an internal representation of a backendRef in an HTTPRoute. diff --git a/internal/mode/static/state/graph/backend_refs_test.go b/internal/mode/static/state/graph/backend_refs_test.go index 2cd03de6d3..b5ed7e5f91 100644 --- a/internal/mode/static/state/graph/backend_refs_test.go +++ b/internal/mode/static/state/graph/backend_refs_test.go @@ -11,9 +11,9 @@ import ( "sigs.k8s.io/controller-runtime/pkg/client" "sigs.k8s.io/gateway-api/apis/v1beta1" - "github.com/nginxinc/nginx-kubernetes-gateway/internal/framework/conditions" - "github.com/nginxinc/nginx-kubernetes-gateway/internal/framework/helpers" - staticConds "github.com/nginxinc/nginx-kubernetes-gateway/internal/mode/static/state/conditions" + "github.com/nginxinc/nginx-gateway-fabric/internal/framework/conditions" + "github.com/nginxinc/nginx-gateway-fabric/internal/framework/helpers" + staticConds "github.com/nginxinc/nginx-gateway-fabric/internal/mode/static/state/conditions" ) func getNormalRef() v1beta1.BackendRef { diff --git a/internal/mode/static/state/graph/gateway.go b/internal/mode/static/state/graph/gateway.go index 908aa7ef19..a7eb0b150c 100644 --- a/internal/mode/static/state/graph/gateway.go +++ b/internal/mode/static/state/graph/gateway.go @@ -8,9 +8,9 @@ import ( "sigs.k8s.io/controller-runtime/pkg/client" "sigs.k8s.io/gateway-api/apis/v1beta1" - "github.com/nginxinc/nginx-kubernetes-gateway/internal/framework/conditions" - nkgsort "github.com/nginxinc/nginx-kubernetes-gateway/internal/mode/static/sort" - staticConds "github.com/nginxinc/nginx-kubernetes-gateway/internal/mode/static/state/conditions" + "github.com/nginxinc/nginx-gateway-fabric/internal/framework/conditions" + ngfsort "github.com/nginxinc/nginx-gateway-fabric/internal/mode/static/sort" + staticConds "github.com/nginxinc/nginx-gateway-fabric/internal/mode/static/state/conditions" ) // Gateway represents the winning Gateway resource. @@ -25,13 +25,13 @@ type Gateway struct { Valid bool } -// processedGateways holds the resources that belong to NKG. +// processedGateways holds the resources that belong to NGF. type processedGateways struct { Winner *v1beta1.Gateway Ignored map[types.NamespacedName]*v1beta1.Gateway } -// GetAllNsNames returns all the NamespacedNames of the Gateway resources that belong to NKG +// GetAllNsNames returns all the NamespacedNames of the Gateway resources that belong to NGF func (gws processedGateways) GetAllNsNames() []types.NamespacedName { winnerCnt := 0 if gws.Winner != nil { @@ -55,7 +55,7 @@ func (gws processedGateways) GetAllNsNames() []types.NamespacedName { return allNsNames } -// processGateways determines which Gateway resource belong to NKG (determined by the Gateway GatewayClassName field). +// processGateways determines which Gateway resource belong to NGF (determined by the Gateway GatewayClassName field). func processGateways( gws map[types.NamespacedName]*v1beta1.Gateway, gcName string, @@ -75,7 +75,7 @@ func processGateways( } sort.Slice(referencedGws, func(i, j int) bool { - return nkgsort.LessObjectMeta(&referencedGws[i].ObjectMeta, &referencedGws[j].ObjectMeta) + return ngfsort.LessObjectMeta(&referencedGws[i].ObjectMeta, &referencedGws[j].ObjectMeta) }) ignoredGws := make(map[types.NamespacedName]*v1beta1.Gateway) diff --git a/internal/mode/static/state/graph/gateway_listener.go b/internal/mode/static/state/graph/gateway_listener.go index eb77ab2902..5bea0aa545 100644 --- a/internal/mode/static/state/graph/gateway_listener.go +++ b/internal/mode/static/state/graph/gateway_listener.go @@ -10,8 +10,8 @@ import ( "k8s.io/apimachinery/pkg/util/validation/field" "sigs.k8s.io/gateway-api/apis/v1beta1" - "github.com/nginxinc/nginx-kubernetes-gateway/internal/framework/conditions" - staticConds "github.com/nginxinc/nginx-kubernetes-gateway/internal/mode/static/state/conditions" + "github.com/nginxinc/nginx-gateway-fabric/internal/framework/conditions" + staticConds "github.com/nginxinc/nginx-gateway-fabric/internal/mode/static/state/conditions" ) // Listener represents a Listener of the Gateway resource. @@ -32,7 +32,7 @@ type Listener struct { // SupportedKinds is the list of RouteGroupKinds allowed by the listener. SupportedKinds []v1beta1.RouteGroupKind // Valid shows whether the Listener is valid. - // A Listener is considered valid if NKG can generate valid NGINX configuration for it. + // A Listener is considered valid if NGF can generate valid NGINX configuration for it. Valid bool } diff --git a/internal/mode/static/state/graph/gateway_listener_test.go b/internal/mode/static/state/graph/gateway_listener_test.go index ed4689e1ab..a1b25bf08f 100644 --- a/internal/mode/static/state/graph/gateway_listener_test.go +++ b/internal/mode/static/state/graph/gateway_listener_test.go @@ -8,9 +8,9 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "sigs.k8s.io/gateway-api/apis/v1beta1" - "github.com/nginxinc/nginx-kubernetes-gateway/internal/framework/conditions" - "github.com/nginxinc/nginx-kubernetes-gateway/internal/framework/helpers" - staticConds "github.com/nginxinc/nginx-kubernetes-gateway/internal/mode/static/state/conditions" + "github.com/nginxinc/nginx-gateway-fabric/internal/framework/conditions" + "github.com/nginxinc/nginx-gateway-fabric/internal/framework/helpers" + staticConds "github.com/nginxinc/nginx-gateway-fabric/internal/mode/static/state/conditions" ) func TestValidateHTTPListener(t *testing.T) { diff --git a/internal/mode/static/state/graph/gateway_test.go b/internal/mode/static/state/graph/gateway_test.go index f500c74cfc..6816e6c5a5 100644 --- a/internal/mode/static/state/graph/gateway_test.go +++ b/internal/mode/static/state/graph/gateway_test.go @@ -12,8 +12,8 @@ import ( "sigs.k8s.io/controller-runtime/pkg/client" "sigs.k8s.io/gateway-api/apis/v1beta1" - "github.com/nginxinc/nginx-kubernetes-gateway/internal/framework/helpers" - staticConds "github.com/nginxinc/nginx-kubernetes-gateway/internal/mode/static/state/conditions" + "github.com/nginxinc/nginx-gateway-fabric/internal/framework/helpers" + staticConds "github.com/nginxinc/nginx-gateway-fabric/internal/mode/static/state/conditions" ) func TestProcessedGatewaysGetAllNsNames(t *testing.T) { diff --git a/internal/mode/static/state/graph/gatewayclass.go b/internal/mode/static/state/graph/gatewayclass.go index feb0e7989f..819f7a4860 100644 --- a/internal/mode/static/state/graph/gatewayclass.go +++ b/internal/mode/static/state/graph/gatewayclass.go @@ -6,8 +6,8 @@ import ( "sigs.k8s.io/controller-runtime/pkg/client" "sigs.k8s.io/gateway-api/apis/v1beta1" - "github.com/nginxinc/nginx-kubernetes-gateway/internal/framework/conditions" - staticConds "github.com/nginxinc/nginx-kubernetes-gateway/internal/mode/static/state/conditions" + "github.com/nginxinc/nginx-gateway-fabric/internal/framework/conditions" + staticConds "github.com/nginxinc/nginx-gateway-fabric/internal/mode/static/state/conditions" ) // GatewayClass represents the GatewayClass resource. @@ -20,7 +20,7 @@ type GatewayClass struct { Valid bool } -// processedGatewayClasses holds the resources that belong to NKG. +// processedGatewayClasses holds the resources that belong to NGF. type processedGatewayClasses struct { Winner *v1beta1.GatewayClass Ignored map[types.NamespacedName]*v1beta1.GatewayClass diff --git a/internal/mode/static/state/graph/gatewayclass_test.go b/internal/mode/static/state/graph/gatewayclass_test.go index 0ec15001d7..b5e899b00b 100644 --- a/internal/mode/static/state/graph/gatewayclass_test.go +++ b/internal/mode/static/state/graph/gatewayclass_test.go @@ -9,9 +9,9 @@ import ( "sigs.k8s.io/controller-runtime/pkg/client" "sigs.k8s.io/gateway-api/apis/v1beta1" - "github.com/nginxinc/nginx-kubernetes-gateway/internal/framework/conditions" - "github.com/nginxinc/nginx-kubernetes-gateway/internal/framework/helpers" - staticConds "github.com/nginxinc/nginx-kubernetes-gateway/internal/mode/static/state/conditions" + "github.com/nginxinc/nginx-gateway-fabric/internal/framework/conditions" + "github.com/nginxinc/nginx-gateway-fabric/internal/framework/helpers" + staticConds "github.com/nginxinc/nginx-gateway-fabric/internal/mode/static/state/conditions" ) func TestProcessGatewayClasses(t *testing.T) { diff --git a/internal/mode/static/state/graph/graph.go b/internal/mode/static/state/graph/graph.go index cc9ab1da4b..f5b0102ead 100644 --- a/internal/mode/static/state/graph/graph.go +++ b/internal/mode/static/state/graph/graph.go @@ -6,7 +6,7 @@ import ( "sigs.k8s.io/controller-runtime/pkg/client" "sigs.k8s.io/gateway-api/apis/v1beta1" - "github.com/nginxinc/nginx-kubernetes-gateway/internal/mode/static/state/validation" + "github.com/nginxinc/nginx-gateway-fabric/internal/mode/static/state/validation" ) // ClusterState includes cluster resources necessary to build the Graph. @@ -26,13 +26,13 @@ type Graph struct { GatewayClass *GatewayClass // Gateway holds the winning Gateway resource. Gateway *Gateway - // IgnoredGatewayClasses holds the ignored GatewayClass resources, which reference NGINX Gateway in the - // controllerName, but are not configured via the NGINX Gateway CLI argument. It doesn't hold the GatewayClass - // resources that do not belong to the NGINX Gateway. + // IgnoredGatewayClasses holds the ignored GatewayClass resources, which reference NGINX Gateway Fabric in the + // controllerName, but are not configured via the NGINX Gateway Fabric CLI argument. It doesn't hold the GatewayClass + // resources that do not belong to the NGINX Gateway Fabric. IgnoredGatewayClasses map[types.NamespacedName]*v1beta1.GatewayClass - // IgnoredGateways holds the ignored Gateway resources, which belong to the NGINX Gateway (based on the + // IgnoredGateways holds the ignored Gateway resources, which belong to the NGINX Gateway Fabric (based on the // GatewayClassName field of the resource) but ignored. It doesn't hold the Gateway resources that do not belong to - // the NGINX Gateway. + // the NGINX Gateway Fabric. IgnoredGateways map[types.NamespacedName]*v1beta1.Gateway // Routes holds Route resources. Routes map[types.NamespacedName]*Route @@ -51,7 +51,7 @@ func (g *Graph) IsReferenced(resourceType client.Object, nsname types.Namespaced // FIMXE(pleshakov): For now, only works with Secrets. // Support EndpointSlices and Namespaces so that we can remove relationship.Capturer and use the Graph // as source to determine the relationships. - // See https://github.com/nginxinc/nginx-kubernetes-gateway/issues/824 + // See https://github.com/nginxinc/nginx-gateway-fabric/issues/824 switch resourceType.(type) { case *v1.Secret: diff --git a/internal/mode/static/state/graph/graph_test.go b/internal/mode/static/state/graph/graph_test.go index d7340036ac..bdd16771c0 100644 --- a/internal/mode/static/state/graph/graph_test.go +++ b/internal/mode/static/state/graph/graph_test.go @@ -11,9 +11,9 @@ import ( "sigs.k8s.io/controller-runtime/pkg/client" "sigs.k8s.io/gateway-api/apis/v1beta1" - "github.com/nginxinc/nginx-kubernetes-gateway/internal/framework/helpers" - "github.com/nginxinc/nginx-kubernetes-gateway/internal/mode/static/state/validation" - "github.com/nginxinc/nginx-kubernetes-gateway/internal/mode/static/state/validation/validationfakes" + "github.com/nginxinc/nginx-gateway-fabric/internal/framework/helpers" + "github.com/nginxinc/nginx-gateway-fabric/internal/mode/static/state/validation" + "github.com/nginxinc/nginx-gateway-fabric/internal/mode/static/state/validation/validationfakes" ) func TestBuildGraph(t *testing.T) { diff --git a/internal/mode/static/state/graph/httproute.go b/internal/mode/static/state/graph/httproute.go index 39edf32ade..5a6dc0966e 100644 --- a/internal/mode/static/state/graph/httproute.go +++ b/internal/mode/static/state/graph/httproute.go @@ -12,9 +12,9 @@ import ( "sigs.k8s.io/controller-runtime/pkg/client" "sigs.k8s.io/gateway-api/apis/v1beta1" - "github.com/nginxinc/nginx-kubernetes-gateway/internal/framework/conditions" - staticConds "github.com/nginxinc/nginx-kubernetes-gateway/internal/mode/static/state/conditions" - "github.com/nginxinc/nginx-kubernetes-gateway/internal/mode/static/state/validation" + "github.com/nginxinc/nginx-gateway-fabric/internal/framework/conditions" + staticConds "github.com/nginxinc/nginx-gateway-fabric/internal/mode/static/state/conditions" + "github.com/nginxinc/nginx-gateway-fabric/internal/mode/static/state/validation" ) const wildcardHostname = "~^" @@ -24,7 +24,7 @@ type Rule struct { // BackendRefs is a list of BackendRefs for the rule. BackendRefs []BackendRef // ValidMatches indicates whether the matches of the rule are valid. - // If the matches are invalid, NGK should not generate any configuration for the rule. + // If the matches are invalid, NGF should not generate any configuration for the rule. ValidMatches bool // ValidFilters indicates whether the filters of the rule are valid. // If the filters are invalid, the data-plane should return 500 error provided that the matches are valid. @@ -33,7 +33,7 @@ type Rule struct { // ParentRef describes a reference to a parent in an HTTPRoute. type ParentRef struct { - // Attachment is the attachment status of the ParentRef. It could be nil. In that case, NGK didn't attempt to + // Attachment is the attachment status of the ParentRef. It could be nil. In that case, NGF didn't attempt to // attach because of problems with the Route. Attachment *ParentRefAttachmentStatus // Gateway is the NamespacedName of the referenced Gateway @@ -58,7 +58,7 @@ type ParentRefAttachmentStatus struct { type Route struct { // Source is the source resource of the Route. Source *v1beta1.HTTPRoute - // ParentRefs includes ParentRefs with NKG Gateways only. + // ParentRefs includes ParentRefs with NGF Gateways only. ParentRefs []ParentRef // Conditions include Conditions for the HTTPRoute. Conditions []conditions.Condition @@ -66,7 +66,7 @@ type Route struct { // If the Route is invalid, this field is nil Rules []Rule // Valid tells if the Route is valid. - // If it is invalid, NGK should not generate any configuration for it. + // If it is invalid, NGF should not generate any configuration for it. Valid bool } @@ -234,7 +234,7 @@ func buildRoute( if atLeastOneValid { // FIXME(pleshakov): Partial validity for HTTPRoute rules is not defined in the Gateway API spec yet. - // See https://github.com/nginxinc/nginx-kubernetes-gateway/issues/485 + // See https://github.com/nginxinc/nginx-gateway-fabric/issues/485 msg = "Some rules are invalid: " + msg r.Conditions = append(r.Conditions, staticConds.NewTODO(msg)) } else { diff --git a/internal/mode/static/state/graph/httproute_test.go b/internal/mode/static/state/graph/httproute_test.go index 557ac1b9e8..4d3fa26bb4 100644 --- a/internal/mode/static/state/graph/httproute_test.go +++ b/internal/mode/static/state/graph/httproute_test.go @@ -13,10 +13,10 @@ import ( "sigs.k8s.io/controller-runtime/pkg/client" "sigs.k8s.io/gateway-api/apis/v1beta1" - "github.com/nginxinc/nginx-kubernetes-gateway/internal/framework/conditions" - "github.com/nginxinc/nginx-kubernetes-gateway/internal/framework/helpers" - staticConds "github.com/nginxinc/nginx-kubernetes-gateway/internal/mode/static/state/conditions" - "github.com/nginxinc/nginx-kubernetes-gateway/internal/mode/static/state/validation/validationfakes" + "github.com/nginxinc/nginx-gateway-fabric/internal/framework/conditions" + "github.com/nginxinc/nginx-gateway-fabric/internal/framework/helpers" + staticConds "github.com/nginxinc/nginx-gateway-fabric/internal/mode/static/state/conditions" + "github.com/nginxinc/nginx-gateway-fabric/internal/mode/static/state/validation/validationfakes" ) const ( @@ -348,7 +348,7 @@ func TestBuildRoute(t *testing.T) { addFilterToPath(hr, "/filter", validFilter) hrInvalidHostname := createHTTPRoute("hr", gatewayNsName.Name, "", "/") - hrNotNKG := createHTTPRoute("hr", "some-gateway", "example.com", "/") + hrNotNGF := createHTTPRoute("hr", "some-gateway", "example.com", "/") hrInvalidMatches := createHTTPRoute("hr", gatewayNsName.Name, "example.com", invalidPath) hrInvalidFilters := createHTTPRoute("hr", gatewayNsName.Name, "example.com", "/filter") @@ -405,9 +405,9 @@ func TestBuildRoute(t *testing.T) { }, { validator: &validationfakes.FakeHTTPFieldsValidator{}, - hr: hrNotNKG, + hr: hrNotNGF, expected: nil, - name: "not NKG route", + name: "not NGF route", }, { validator: &validationfakes.FakeHTTPFieldsValidator{}, diff --git a/internal/mode/static/state/graph/reference_grant_test.go b/internal/mode/static/state/graph/reference_grant_test.go index eba07e3de1..aa84446b92 100644 --- a/internal/mode/static/state/graph/reference_grant_test.go +++ b/internal/mode/static/state/graph/reference_grant_test.go @@ -7,7 +7,7 @@ import ( "k8s.io/apimachinery/pkg/types" "sigs.k8s.io/gateway-api/apis/v1beta1" - "github.com/nginxinc/nginx-kubernetes-gateway/internal/framework/helpers" + "github.com/nginxinc/nginx-gateway-fabric/internal/framework/helpers" ) func TestReferenceGrantResolver(t *testing.T) { diff --git a/internal/mode/static/state/graph/validation.go b/internal/mode/static/state/graph/validation.go index 9103533140..049721c20c 100644 --- a/internal/mode/static/state/graph/validation.go +++ b/internal/mode/static/state/graph/validation.go @@ -32,7 +32,7 @@ func validateHostname(hostname string) error { } // panicForBrokenWebhookAssumption panics with the error message because an assumption about the webhook validation -// (run by NKG) is broken. +// (run by NGF) is broken. // Use it when you expect a validated Gateway API resource, but the actual resource breaks the validation constraints. // For example, a field that must not be nil is nil. func panicForBrokenWebhookAssumption(err error) { diff --git a/internal/mode/static/state/relationship/capturer.go b/internal/mode/static/state/relationship/capturer.go index ed2a784ea4..bd76ccd5e3 100644 --- a/internal/mode/static/state/relationship/capturer.go +++ b/internal/mode/static/state/relationship/capturer.go @@ -9,8 +9,8 @@ import ( "sigs.k8s.io/controller-runtime/pkg/client" "sigs.k8s.io/gateway-api/apis/v1beta1" - "github.com/nginxinc/nginx-kubernetes-gateway/internal/framework/controller/index" - "github.com/nginxinc/nginx-kubernetes-gateway/internal/mode/static/state/graph" + "github.com/nginxinc/nginx-gateway-fabric/internal/framework/controller/index" + "github.com/nginxinc/nginx-gateway-fabric/internal/mode/static/state/graph" ) //go:generate go run github.com/maxbrunsfeld/counterfeiter/v6 . Capturer diff --git a/internal/mode/static/state/relationship/capturer_test.go b/internal/mode/static/state/relationship/capturer_test.go index f62baf085f..8f9321ef4b 100644 --- a/internal/mode/static/state/relationship/capturer_test.go +++ b/internal/mode/static/state/relationship/capturer_test.go @@ -10,9 +10,9 @@ import ( "sigs.k8s.io/controller-runtime/pkg/client" "sigs.k8s.io/gateway-api/apis/v1beta1" - "github.com/nginxinc/nginx-kubernetes-gateway/internal/framework/controller/index" - "github.com/nginxinc/nginx-kubernetes-gateway/internal/framework/helpers" - "github.com/nginxinc/nginx-kubernetes-gateway/internal/mode/static/state/relationship" + "github.com/nginxinc/nginx-gateway-fabric/internal/framework/controller/index" + "github.com/nginxinc/nginx-gateway-fabric/internal/framework/helpers" + "github.com/nginxinc/nginx-gateway-fabric/internal/mode/static/state/relationship" ) func createBackendRefs(backendNames ...v1beta1.ObjectName) []v1beta1.HTTPBackendRef { diff --git a/internal/mode/static/state/relationship/relationshipfakes/fake_capturer.go b/internal/mode/static/state/relationship/relationshipfakes/fake_capturer.go index 7f85ab6f8f..ea4f3b6783 100644 --- a/internal/mode/static/state/relationship/relationshipfakes/fake_capturer.go +++ b/internal/mode/static/state/relationship/relationshipfakes/fake_capturer.go @@ -4,7 +4,7 @@ package relationshipfakes import ( "sync" - "github.com/nginxinc/nginx-kubernetes-gateway/internal/mode/static/state/relationship" + "github.com/nginxinc/nginx-gateway-fabric/internal/mode/static/state/relationship" "k8s.io/apimachinery/pkg/types" "sigs.k8s.io/controller-runtime/pkg/client" ) diff --git a/internal/mode/static/state/relationship/relationships_test.go b/internal/mode/static/state/relationship/relationships_test.go index 74d6f3f885..838ac52172 100644 --- a/internal/mode/static/state/relationship/relationships_test.go +++ b/internal/mode/static/state/relationship/relationships_test.go @@ -8,7 +8,7 @@ import ( "k8s.io/apimachinery/pkg/types" "sigs.k8s.io/gateway-api/apis/v1beta1" - "github.com/nginxinc/nginx-kubernetes-gateway/internal/framework/helpers" + "github.com/nginxinc/nginx-gateway-fabric/internal/framework/helpers" ) func TestGetBackendServiceNamesFromRoute(t *testing.T) { diff --git a/internal/mode/static/state/resolver/resolver.go b/internal/mode/static/state/resolver/resolver.go index 149edcbb09..2dab45a392 100644 --- a/internal/mode/static/state/resolver/resolver.go +++ b/internal/mode/static/state/resolver/resolver.go @@ -10,7 +10,7 @@ import ( "k8s.io/apimachinery/pkg/util/intstr" "sigs.k8s.io/controller-runtime/pkg/client" - "github.com/nginxinc/nginx-kubernetes-gateway/internal/framework/controller/index" + "github.com/nginxinc/nginx-gateway-fabric/internal/framework/controller/index" ) //go:generate go run github.com/maxbrunsfeld/counterfeiter/v6 . ServiceResolver diff --git a/internal/mode/static/state/resolver/resolver_test.go b/internal/mode/static/state/resolver/resolver_test.go index bf20e37d59..baedda7f96 100644 --- a/internal/mode/static/state/resolver/resolver_test.go +++ b/internal/mode/static/state/resolver/resolver_test.go @@ -9,7 +9,7 @@ import ( discoveryV1 "k8s.io/api/discovery/v1" "k8s.io/apimachinery/pkg/util/intstr" - "github.com/nginxinc/nginx-kubernetes-gateway/internal/framework/helpers" + "github.com/nginxinc/nginx-gateway-fabric/internal/framework/helpers" ) var ( diff --git a/internal/mode/static/state/resolver/resolverfakes/fake_service_resolver.go b/internal/mode/static/state/resolver/resolverfakes/fake_service_resolver.go index 06f223d39b..c1116462fb 100644 --- a/internal/mode/static/state/resolver/resolverfakes/fake_service_resolver.go +++ b/internal/mode/static/state/resolver/resolverfakes/fake_service_resolver.go @@ -5,7 +5,7 @@ import ( "context" "sync" - "github.com/nginxinc/nginx-kubernetes-gateway/internal/mode/static/state/resolver" + "github.com/nginxinc/nginx-gateway-fabric/internal/mode/static/state/resolver" v1 "k8s.io/api/core/v1" ) diff --git a/internal/mode/static/state/resolver/service_resolver_test.go b/internal/mode/static/state/resolver/service_resolver_test.go index 741e49896d..412eb72fc1 100644 --- a/internal/mode/static/state/resolver/service_resolver_test.go +++ b/internal/mode/static/state/resolver/service_resolver_test.go @@ -13,9 +13,9 @@ import ( "sigs.k8s.io/controller-runtime/pkg/client" "sigs.k8s.io/controller-runtime/pkg/client/fake" - "github.com/nginxinc/nginx-kubernetes-gateway/internal/framework/controller/index" - "github.com/nginxinc/nginx-kubernetes-gateway/internal/framework/helpers" - "github.com/nginxinc/nginx-kubernetes-gateway/internal/mode/static/state/resolver" + "github.com/nginxinc/nginx-gateway-fabric/internal/framework/controller/index" + "github.com/nginxinc/nginx-gateway-fabric/internal/framework/helpers" + "github.com/nginxinc/nginx-gateway-fabric/internal/mode/static/state/resolver" ) func createSlice( diff --git a/internal/mode/static/state/statefakes/fake_change_processor.go b/internal/mode/static/state/statefakes/fake_change_processor.go index b24b784043..69a69af7b9 100644 --- a/internal/mode/static/state/statefakes/fake_change_processor.go +++ b/internal/mode/static/state/statefakes/fake_change_processor.go @@ -4,8 +4,8 @@ package statefakes import ( "sync" - "github.com/nginxinc/nginx-kubernetes-gateway/internal/mode/static/state" - "github.com/nginxinc/nginx-kubernetes-gateway/internal/mode/static/state/graph" + "github.com/nginxinc/nginx-gateway-fabric/internal/mode/static/state" + "github.com/nginxinc/nginx-gateway-fabric/internal/mode/static/state/graph" "k8s.io/apimachinery/pkg/types" "sigs.k8s.io/controller-runtime/pkg/client" ) diff --git a/internal/mode/static/state/store.go b/internal/mode/static/state/store.go index 40663ce458..5e776d0ce2 100644 --- a/internal/mode/static/state/store.go +++ b/internal/mode/static/state/store.go @@ -9,7 +9,7 @@ import ( "k8s.io/client-go/tools/record" "sigs.k8s.io/controller-runtime/pkg/client" - "github.com/nginxinc/nginx-kubernetes-gateway/internal/mode/static/state/relationship" + "github.com/nginxinc/nginx-gateway-fabric/internal/mode/static/state/relationship" ) // Updater updates the cluster state. @@ -214,7 +214,7 @@ func (s *changeTrackingUpdater) Upsert(obj client.Object) { // FIXME(pleshakov): Check generation in all cases to minimize the number of Graph regeneration. // s.changed can be true even if the generation of the object did not change, because // capturer and triggerStateChange don't take the generation into account. - // See https://github.com/nginxinc/nginx-kubernetes-gateway/issues/825 + // See https://github.com/nginxinc/nginx-gateway-fabric/issues/825 s.changed = s.changed || changingUpsert || relationshipExisted || relationshipExists || forceChanged } @@ -285,7 +285,7 @@ func (u *validatingUpsertUpdater) Upsert(obj client.Object) { obj, apiv1.EventTypeWarning, "Rejected", - "%s; NKG will delete any existing NGINX configuration that corresponds to the resource", + "%s; NGF will delete any existing NGINX configuration that corresponds to the resource", err.Error(), ) diff --git a/internal/mode/static/state/validation/validationfakes/fake_httpfields_validator.go b/internal/mode/static/state/validation/validationfakes/fake_httpfields_validator.go index f19519a322..4a82f1c08c 100644 --- a/internal/mode/static/state/validation/validationfakes/fake_httpfields_validator.go +++ b/internal/mode/static/state/validation/validationfakes/fake_httpfields_validator.go @@ -4,7 +4,7 @@ package validationfakes import ( "sync" - "github.com/nginxinc/nginx-kubernetes-gateway/internal/mode/static/state/validation" + "github.com/nginxinc/nginx-gateway-fabric/internal/mode/static/state/validation" ) type FakeHTTPFieldsValidator struct { diff --git a/internal/mode/static/state/validation/validator.go b/internal/mode/static/state/validation/validator.go index ad06077c65..d1ff623853 100644 --- a/internal/mode/static/state/validation/validator.go +++ b/internal/mode/static/state/validation/validator.go @@ -2,7 +2,7 @@ package validation // Validators include validators for Gateway API resources from the perspective of a data-plane. // It is used for fields that propagate into the data plane configuration. For example, the path in a routing rule. -// However, not all such fields are validated: NKG will not validate a field using Validators if it is confident that +// However, not all such fields are validated: NGF will not validate a field using Validators if it is confident that // the field is valid. type Validators struct { HTTPFieldsValidator HTTPFieldsValidator