diff --git a/.dockerignore b/.dockerignore index 6d789f2621..41731ddce8 100644 --- a/.dockerignore +++ b/.dockerignore @@ -4,7 +4,9 @@ grafana tests/.pytest_cache tests/__pycache__ hack -.git* +.git/modules +.git/rr-cache +.git/logs *.md *.crt *.key diff --git a/.github/actions/smoke-tests/action.yaml b/.github/actions/smoke-tests/action.yaml index 83857fe268..af5588a453 100644 --- a/.github/actions/smoke-tests/action.yaml +++ b/.github/actions/smoke-tests/action.yaml @@ -33,7 +33,7 @@ runs: using: composite steps: - name: Fetch Cached Artifacts - uses: actions/cache@v2 + uses: actions/cache@v3 with: path: ${{ github.workspace }}/dist key: nginx-ingress-${{ github.run_id }}-${{ github.run_number }}-single @@ -41,15 +41,15 @@ runs: - name: Ingress type id: ingress-type run: | - echo ::set-output name=name::nginx${{ contains(inputs.image, 'plus') && '-plus' || '' }}-ingress - echo ::set-output name=tag::${{ inputs.image }}${{ contains(inputs.image, 'nap') && '-dos' || '' }}-${{ github.sha }} + echo "name=nginx${{ contains(inputs.image, 'plus') && '-plus' || '' }}-ingress" >> $GITHUB_OUTPUT + echo "tag=${{ inputs.image }}${{ contains(inputs.image, 'nap') && '-dos' || '' }}-${{ github.sha }}" >> $GITHUB_OUTPUT shell: bash - name: Docker Buildx - uses: docker/setup-buildx-action@v1 + uses: docker/setup-buildx-action@v2 - name: Build ${{ inputs.image }} Container - uses: docker/build-push-action@v2 + uses: docker/build-push-action@v3 with: file: build/Dockerfile context: '.' @@ -68,7 +68,7 @@ runs: ${{ contains(inputs.image, 'plus') && format('"nginx-repo.key={0}"', inputs.nginx-key) || '' }} - name: Build Test-Runner Container - uses: docker/build-push-action@v2 + uses: docker/build-push-action@v3 with: file: tests/docker/Dockerfile context: '.' @@ -81,15 +81,13 @@ runs: - name: Deploy Kubernetes id: k8s run: | - # no support for dual stack in < 1.20, we need to use ipv4 only - printf '%s\n' "1.20.0" "${{ inputs.k8s-version }}" | sort --version-sort --check=quiet || echo "Using ipv4" && sed -i 's/dual/ipv4/g' ${{ github.workspace }}/tests/ci-files/ci-kind-config.yaml kind create cluster --name ${{ github.run_id }} --image=kindest/node:v${{ inputs.k8s-version }} --config ${{ github.workspace }}/tests/ci-files/ci-kind-config.yaml --kubeconfig kube-${{ github.run_id }} --wait ${{ inputs.k8s-timeout }} kind load docker-image docker.io/nginx/${{ steps.ingress-type.outputs.name }}:${{ steps.ingress-type.outputs.tag }} --name ${{ github.run_id }} marker="${{ inputs.marker }}" sanitized_marker="${marker// /_}" name="${sanitized_marker:-${{ inputs.k8s-version }}}" - echo ::set-output name=cluster_ip::$(docker inspect -f '{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' ${{ github.run_id }}-control-plane) - echo ::set-output name=cluster::$(echo nginx-${{ inputs.image }}-$name) + echo "cluster_ip=$(docker inspect -f '{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' ${{ github.run_id }}-control-plane)" >> $GITHUB_OUTPUT + echo "cluster=$(echo nginx-${{ inputs.image }}-$name)" >> $GITHUB_OUTPUT shell: bash - name: Setup Kubeconfig diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index bfad80c409..646d7bbeae 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -5,20 +5,12 @@ on: branches: - main - release-* - paths-ignore: - - 'docs/**' - - 'examples/**' - - '**.md' tags: - 'v[0-9]+.[0-9]+.[0-9]+' pull_request: branches: - main - release-* - paths-ignore: - - 'docs/**' - - 'examples/**' - - '**.md' types: - opened - reopened @@ -98,6 +90,8 @@ jobs: GOPATH: ${{ needs.checks.outputs.go_path }} AWS_PRODUCT_CODE: ${{ secrets.AWS_PRODUCT_CODE }} AWS_PUB_KEY: ${{ secrets.AWS_PUB_KEY }} + AWS_NAP_DOS_PRODUCT_CODE: ${{ secrets.AWS_NAP_DOS_PRODUCT_CODE }} + AWS_NAP_DOS_PUB_KEY: ${{ secrets.AWS_NAP_DOS_PUB_KEY }} - name: Store Artifacts in Cache uses: actions/cache@v3 with: @@ -226,8 +220,8 @@ jobs: {\"image\": \"debian-plus-nap\", \"marker\": \"dos\"}], \ \"k8s\": [\"${{ needs.checks.outputs.k8s_latest }}\"]}" else - echo "::set-output name=matrix::{\"k8s\": [\"1.19.16\", \"1.20.15\", \"1.21.14\", \"1.22.13\", \"1.23.10\", \"1.24.4\", \"${{ needs.checks.outputs.k8s_latest }}\"], \ - \"images\": [{\"image\": \"debian\"}, {\"image\": \"debian-plus\"}]}" + echo "matrix={\"k8s\": [\"1.21.14\", \"1.22.15\", \"1.23.13\", \"1.24.7\", \"${{ needs.checks.outputs.k8s_latest }}\"], \ + \"images\": [{\"image\": \"debian\"}, {\"image\": \"debian-plus\"}]}" >> $GITHUB_OUTPUT fi smoke-tests: @@ -315,7 +309,7 @@ jobs: if: startsWith(github.ref, 'refs/tags/') - name: Download Syft - uses: anchore/sbom-action/download-syft@v0.12.0 + uses: anchore/sbom-action/download-syft@v0.13.1 - name: Build binaries uses: goreleaser/goreleaser-action@v3 @@ -327,6 +321,13 @@ jobs: GOPATH: ${{ needs.checks.outputs.go_path }} AWS_PRODUCT_CODE: ${{ secrets.AWS_PRODUCT_CODE }} AWS_PUB_KEY: ${{ secrets.AWS_PUB_KEY }} + AWS_NAP_DOS_PRODUCT_CODE: ${{ secrets.AWS_NAP_DOS_PRODUCT_CODE }} + AWS_NAP_DOS_PUB_KEY: ${{ secrets.AWS_NAP_DOS_PUB_KEY }} + SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_COMMUNITY }} + AZURE_STORAGE_ACCOUNT: ${{ secrets.AZURE_STORAGE_ACCOUNT }} + AZURE_STORAGE_KEY: ${{ secrets.AZURE_STORAGE_KEY }} + AZURE_BUCKET_NAME: ${{ secrets.AZURE_BUCKET_NAME }} + - name: Store Artifacts in Cache uses: actions/cache@v3 with: @@ -345,7 +346,7 @@ jobs: platforms: ["linux/arm, linux/arm64, linux/amd64, linux/ppc64le, linux/s390x"] include: - image: ubi - platforms: "linux/arm64, linux/amd64, linux/s390x" + platforms: "linux/arm64, linux/amd64, linux/ppc64le, linux/s390x" steps: - name: Checkout Repository uses: actions/checkout@v3 @@ -448,7 +449,7 @@ jobs: BUILD_OS=${{ matrix.image }} IC_VERSION=${{ steps.var.outputs.ic_version }} - name: Run Trivy vulnerability scanner - uses: aquasecurity/trivy-action@0.7.1 + uses: aquasecurity/trivy-action@0.8.0 continue-on-error: true with: image-ref: nginx/nginx-ingress:${{ steps.meta.outputs.version }} @@ -488,6 +489,9 @@ jobs: - image: debian-plus-nap platforms: "linux/amd64" target: goreleaser + - image: debian-plus-nap + platforms: "linux/amd64" + target: aws steps: - name: Checkout Repository @@ -529,8 +533,10 @@ jobs: name=gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/dev/nginx-ic${{ contains(matrix.image, 'nap') && '-dos' || '' }}/nginx-plus-ingress name=gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/release/nginx-ic${{ contains(matrix.image, 'nap') && '-dos' || '' }}/nginx-plus-ingress,enable=${{ startsWith(github.ref, 'refs/tags/') }} name=gcr.io/f5-gcs-7899-ptg-ingrss-ctlr/staging/nginx-ic${{ contains(matrix.image, 'nap') && '-dos' || '' }}/nginx-plus-ingress,enable=${{ startsWith(github.ref, 'refs/heads/release') }} - name=709825985650.dkr.ecr.us-east-1.amazonaws.com/nginx/nginx-plus-ingress,enable=${{ startsWith(github.ref, 'refs/tags/') && contains(matrix.target, 'aws') }} - flavor: suffix=${{ contains(matrix.image, 'ubi') && '-ubi' || '' }}${{ contains(matrix.image, 'alpine') && '-alpine' || '' }}${{ contains(matrix.target, 'aws') && '-mktpl' || '' }},onlatest=true + name=709825985650.dkr.ecr.us-east-1.amazonaws.com/nginx/nginx-plus-ingress${{ contains(matrix.image, 'nap') && '-dos' || '' }},enable=${{ startsWith(github.ref, 'refs/tags/') && contains(matrix.target, 'aws') }} + flavor: | + suffix=${{ contains(matrix.image, 'ubi') && '-ubi' || '' }}${{ contains(matrix.image, 'alpine') && '-alpine' || '' }}${{ contains(matrix.target, 'aws') && '-mktpl' || '' }},onlatest=true + latest=${{ contains(matrix.target, 'aws') && 'false' || 'auto' }} tags: | type=edge type=ref,event=branch,enable=${{ startsWith(github.ref, 'refs/heads/release') }} @@ -593,7 +599,7 @@ jobs: "nginx-repo.crt=${{ contains(matrix.image, 'nap') && secrets.NGINX_AP_CRT || secrets.NGINX_CRT }}" "nginx-repo.key=${{ contains(matrix.image, 'nap') && secrets.NGINX_AP_KEY || secrets.NGINX_KEY }}" - name: Run Trivy vulnerability scanner - uses: aquasecurity/trivy-action@0.7.1 + uses: aquasecurity/trivy-action@0.8.0 continue-on-error: true with: image-ref: docker.io/${{ matrix.image }}:${{ steps.meta.outputs.version }} diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index 5933b75447..ebc5924c66 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -13,8 +13,15 @@ concurrency: group: ${{ github.ref_name }}-codeql cancel-in-progress: true +permissions: # added using https://github.com/step-security/secure-workflows + contents: read + jobs: analyze: + permissions: + actions: read # for github/codeql-action/init to get workflow details + contents: read # for actions/checkout to fetch code + security-events: write # for github/codeql-action/autobuild to send a status report name: Analyze runs-on: ubuntu-latest diff --git a/.github/workflows/fossa.yml b/.github/workflows/fossa.yml index f9b20e9042..8e2bd2b0a7 100644 --- a/.github/workflows/fossa.yml +++ b/.github/workflows/fossa.yml @@ -13,6 +13,9 @@ concurrency: group: ${{ github.ref_name }}-fossa cancel-in-progress: true +permissions: # added using https://github.com/step-security/secure-workflows + contents: read + jobs: scan: diff --git a/.github/workflows/labeler.yml b/.github/workflows/labeler.yml index 053fddb01f..4413605165 100644 --- a/.github/workflows/labeler.yml +++ b/.github/workflows/labeler.yml @@ -2,6 +2,9 @@ name: "Pull Request Labeler" on: - pull_request_target +permissions: # added using https://github.com/step-security/secure-workflows + contents: read + jobs: triage: permissions: diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index db60e07a2d..dbe4443aa1 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -25,7 +25,7 @@ jobs: lint: name: Lint - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 steps: - name: Checkout Repository uses: actions/checkout@v3 @@ -39,9 +39,12 @@ jobs: with: only-new-issues: true - lint-python: - runs-on: ubuntu-20.04 + actionlint: + name: Actionlint + runs-on: ubuntu-22.04 steps: - - uses: actions/checkout@v2 - - uses: isort/isort-action@v1.0.0 - - uses: psf/black@stable + - name: Checkout Repository + uses: actions/checkout@v3 + - uses: reviewdog/action-actionlint@v1 + with: + fail_on_error: true diff --git a/.github/workflows/notifications.yml b/.github/workflows/notifications.yml index 567eb3026e..2986d2848a 100644 --- a/.github/workflows/notifications.yml +++ b/.github/workflows/notifications.yml @@ -9,6 +9,7 @@ on: - "Fossa" - "Lint" - "Update Docker Images" + - "OpenSSF Scorecards" types: - completed diff --git a/.github/workflows/scorecards.yml b/.github/workflows/scorecards.yml new file mode 100644 index 0000000000..7c3ca5be7e --- /dev/null +++ b/.github/workflows/scorecards.yml @@ -0,0 +1,58 @@ +name: OpenSSF Scorecards +on: + # Only the default branch is supported. + branch_protection_rule: + schedule: + - cron: '43 20 * * 0' + push: + branches: [ "main" ] + +# Declare default permissions as read only. +permissions: read-all + +jobs: + analysis: + name: Scorecards analysis + runs-on: ubuntu-latest + permissions: + # Needed to upload the results to code-scanning dashboard. + security-events: write + # Used to receive a badge. + id-token: write + # Needs for private repositories. + contents: read + actions: read + + steps: + - name: "Checkout code" + uses: actions/checkout@a12a3943b4bdde767164f792f33f40b04645d846 # tag=v3.0.0 + with: + persist-credentials: false + + - name: "Run analysis" + uses: ossf/scorecard-action@99c53751e09b9529366343771cc321ec74e9bd3d # tag=v2.0.5 + with: + results_file: results.sarif + results_format: sarif + repo_token: ${{ secrets.SCORECARD_READ_TOKEN }} + + # Publish the results for public repositories to enable scorecard badges. For more details, see + # https://github.com/ossf/scorecard-action#publishing-results. + # For private repositories, `publish_results` will automatically be set to `false`, regardless + # of the value entered here. + publish_results: true + + # Upload the results as artifacts (optional). Commenting out will disable uploads of run results in SARIF + # format to the repository Actions tab. + - name: "Upload artifact" + uses: actions/upload-artifact@6673cd052c4cd6fcf4b4e6e60ea986c889389535 # tag=v3.0.0 + with: + name: SARIF file + path: results.sarif + retention-days: 5 + + # Upload the results to GitHub's code scanning dashboard. + - name: "Upload to code-scanning" + uses: github/codeql-action/upload-sarif@5f532563584d71fdef14ee64d17bafb34f751ce5 # tag=v1.0.26 + with: + sarif_file: results.sarif diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml index fdfeb9b095..5ca0e00269 100644 --- a/.github/workflows/stale.yml +++ b/.github/workflows/stale.yml @@ -3,8 +3,14 @@ on: schedule: - cron: '30 1 * * *' +permissions: # added using https://github.com/step-security/secure-workflows + contents: read + jobs: stale: + permissions: + issues: write # for actions/stale to close stale issues + pull-requests: write # for actions/stale to close stale PRs runs-on: ubuntu-20.04 steps: - uses: actions/stale@v6 diff --git a/.github/workflows/update-docker-images.yml b/.github/workflows/update-docker-images.yml index 99ebbc1bd9..10596ca6cd 100644 --- a/.github/workflows/update-docker-images.yml +++ b/.github/workflows/update-docker-images.yml @@ -238,7 +238,7 @@ jobs: IC_VERSION=v${{ needs.variables.outputs.kic-tag }} if: ${{ matrix.needs-updating == 'true' }} - name: Run Trivy vulnerability scanner - uses: aquasecurity/trivy-action@0.7.1 + uses: aquasecurity/trivy-action@0.8.0 continue-on-error: true with: image-ref: nginx/nginx-ingress:${{ steps.meta.outputs.version }} diff --git a/.goreleaser.yml b/.goreleaser.yml index 4a8c9ebf2c..1db0651666 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -41,10 +41,26 @@ builds: binary: nginx-ingress tags: - aws + - id: aws-nap-dos + goos: + - linux + goarch: + - amd64 + flags: + - -trimpath + gcflags: + - all=-trimpath={{.Env.GOPATH}} + asmflags: + - all=-trimpath={{.Env.GOPATH}} + ldflags: + - -s -w -X main.version={{.Version}} -X main.productCode={{.Env.AWS_NAP_DOS_PRODUCT_CODE}} -X main.pubKeyString={{.Env.AWS_NAP_DOS_PUB_KEY}} + main: ./cmd/nginx-ingress/ + binary: nginx-ingress + tags: + - aws archives: - id: kubernetes-ingress - format: binary builds: [kubernetes-ingress] changelog: @@ -54,7 +70,7 @@ checksum: name_template: 'checksums.txt' sboms: - - artifacts: binary + - artifacts: archive ids: [kubernetes-ingress] release: @@ -62,5 +78,17 @@ release: extra_files: - glob: ./dist/**.sbom +blobs: + - provider: azblob + bucket: '{{.Env.AZURE_BUCKET_NAME}}' + extra_files: + - glob: ./dist/**.sbom + milestones: - close: true + +announce: + slack: + enabled: true + channel: '#announcements' + message_template: 'NGINX Ingress Controller {{ .Tag }} is out! Check it out: {{ .ReleaseURL }}' diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 0000000000..7f94becf67 --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,66 @@ +# See https://pre-commit.com for more information +# See https://pre-commit.com/hooks.html for more hooks +exclude: (^docs/_vendor/|.*pb2.*) +repos: + - repo: https://github.com/pre-commit/pre-commit-hooks + rev: v4.3.0 + hooks: + - id: trailing-whitespace + - id: end-of-file-fixer + - id: check-yaml + args: [--allow-multiple-documents] + exclude: ^(deployments/helm-chart.*/templates|deployments/helm-chart/crds) + - id: check-ast + - id: check-added-large-files + - id: check-merge-conflict + - id: check-shebang-scripts-are-executable + - id: check-executables-have-shebangs + - id: check-symlinks + - id: check-case-conflict + - id: check-vcs-permalinks + - id: check-json + - id: pretty-format-json + args: [--autofix, --no-sort-keys, --no-ensure-ascii] + - id: mixed-line-ending + args: [--fix=lf] + - id: name-tests-test + args: [--pytest-test-first] + exclude: ^(tests/suite/utils|tests/suite/fixtures|tests/suite/grpc|tests/settings.py) + - id: no-commit-to-branch + - id: requirements-txt-fixer + - id: fix-byte-order-marker + - repo: local + hooks: + - id: golang-diff + name: create-go-diff + entry: bash -c 'git diff -p origin/main > /tmp/diff.patch' + language: system + types: [go] + pass_filenames: false + - repo: https://github.com/golangci/golangci-lint + rev: v1.50.1 + hooks: + - id: golangci-lint + args: [--new-from-patch=/tmp/diff.patch] + - repo: https://github.com/asottile/pyupgrade + rev: v3.2.0 + hooks: + - id: pyupgrade + - repo: https://github.com/PyCQA/isort + rev: 5.10.1 + hooks: + - id: isort + - repo: https://github.com/psf/black + rev: 22.10.0 + hooks: + - id: black + - repo: https://github.com/python-jsonschema/check-jsonschema + rev: 0.18.4 + hooks: + - id: check-jsonschema + name: "Check Helm Chart JSON Schema" + files: deployments/helm-chart/values.yaml + types: [yaml] + args: ['--schemafile', 'deployments/helm-chart/values.schema.json'] +ci: + skip: [golang-diff, golangci-lint, check-jsonschema] diff --git a/CHANGELOG.md b/CHANGELOG.md index 1eb4e179c7..759c2d5f06 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,17 @@ # Changelog +### 2.4.1 + +An automatically generated list of changes can be found on GitHub at: [2.4.1 Release](https://github.com/nginxinc/kubernetes-ingress/releases/tag/v2.4.1) + +A curated list of changes can be found on the [Releases](http://docs.nginx.com/nginx-ingress-controller/releases/) page on the NGINX Documentation website. + +### 2.4.0 + +An automatically generated list of changes can be found on GitHub at: [2.4.0 Release](https://github.com/nginxinc/kubernetes-ingress/releases/tag/v2.4.0) + +A curated list of changes can be found on the [Releases](http://docs.nginx.com/nginx-ingress-controller/releases/) page on the NGINX Documentation website. + ### 2.3.1 An automatically generated list of changes can be found on GitHub at: [2.3.1 Release](https://github.com/nginxinc/kubernetes-ingress/releases/tag/v2.3.1) diff --git a/CODEOWNERS b/CODEOWNERS new file mode 100644 index 0000000000..9934150467 --- /dev/null +++ b/CODEOWNERS @@ -0,0 +1 @@ +* @nginxinc/kic diff --git a/Makefile b/Makefile index 3b1a05a127..6dbc96981d 100644 --- a/Makefile +++ b/Makefile @@ -6,13 +6,14 @@ VERSION = $(GIT_TAG)-SNAPSHOT-$(GIT_COMMIT_SHORT) PLUS_ARGS = --secret id=nginx-repo.crt,src=nginx-repo.crt --secret id=nginx-repo.key,src=nginx-repo.key # variables that can be overridden by the user -PREFIX = nginx/nginx-ingress## The name of the image. For example, nginx/nginx-ingress -TAG = $(VERSION:v%=%)## The tag of the image. For example, 2.0.0 +PREFIX ?= nginx/nginx-ingress## The name of the image. For example, nginx/nginx-ingress +TAG ?= $(VERSION:v%=%)## The tag of the image. For example, 2.0.0 TARGET ?= local## The target of the build. Possible values: local, container and download override DOCKER_BUILD_OPTIONS += --build-arg IC_VERSION=$(VERSION) --build-arg GIT_COMMIT=$(GIT_COMMIT)## The options for the docker build command. For example, --pull. +ARCH ?= amd64## The architecture of the image or binary. For example: amd64, arm64, ppc64le, s390x. Not all architectures are supported for all targets. # final docker build command -DOCKER_CMD = docker build $(strip $(DOCKER_BUILD_OPTIONS)) --target $(strip $(TARGET)) -f build/Dockerfile -t $(strip $(PREFIX)):$(strip $(TAG)) . +DOCKER_CMD = docker build --platform linux/$(ARCH) $(strip $(DOCKER_BUILD_OPTIONS)) --target $(strip $(TARGET)) -f build/Dockerfile -t $(strip $(PREFIX)):$(strip $(TAG)) . export DOCKER_BUILDKIT = 1 @@ -38,6 +39,11 @@ lint-python: ## Run linter for python tests @isort . @black . +.PHONY: staticcheck +staticcheck: ## Run staticcheck linter + @staticcheck -version >/dev/null 2>&1 || go install honnef.co/go/tools/cmd/staticcheck@2022.1.3; + staticcheck ./... + .PHONY: test test: ## Run tests go test -tags=aws -shuffle=on -race ./... @@ -71,7 +77,7 @@ build: ## Build Ingress Controller binary @docker -v || (code=$$?; printf "\033[0;31mError\033[0m: there was a problem with Docker\n"; exit $$code) ifeq (${TARGET},local) @go version || (code=$$?; printf "\033[0;31mError\033[0m: unable to build locally, try using the parameter TARGET=container or TARGET=download\n"; exit $$code) - CGO_ENABLED=0 GOOS=linux go build -trimpath -ldflags "-s -w -X main.version=${VERSION}" -o nginx-ingress github.com/nginxinc/kubernetes-ingress/cmd/nginx-ingress + CGO_ENABLED=0 GOOS=linux GOARCH=$(ARCH) go build -trimpath -ldflags "-s -w -X main.version=${VERSION}" -o nginx-ingress github.com/nginxinc/kubernetes-ingress/cmd/nginx-ingress else ifeq (${TARGET},download) @$(MAKE) download-binary-docker endif @@ -89,7 +95,7 @@ endif .PHONY: build-goreleaser build-goreleaser: ## Build Ingress Controller binary using GoReleaser @goreleaser -v || (code=$$?; printf "\033[0;31mError\033[0m: there was a problem with GoReleaser. Follow the docs to install it https://goreleaser.com/install\n"; exit $$code) - GOOS=linux GOPATH=$(shell go env GOPATH) goreleaser build --rm-dist --debug --snapshot --id kubernetes-ingress --single-target + GOOS=linux GOPATH=$(shell go env GOPATH) GOARCH=$(ARCH) goreleaser build --rm-dist --debug --snapshot --id kubernetes-ingress --single-target .PHONY: debian-image debian-image: build ## Create Docker image for Ingress Controller (Debian) diff --git a/README.md b/README.md index 3c1986c76f..30d191d7c3 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ -[![CI](https://github.com/nginxinc/kubernetes-ingress/actions/workflows/ci.yml/badge.svg)](https://github.com/nginxinc/kubernetes-ingress/actions/workflows/ci.yml) [![FOSSA Status](https://app.fossa.com/api/projects/custom%2B5618%2Fgithub.com%2Fnginxinc%2Fkubernetes-ingress.svg?type=shield)](https://app.fossa.com/projects/custom%2B5618%2Fgithub.com%2Fnginxinc%2Fkubernetes-ingress?ref=badge_shield) [![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0) [![Go Report Card](https://goreportcard.com/badge/github.com/nginxinc/kubernetes-ingress)](https://goreportcard.com/report/github.com/nginxinc/kubernetes-ingress) [![codecov](https://codecov.io/gh/nginxinc/kubernetes-ingress/branch/main/graph/badge.svg?token=snCn7Y0zC7)](https://codecov.io/gh/nginxinc/kubernetes-ingress) [![GitHub release (latest SemVer)](https://img.shields.io/github/v/release/nginxinc/kubernetes-ingress?logo=github&sort=semver)](https://github.com/nginxinc/kubernetes-ingress/releases/latest) ![GitHub go.mod Go version](https://img.shields.io/github/go-mod/go-version/nginxinc/kubernetes-ingress?logo=go) [![Docker Pulls](https://img.shields.io/docker/pulls/nginx/nginx-ingress?logo=docker&logoColor=white)](https://hub.docker.com/r/nginx/nginx-ingress) ![Docker Image Size (latest semver)](https://img.shields.io/docker/image-size/nginx/nginx-ingress?logo=docker&logoColor=white&sort=semver) [![Artifact Hub](https://img.shields.io/endpoint?url=https://artifacthub.io/badge/repository/nginx-ingress)](https://artifacthub.io/packages/container/nginx-ingress/kubernetes-ingress) [![Slack](https://img.shields.io/badge/slack-%23nginx--ingress--controller-green?logo=slack)](https://nginxcommunity.slack.com/channels/nginx-ingress-controller) +[![OpenSSF Scorecard](https://api.securityscorecards.dev/projects/github.com/nginxinc/kubernetes-ingress/badge)](https://api.securityscorecards.dev/projects/github.com/nginxinc/kubernetes-ingress) [![CI](https://github.com/nginxinc/kubernetes-ingress/actions/workflows/ci.yml/badge.svg)](https://github.com/nginxinc/kubernetes-ingress/actions/workflows/ci.yml) [![FOSSA Status](https://app.fossa.com/api/projects/custom%2B5618%2Fgithub.com%2Fnginxinc%2Fkubernetes-ingress.svg?type=shield)](https://app.fossa.com/projects/custom%2B5618%2Fgithub.com%2Fnginxinc%2Fkubernetes-ingress?ref=badge_shield) [![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0) [![Go Report Card](https://goreportcard.com/badge/github.com/nginxinc/kubernetes-ingress)](https://goreportcard.com/report/github.com/nginxinc/kubernetes-ingress) [![codecov](https://codecov.io/gh/nginxinc/kubernetes-ingress/branch/main/graph/badge.svg?token=snCn7Y0zC7)](https://codecov.io/gh/nginxinc/kubernetes-ingress) [![GitHub release (latest SemVer)](https://img.shields.io/github/v/release/nginxinc/kubernetes-ingress?logo=github&sort=semver)](https://github.com/nginxinc/kubernetes-ingress/releases/latest) ![GitHub go.mod Go version](https://img.shields.io/github/go-mod/go-version/nginxinc/kubernetes-ingress?logo=go) [![Docker Pulls](https://img.shields.io/docker/pulls/nginx/nginx-ingress?logo=docker&logoColor=white)](https://hub.docker.com/r/nginx/nginx-ingress) ![Docker Image Size (latest semver)](https://img.shields.io/docker/image-size/nginx/nginx-ingress?logo=docker&logoColor=white&sort=semver) [![Artifact Hub](https://img.shields.io/endpoint?url=https://artifacthub.io/badge/repository/nginx-ingress)](https://artifacthub.io/packages/container/nginx-ingress/kubernetes-ingress) [![Slack](https://img.shields.io/badge/slack-%23nginx--ingress--controller-green?logo=slack)](https://nginxcommunity.slack.com/channels/nginx-ingress-controller) # 🚀 *Help make the NGINX Ingress Controller better by participating in our [survey](https://forms.office.com/Pages/ResponsePage.aspx?id=L_093Ttq0UCb4L-DJ9gcUKLQ7uTJaE1PitM_37KR881UMEs0Rk5PMkYzMTJTWVA0V1hUVTRLUUMyNS4u)!* 🚀 @@ -53,7 +53,7 @@ Read [this doc](https://docs.nginx.com/nginx-ingress-controller/intro/nginx-plus We publish Ingress Controller releases on GitHub. See our [releases page](https://github.com/nginxinc/kubernetes-ingress/releases). -The latest stable release is [2.3.1](https://github.com/nginxinc/kubernetes-ingress/releases/tag/v2.3.1). For production use, we recommend that you choose the latest stable release. +The latest stable release is [2.4.1](https://github.com/nginxinc/kubernetes-ingress/releases/tag/v2.4.1). For production use, we recommend that you choose the latest stable release. The edge version is useful for experimenting with new features that are not yet published in a stable release. To use, choose the *edge* version built from the [latest commit](https://github.com/nginxinc/kubernetes-ingress/commits/main) from the main branch. @@ -68,7 +68,7 @@ The table below summarizes the options regarding the images, manifests, helm cha | Version | Description | Image for NGINX | Image for NGINX Plus | Installation Manifests and Helm Chart | Documentation and Examples | | ------- | ----------- | --------------- | -------------------- | ---------------------------------------| -------------------------- | -| Latest stable release | For production use | Use the 2.3.1 images from [DockerHub](https://hub.docker.com/r/nginx/nginx-ingress/), [GitHub Container](https://github.com/nginxinc/kubernetes-ingress/pkgs/container/kubernetes-ingress), [Amazon ECR Public Gallery](https://gallery.ecr.aws/nginx/nginx-ingress) or [Quay.io](https://quay.io/repository/nginx/nginx-ingress) or [build your own image](https://docs.nginx.com/nginx-ingress-controller/installation/building-ingress-controller-image/). | Use the 2.3.1 images from the [F5 Container Registry](https://docs.nginx.com/nginx-ingress-controller/installation/pulling-ingress-controller-image/) or the [AWS Marketplace](https://aws.amazon.com/marketplace/search/?CREATOR=741df81b-dfdc-4d36-b8da-945ea66b522c&FULFILLMENT_OPTION_TYPE=CONTAINER&filters=CREATOR%2CFULFILLMENT_OPTION_TYPE) or [Build your own image](https://docs.nginx.com/nginx-ingress-controller/installation/building-ingress-controller-image/). | [Manifests](https://github.com/nginxinc/kubernetes-ingress/tree/v2.3.1/deployments). [Helm chart](https://github.com/nginxinc/kubernetes-ingress/tree/v2.3.1/deployments/helm-chart). | [Documentation](https://docs.nginx.com/nginx-ingress-controller/). [Examples](https://docs.nginx.com/nginx-ingress-controller/configuration/configuration-examples/). | +| Latest stable release | For production use | Use the 2.4.1 images from [DockerHub](https://hub.docker.com/r/nginx/nginx-ingress/), [GitHub Container](https://github.com/nginxinc/kubernetes-ingress/pkgs/container/kubernetes-ingress), [Amazon ECR Public Gallery](https://gallery.ecr.aws/nginx/nginx-ingress) or [Quay.io](https://quay.io/repository/nginx/nginx-ingress) or [build your own image](https://docs.nginx.com/nginx-ingress-controller/installation/building-ingress-controller-image/). | Use the 2.4.1 images from the [F5 Container Registry](https://docs.nginx.com/nginx-ingress-controller/installation/pulling-ingress-controller-image/) or the [AWS Marketplace](https://aws.amazon.com/marketplace/search/?CREATOR=741df81b-dfdc-4d36-b8da-945ea66b522c&FULFILLMENT_OPTION_TYPE=CONTAINER&filters=CREATOR%2CFULFILLMENT_OPTION_TYPE) or [Build your own image](https://docs.nginx.com/nginx-ingress-controller/installation/building-ingress-controller-image/). | [Manifests](https://github.com/nginxinc/kubernetes-ingress/tree/v2.4.1/deployments). [Helm chart](https://github.com/nginxinc/kubernetes-ingress/tree/v2.4.1/deployments/helm-chart). | [Documentation](https://docs.nginx.com/nginx-ingress-controller/). [Examples](https://docs.nginx.com/nginx-ingress-controller/configuration/configuration-examples/). | | Edge/Nightly | For testing and experimenting | Use the edge or nightly images from [DockerHub](https://hub.docker.com/r/nginx/nginx-ingress/), [GitHub Container](https://github.com/nginxinc/kubernetes-ingress/pkgs/container/kubernetes-ingress), [Amazon ECR Public Gallery](https://gallery.ecr.aws/nginx/nginx-ingress) or [Quay.io](https://quay.io/repository/nginx/nginx-ingress) or [build your own image](https://github.com/nginxinc/kubernetes-ingress/tree/main/docs/content/installation/building-ingress-controller-image.md). | [Build your own image](https://github.com/nginxinc/kubernetes-ingress/tree/main/docs/content/installation/building-ingress-controller-image.md). | [Manifests](https://github.com/nginxinc/kubernetes-ingress/tree/main/deployments). [Helm chart](https://github.com/nginxinc/kubernetes-ingress/tree/main/deployments/helm-chart). | [Documentation](https://github.com/nginxinc/kubernetes-ingress/tree/main/docs/content). [Examples](https://github.com/nginxinc/kubernetes-ingress/tree/main/examples). | ## Contacts diff --git a/build/Dockerfile b/build/Dockerfile index 76a0841c42..fdf406a3df 100644 --- a/build/Dockerfile +++ b/build/Dockerfile @@ -6,12 +6,12 @@ ARG DEBIAN_VERSION=bullseye-slim ############################################# Base images containing libs for Opentracing ############################################# -FROM opentracing/nginx-opentracing:nginx-1.23.1 as opentracing-lib -FROM opentracing/nginx-opentracing:nginx-1.23.1-alpine as alpine-opentracing-lib +FROM opentracing/nginx-opentracing:nginx-1.23.2 as opentracing-lib +FROM opentracing/nginx-opentracing:nginx-1.23.2-alpine as alpine-opentracing-lib ############################################# Base image for Debian ############################################# -FROM nginx:1.23.1 AS debian +FROM nginx:1.23.2 AS debian RUN --mount=type=bind,from=opentracing-lib,target=/tmp/ot/ \ apt-get update \ @@ -19,17 +19,14 @@ RUN --mount=type=bind,from=opentracing-lib,target=/tmp/ot/ \ && rm -rf /var/lib/apt/lists/* \ && cp -av /tmp/ot/usr/local/lib/libopentracing.so* /tmp/ot/usr/local/lib/libjaegertracing*so* /tmp/ot/usr/local/lib/libzipkin*so* /tmp/ot/usr/local/lib/libdd*so* /tmp/ot/usr/local/lib/libyaml*so* /usr/local/lib/ \ && cp -av /tmp/ot/usr/lib/nginx/modules/ngx_http_opentracing_module.so /usr/lib/nginx/modules/ \ - && ldconfig \ - && echo $NGINX_VERSION > nginx_version + && ldconfig ############################################# Base image for Alpine ############################################# -FROM nginx:1.23.1-alpine AS alpine +FROM nginx:1.23.2-alpine AS alpine RUN --mount=type=bind,from=alpine-opentracing-lib,target=/tmp/ot/ \ apk add --no-cache libcap libstdc++ \ - # temp fix for CVE-2022-3209 and CVE-2022-35252 - && apk upgrade --no-cache libxml2 curl libcurl \ && cp -av /tmp/ot/usr/local/lib/libopentracing.so* /tmp/ot/usr/local/lib/libjaegertracing*so* /tmp/ot/usr/local/lib/libzipkin*so* /tmp/ot/usr/local/lib/libdd*so* /tmp/ot/usr/local/lib/libyaml*so* /usr/local/lib/ \ && cp -av /tmp/ot/usr/lib/nginx/modules/ngx_http_opentracing_module.so /usr/lib/nginx/modules/ \ && ldconfig /usr/local/lib/ @@ -89,8 +86,6 @@ RUN --mount=type=secret,id=nginx-repo.crt,dst=/etc/ssl/nginx/nginx-repo.crt,mode && printf "%s\n" "deb https://pkgs.nginx.com/app-protect/${NGINX_PLUS_VERSION}/debian ${DEBIAN_VERSION} nginx-plus" \ "deb https://pkgs.nginx.com/app-protect-security-updates/debian ${DEBIAN_VERSION} nginx-plus" > /etc/apt/sources.list.d/nginx-app-protect.list \ && apt-get update \ - # temp fix for CVE-2022-37434 and DLA-3112-1 - && apt-get install zlib1g libbz2-1.0 \ && apt-get install --no-install-recommends --no-install-suggests -y app-protect app-protect-attack-signatures app-protect-threat-campaigns \ && apt-get purge --auto-remove -y curl; \ fi \ @@ -109,10 +104,9 @@ RUN --mount=type=secret,id=nginx-repo.crt,dst=/etc/ssl/nginx/nginx-repo.crt,mode ############################################# Base image for UBI ############################################# -FROM redhat/ubi8 AS ubi-base +FROM nginxcontrib/nginx:1.23.2-ubi AS ubi ARG IC_VERSION -SHELL ["/bin/bash", "-o", "pipefail", "-c"] LABEL name="NGINX Ingress Controller" \ maintainer="kubernetes@nginx.com" \ vendor="NGINX Inc" \ @@ -123,34 +117,25 @@ LABEL name="NGINX Ingress Controller" \ io.k8s.description="The NGINX Ingress Controller is an application that runs in a cluster and configures an HTTP load balancer according to Ingress resources." \ io.openshift.tags="nginx,ingress-controller,ingress,controller,kubernetes,openshift" -RUN dnf --nodocs install -y shadow-utils ca-certificates \ - && groupadd --system --gid 101 nginx \ - && useradd --system --gid nginx --no-create-home --home-dir /nonexistent --comment "nginx user" --shell /bin/false --uid 101 nginx - COPY --link --chown=101:0 LICENSE /licenses/ - -############################################# Base image for UBI OSS ############################################# -FROM ubi-base AS ubi - -RUN --mount=type=bind,from=debian,source=/nginx_version,target=/tmp/nginx_version \ - export NGINX_VERSION=$( /etc/yum.repos.d/nginx.repo \ - && dnf --nodocs install -y nginx-${NGINX_VERSION} \ - && rm /etc/yum.repos.d/nginx.repo +# temp fix for CVE-2022-27404, CVE-2022-33099 and CVE-2022-37434 +RUN microdnf --nodocs upgrade -y freetype lua-libs zlib ############################################# Base image for UBI with NGINX Plus ############################################# -FROM ubi-base AS ubi-plus +FROM redhat/ubi8:8.6-990 AS ubi-plus ARG NGINX_PLUS_VERSION +SHELL ["/bin/bash", "-o", "pipefail", "-c"] RUN --mount=type=secret,id=nginx-repo.crt,dst=/etc/ssl/nginx/nginx-repo.crt,mode=0644 \ --mount=type=secret,id=nginx-repo.key,dst=/etc/ssl/nginx/nginx-repo.key,mode=0644 \ - rpm --import https://cs.nginx.com/static/keys/nginx_signing.key \ + dnf --nodocs install -y shadow-utils ca-certificates \ + # temp fix for CVE-2022-1304 and CVE-2016-3709 + && dnf --nodocs install -y libcom_err libxml2 \ + && groupadd --system --gid 101 nginx \ + && useradd --system --gid nginx --no-create-home --home-dir /nonexistent --comment "nginx user" --shell /bin/false --uid 101 nginx \ + && rpm --import https://cs.nginx.com/static/keys/nginx_signing.key \ && curl -fsSL "https://cs.nginx.com/static/files/nginx-plus-$(grep -E -o '[0-9]+\.[0-9]+' /etc/redhat-release | cut -d"." -f1).repo" | tr 0 1 > /etc/yum.repos.d/nginx-plus.repo \ && sed -i "0,/centos/s;;${NGINX_PLUS_VERSION}/centos;" /etc/yum.repos.d/nginx-plus.repo \ && dnf --nodocs install -y nginx-plus nginx-plus-module-njs @@ -198,24 +183,24 @@ ARG TARGETPLATFORM ARG NAP_MODULES=none # copy oidc files on plus build -RUN --mount=target=/tmp [ -n "${BUILD_OS##*plus*}" ] && exit 0; mkdir -p etc/nginx/oidc/ && cp -a /tmp/internal/configs/oidc/* /etc/nginx/oidc/ +RUN --mount=type=bind,target=/tmp [ -n "${BUILD_OS##*plus*}" ] && exit 0; mkdir -p /etc/nginx/oidc/ && cp -a /tmp/internal/configs/oidc/* /etc/nginx/oidc/ # run only on nap waf build -RUN --mount=target=/tmp [ -n "${NAP_MODULES##*waf*}" ] && exit 0; mkdir -p /etc/nginx/waf/nac-policies /etc/nginx/waf/nac-logconfs /etc/nginx/waf/nac-usersigs /var/log/app_protect /opt/app_protect \ +RUN --mount=type=bind,target=/tmp [ -n "${NAP_MODULES##*waf*}" ] && exit 0; mkdir -p /etc/nginx/waf/nac-policies /etc/nginx/waf/nac-logconfs /etc/nginx/waf/nac-usersigs /var/log/app_protect /opt/app_protect \ && chown -R 101:0 /etc/app_protect /usr/share/ts /var/log/app_protect/ /opt/app_protect/ /var/log/nginx/ \ && touch /etc/nginx/waf/nac-usersigs/index.conf \ && cp -a /tmp/build/log-default.json /etc/nginx # run only on nap dos build -RUN --mount=target=/tmp [ -n "${NAP_MODULES##*dos*}" ] && exit 0; mkdir -p /root/app_protect_dos /etc/nginx/dos/policies /etc/nginx/dos/logconfs /shared/cores /var/log/adm /var/run/adm \ +RUN [ -n "${NAP_MODULES##*dos*}" ] && exit 0; mkdir -p /root/app_protect_dos /etc/nginx/dos/policies /etc/nginx/dos/logconfs /shared/cores /var/log/adm /var/run/adm \ && chmod 777 /shared/cores /var/log/adm /var/run/adm /etc/app_protect_dos -RUN --mount=target=/tmp mkdir -p /var/lib/nginx /etc/nginx/secrets /etc/nginx/stream-conf.d \ +RUN --mount=type=bind,target=/tmp mkdir -p /var/lib/nginx /etc/nginx/secrets /etc/nginx/stream-conf.d \ && setcap 'cap_net_bind_service=+ep' /usr/sbin/nginx 'cap_net_bind_service=+ep' /usr/sbin/nginx-debug \ && setcap -v 'cap_net_bind_service=+ep' /usr/sbin/nginx 'cap_net_bind_service=+ep' /usr/sbin/nginx-debug \ && [ -z "${BUILD_OS##*plus*}" ] && PLUS=-plus; cp -a /tmp/internal/configs/version1/nginx$PLUS.ingress.tmpl /tmp/internal/configs/version1/nginx$PLUS.tmpl \ /tmp/internal/configs/version2/nginx$PLUS.virtualserver.tmpl /tmp/internal/configs/version2/nginx$PLUS.transportserver.tmpl / \ - && chown -R 101:0 /etc/nginx /etc/nginx/secrets /var/cache/nginx /var/lib/nginx /*.tmpl \ + && chown -R 101:0 /etc/nginx /var/cache/nginx /var/lib/nginx /*.tmpl \ && rm -f /etc/nginx/conf.d/* /etc/apt/apt.conf.d/90pkgs-nginx /etc/apt/sources.list.d/nginx-plus.list # Uncomment the line below if you would like to add the default.pem to the image @@ -241,11 +226,12 @@ FROM golang:1.19-alpine AS builder ARG IC_VERSION ARG TARGETARCH -WORKDIR /go/src/github.com/nginxinc/kubernetes-ingress/nginx-ingress/cmd/nginx-ingress -RUN --mount=target=/go/src/github.com/nginxinc/kubernetes-ingress/nginx-ingress/ --mount=type=cache,target=/root/.cache/go-build \ +WORKDIR /go/src/github.com/nginxinc/kubernetes-ingress/ +RUN apk add --no-cache git +RUN --mount=type=bind,target=/go/src/github.com/nginxinc/kubernetes-ingress/ --mount=type=cache,target=/root/.cache/go-build \ go mod download -RUN --mount=target=/go/src/github.com/nginxinc/kubernetes-ingress/nginx-ingress/ --mount=type=cache,target=/root/.cache/go-build \ - CGO_ENABLED=0 GOOS=linux GOARCH=$TARGETARCH go build -trimpath -ldflags "-s -w -X main.version=${IC_VERSION}" -o /nginx-ingress +RUN --mount=type=bind,target=/go/src/github.com/nginxinc/kubernetes-ingress/ --mount=type=cache,target=/root/.cache/go-build \ + CGO_ENABLED=0 GOOS=linux GOARCH=$TARGETARCH go build -trimpath -ldflags "-s -w -X main.version=${IC_VERSION}" -o /nginx-ingress github.com/nginxinc/kubernetes-ingress/cmd/nginx-ingress ############################################# Create image with nginx-ingress built in container ############################################# @@ -270,16 +256,17 @@ ARG TARGETARCH LABEL org.nginx.kic.image.build.version="goreleaser" -COPY --link --chown=101:0 dist/kubernetes-ingress_linux_$TARGETARCH*/nginx-ingress / +COPY --link --chown=101:0 dist/kubernetes-ingress_linux_${TARGETARCH}*/nginx-ingress / ############################################# Create image with nginx-ingress built by GoReleaser for AWS Marketplace ############################################# FROM common AS aws ARG TARGETARCH +ARG NAP_MODULES= LABEL org.nginx.kic.image.build.version="aws" -COPY --link --chown=101:0 dist/aws_linux_$TARGETARCH*/nginx-ingress / +COPY --link --chown=101:0 dist/aws*${NAP_MODULES}_linux_${TARGETARCH}*/nginx-ingress / ############################################# Create image with nginx-ingress extracted from image on Docker Hub ############################################# diff --git a/build/README.md b/build/README.md index 66c0fc4592..8bc31e68ab 100644 --- a/build/README.md +++ b/build/README.md @@ -1,3 +1,3 @@ # NGINX Ingress Controller -This doc is now available at https://docs.nginx.com/nginx-ingress-controller/installation/building-ingress-controller-image/ \ No newline at end of file +This doc is now available at https://docs.nginx.com/nginx-ingress-controller/installation/building-ingress-controller-image/ diff --git a/build/generate_default_cert_and_key.sh b/build/generate_default_cert_and_key.sh index 1581f5d6a3..c7d50663f8 100755 --- a/build/generate_default_cert_and_key.sh +++ b/build/generate_default_cert_and_key.sh @@ -1,5 +1,5 @@ #!/bin/bash openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout default.key -out default.crt -subj "/CN=NGINXIngressController" -cat default.key default.crt > default.pem -rm default.key default.crt \ No newline at end of file +cat default.key default.crt > default.pem +rm default.key default.crt diff --git a/build/log-default.json b/build/log-default.json index e6739af3d2..c68b96e0fd 100644 --- a/build/log-default.json +++ b/build/log-default.json @@ -1,10 +1,10 @@ { - "filter": { - "request_type": "all" - }, - "content": { - "format": "default", - "max_request_size": "any", - "max_message_size": "5k" - } + "filter": { + "request_type": "all" + }, + "content": { + "format": "default", + "max_request_size": "any", + "max_message_size": "5k" + } } diff --git a/cmd/nginx-ingress/flags.go b/cmd/nginx-ingress/flags.go index 239aae2624..c4bf503e76 100644 --- a/cmd/nginx-ingress/flags.go +++ b/cmd/nginx-ingress/flags.go @@ -15,15 +15,6 @@ import ( ) var ( - - // Injected during build - version string - - // Info read from the binary - commitHash = "unknown" - commitTime = "unknown" - dirtyBuild = true - healthStatus = flag.Bool("health-status", false, `Add a location based on the value of health-status-uri to the default server. The location responds with the 200 status code for any request. Useful for external health-checking of the Ingress Controller`) @@ -40,6 +31,11 @@ var ( watchNamespaces []string + watchSecretNamespace = flag.String("watch-secret-namespace", "", + `Comma separated list of namespaces the Ingress Controller should watch for secrets. If this arg is not configured, the Ingress Controller watches the same namespaces for all resources. See "watch-namespace". `) + + watchSecretNamespaces []string + nginxConfigMaps = flag.String("nginx-configmaps", "", `A ConfigMap resource for customizing NGINX configuration. If a ConfigMap is set, but the Ingress Controller is not able to fetch it from Kubernetes API, the Ingress Controller will fail to start. @@ -187,19 +183,26 @@ var ( ) //gocyclo:ignore -func parseFlags(versionInfo string, binaryInfo string) { +func parseFlags() { flag.Parse() - initialChecks() - if *versionFlag { - printVersionInfo(versionInfo, binaryInfo) + os.Exit(0) } - glog.Infof("Starting NGINX Ingress Controller %v PlusFlag=%v", versionInfo, *nginxPlus) - glog.Info(binaryInfo) + initialChecks() watchNamespaces = strings.Split(*watchNamespace, ",") + glog.Infof("Namespaces watched: %v", watchNamespaces) + + if len(*watchSecretNamespace) > 0 { + watchSecretNamespaces = strings.Split(*watchSecretNamespace, ",") + } else { + // empty => default to watched namespaces + watchSecretNamespaces = watchNamespaces + } + + glog.Infof("Namespaces watched for secrets: %v", watchSecretNamespaces) validationChecks() @@ -284,19 +287,14 @@ func initialChecks() { } } + glog.Infof("Starting with flags: %+q", os.Args[1:]) + unparsed := flag.Args() if len(unparsed) > 0 { glog.Warningf("Ignoring unhandled arguments: %+q", unparsed) } } -// printVersionInfo prints the the version and binary info before exiting if the flag is set -func printVersionInfo(versionInfo string, binaryInfo string) { - fmt.Println(versionInfo) - fmt.Println(binaryInfo) - os.Exit(0) -} - // validationChecks checks the values for various flags func validationChecks() { healthStatusURIValidationError := validateLocation(*healthStatusURI) @@ -314,6 +312,11 @@ func validationChecks() { glog.Fatalf("Invalid values for namespaces: %v", namespacesNameValidationError) } + namespacesNameValidationError = validateNamespaceNames(watchSecretNamespaces) + if namespacesNameValidationError != nil { + glog.Fatalf("Invalid values for secret namespaces: %v", namespacesNameValidationError) + } + statusPortValidationError := validatePort(*nginxStatusPort) if statusPortValidationError != nil { glog.Fatalf("Invalid value for nginx-status-port: %v", statusPortValidationError) diff --git a/cmd/nginx-ingress/main.go b/cmd/nginx-ingress/main.go index 83a68f7b04..68ed5345ae 100644 --- a/cmd/nginx-ingress/main.go +++ b/cmd/nginx-ingress/main.go @@ -7,6 +7,7 @@ import ( "net/http" "os" "os/signal" + "runtime" "strings" "syscall" "time" @@ -37,9 +38,14 @@ import ( clientcmdapi "k8s.io/client-go/tools/clientcmd/api" ) +// Injected during build +var version string + func main() { - binaryInfo, versionInfo := getBuildInfo() - parseFlags(binaryInfo, versionInfo) + commitHash, commitTime, dirtyBuild := getBuildInfo() + fmt.Printf("NGINX Ingress Controller Version=%v Commit=%v Date=%v DirtyState=%v Arch=%v/%v Go=%v\n", version, commitHash, commitTime, dirtyBuild, runtime.GOOS, runtime.GOARCH, runtime.Version()) + + parseFlags() config, kubeClient := createConfigAndKubeClient() @@ -47,7 +53,9 @@ func main() { validateIngressClass(kubeClient) - checkNamespaceExists(kubeClient) + checkNamespaceExists(kubeClient, watchNamespaces) + + checkNamespaceExists(kubeClient, watchSecretNamespaces) dynClient, confClient := createCustomClients(config) @@ -121,6 +129,7 @@ func main() { RestConfig: config, ResyncPeriod: 30 * time.Second, Namespace: watchNamespaces, + SecretNamespace: watchSecretNamespaces, NginxConfigurator: cnf, DefaultServerSecret: *defaultServerSecret, AppProtectEnabled: *appProtect, @@ -213,7 +222,7 @@ func kubernetesVersionInfo(kubeClient kubernetes.Interface) { } glog.Infof("Kubernetes version: %v", k8sVersion) - minK8sVersion, err := util_version.ParseGeneric("1.19.0") + minK8sVersion, err := util_version.ParseGeneric("1.21.0") if err != nil { glog.Fatalf("unexpected error parsing minimum supported version: %v", err) } @@ -234,8 +243,8 @@ func validateIngressClass(kubeClient kubernetes.Interface) { } } -func checkNamespaceExists(kubeClient kubernetes.Interface) { - for _, ns := range watchNamespaces { +func checkNamespaceExists(kubeClient kubernetes.Interface, namespaces []string) { + for _, ns := range namespaces { if ns != "" { _, err := kubeClient.CoreV1().Namespaces().Get(context.TODO(), ns, meta_v1.GetOptions{}) if err != nil { diff --git a/cmd/nginx-ingress/utils.go b/cmd/nginx-ingress/utils.go index 406d1b0c79..778aebd729 100644 --- a/cmd/nginx-ingress/utils.go +++ b/cmd/nginx-ingress/utils.go @@ -1,15 +1,17 @@ package main import ( - "fmt" - "runtime" "runtime/debug" ) -func getBuildInfo() (string, string) { +func getBuildInfo() (commitHash string, commitTime string, dirtyBuild string) { + commitHash = "unknown" + commitTime = "unknown" + dirtyBuild = "unknown" + info, ok := debug.ReadBuildInfo() if !ok { - return "", "" + return } for _, kv := range info.Settings { switch kv.Key { @@ -18,11 +20,8 @@ func getBuildInfo() (string, string) { case "vcs.time": commitTime = kv.Value case "vcs.modified": - dirtyBuild = kv.Value == "true" + dirtyBuild = kv.Value } } - binaryInfo := fmt.Sprintf("Commit=%v Date=%v DirtyState=%v Arch=%v/%v Go=%v", commitHash, commitTime, dirtyBuild, runtime.GOOS, runtime.GOARCH, runtime.Version()) - versionInfo := fmt.Sprintf("Version=%v", version) - - return versionInfo, binaryInfo + return commitHash, commitTime, dirtyBuild } diff --git a/deployments/common/crds/appprotect.f5.com_aplogconfs.yaml b/deployments/common/crds/appprotect.f5.com_aplogconfs.yaml index bf29492895..53b7fb40d7 100644 --- a/deployments/common/crds/appprotect.f5.com_aplogconfs.yaml +++ b/deployments/common/crds/appprotect.f5.com_aplogconfs.yaml @@ -2,7 +2,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.4.0 + controller-gen.kubebuilder.io/version: v0.10.0 creationTimestamp: null name: aplogconfs.appprotect.f5.com spec: diff --git a/deployments/common/crds/appprotect.f5.com_appolicies.yaml b/deployments/common/crds/appprotect.f5.com_appolicies.yaml index ac4c6c31ef..8c494414cb 100644 --- a/deployments/common/crds/appprotect.f5.com_appolicies.yaml +++ b/deployments/common/crds/appprotect.f5.com_appolicies.yaml @@ -2,7 +2,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.4.0 + controller-gen.kubebuilder.io/version: v0.10.0 creationTimestamp: null name: appolicies.appprotect.f5.com spec: @@ -334,6 +334,8 @@ spec: type: object settings: properties: + caseSensitiveHttpHeaders: + type: boolean isEnabled: type: boolean type: object diff --git a/deployments/common/crds/appprotect.f5.com_apusersigs.yaml b/deployments/common/crds/appprotect.f5.com_apusersigs.yaml index 044eeb4563..34eb0784f4 100644 --- a/deployments/common/crds/appprotect.f5.com_apusersigs.yaml +++ b/deployments/common/crds/appprotect.f5.com_apusersigs.yaml @@ -2,7 +2,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.4.0 + controller-gen.kubebuilder.io/version: v0.10.0 creationTimestamp: null name: apusersigs.appprotect.f5.com spec: diff --git a/deployments/common/crds/appprotectdos.f5.com_apdoslogconfs.yaml b/deployments/common/crds/appprotectdos.f5.com_apdoslogconfs.yaml index f6e0f7110e..e23e87184b 100644 --- a/deployments/common/crds/appprotectdos.f5.com_apdoslogconfs.yaml +++ b/deployments/common/crds/appprotectdos.f5.com_apdoslogconfs.yaml @@ -38,13 +38,11 @@ spec: - splunk - arcsight - user-defined - default: splunk type: string format_string: type: string max_message_size: pattern: ^([1-9]|[1-5][0-9]|6[0-4])k$ - default: 5k type: string type: object filter: diff --git a/deployments/common/ns-and-sa.yaml b/deployments/common/ns-and-sa.yaml index 0bdee73511..b7316e6f30 100644 --- a/deployments/common/ns-and-sa.yaml +++ b/deployments/common/ns-and-sa.yaml @@ -1,11 +1,11 @@ apiVersion: v1 kind: Namespace metadata: - name: nginx-ingress + name: nginx-ingress --- apiVersion: v1 kind: ServiceAccount metadata: - name: nginx-ingress + name: nginx-ingress namespace: nginx-ingress -#automountServiceAccountToken: false \ No newline at end of file +#automountServiceAccountToken: false diff --git a/deployments/daemon-set/nginx-ingress.yaml b/deployments/daemon-set/nginx-ingress.yaml index 48f34e01d8..7b87dd0e6b 100644 --- a/deployments/daemon-set/nginx-ingress.yaml +++ b/deployments/daemon-set/nginx-ingress.yaml @@ -19,7 +19,7 @@ spec: serviceAccountName: nginx-ingress automountServiceAccountToken: true containers: - - image: nginx/nginx-ingress:2.3.1 + - image: nginx/nginx-ingress:2.4.1 imagePullPolicy: IfNotPresent name: nginx-ingress ports: diff --git a/deployments/daemon-set/nginx-plus-ingress.yaml b/deployments/daemon-set/nginx-plus-ingress.yaml index c5ec7a9337..59af9c0d73 100644 --- a/deployments/daemon-set/nginx-plus-ingress.yaml +++ b/deployments/daemon-set/nginx-plus-ingress.yaml @@ -19,7 +19,7 @@ spec: serviceAccountName: nginx-ingress automountServiceAccountToken: true containers: - - image: nginx-plus-ingress:2.3.1 + - image: nginx-plus-ingress:2.4.1 imagePullPolicy: IfNotPresent name: nginx-plus-ingress ports: diff --git a/deployments/deployment/nginx-ingress.yaml b/deployments/deployment/nginx-ingress.yaml index d87820e004..e26248e694 100644 --- a/deployments/deployment/nginx-ingress.yaml +++ b/deployments/deployment/nginx-ingress.yaml @@ -20,7 +20,7 @@ spec: serviceAccountName: nginx-ingress automountServiceAccountToken: true containers: - - image: nginx/nginx-ingress:2.3.1 + - image: nginx/nginx-ingress:2.4.1 imagePullPolicy: IfNotPresent name: nginx-ingress ports: diff --git a/deployments/deployment/nginx-plus-ingress.yaml b/deployments/deployment/nginx-plus-ingress.yaml index 4b43606ad3..97a0b08dc1 100644 --- a/deployments/deployment/nginx-plus-ingress.yaml +++ b/deployments/deployment/nginx-plus-ingress.yaml @@ -20,7 +20,7 @@ spec: serviceAccountName: nginx-ingress automountServiceAccountToken: true containers: - - image: nginx-plus-ingress:2.3.1 + - image: nginx-plus-ingress:2.4.1 imagePullPolicy: IfNotPresent name: nginx-plus-ingress ports: diff --git a/deployments/helm-chart-dos-arbitrator/Chart.yaml b/deployments/helm-chart-dos-arbitrator/Chart.yaml index e222d5c2b4..b0cce89c2f 100644 --- a/deployments/helm-chart-dos-arbitrator/Chart.yaml +++ b/deployments/helm-chart-dos-arbitrator/Chart.yaml @@ -2,12 +2,12 @@ name: nginx-appprotect-dos-arbitrator version: 0.1.0 appVersion: 1.1.0 apiVersion: v1 -kubeVersion: ">= 1.19.0-0" +kubeVersion: ">= 1.21.0-0" description: NGINX App Protect Dos arbitrator -icon: https://raw.githubusercontent.com/nginxinc/kubernetes-ingress/v2.3.0/deployments/helm-chart-dos-arbitrator/chart-icon.png +icon: https://raw.githubusercontent.com/nginxinc/kubernetes-ingress/v2.4.1/deployments/helm-chart-dos-arbitrator/chart-icon.png home: https://github.com/nginxinc/kubernetes-ingress sources: - - https://github.com/nginxinc/kubernetes-ingress/tree/v2.3.0/deployments/helm-chart-dos-arbitrator + - https://github.com/nginxinc/kubernetes-ingress/tree/v2.4.1/deployments/helm-chart-dos-arbitrator keywords: - appprotect-dos - nginx diff --git a/deployments/helm-chart-dos-arbitrator/README.md b/deployments/helm-chart-dos-arbitrator/README.md index 87a34b5a20..af51a69c9d 100644 --- a/deployments/helm-chart-dos-arbitrator/README.md +++ b/deployments/helm-chart-dos-arbitrator/README.md @@ -16,7 +16,7 @@ This step is required if you're installing the chart using its sources. Addition 1. Clone the Ingress Controller repo: ```console - $ git clone https://github.com/nginxinc/kubernetes-ingress.git --branch v2.3.1 + $ git clone https://github.com/nginxinc/kubernetes-ingress.git --branch v2.4.1 ``` 2. Change your working directory to /deployments/helm-chart-dos-arbitrator: ```console diff --git a/deployments/helm-chart-dos-arbitrator/templates/_helpers.tpl b/deployments/helm-chart-dos-arbitrator/templates/_helpers.tpl index 029b5434ce..02714455be 100644 --- a/deployments/helm-chart-dos-arbitrator/templates/_helpers.tpl +++ b/deployments/helm-chart-dos-arbitrator/templates/_helpers.tpl @@ -15,4 +15,4 @@ app.kubernetes.io/name: {{ include "arbitrator.name" . }} helm.sh/chart: {{ .Chart.Name }}-{{ .Chart.Version }} app.kubernetes.io/managed-by: {{ .Release.Service }} app.kubernetes.io/instance: {{ .Release.Name }} -{{- end -}} \ No newline at end of file +{{- end -}} diff --git a/deployments/helm-chart-dos-arbitrator/values.yaml b/deployments/helm-chart-dos-arbitrator/values.yaml index 1c42666205..eeacd9d3cf 100644 --- a/deployments/helm-chart-dos-arbitrator/values.yaml +++ b/deployments/helm-chart-dos-arbitrator/values.yaml @@ -1,6 +1,6 @@ arbitrator: ## The resources of the Arbitrator pods. - resources: + resources: limits: cpu: 500m memory: 128Mi diff --git a/deployments/helm-chart/Chart.yaml b/deployments/helm-chart/Chart.yaml index 5d10d941a1..00a42d0bfa 100644 --- a/deployments/helm-chart/Chart.yaml +++ b/deployments/helm-chart/Chart.yaml @@ -1,14 +1,14 @@ apiVersion: v2 name: nginx-ingress -version: 0.14.1 -appVersion: 2.3.1 -kubeVersion: ">= 1.19.0-0" +version: 0.15.1 +appVersion: 2.4.1 +kubeVersion: ">= 1.21.0-0" type: application description: NGINX Ingress Controller -icon: https://raw.githubusercontent.com/nginxinc/kubernetes-ingress/v2.3.1/deployments/helm-chart/chart-icon.png +icon: https://raw.githubusercontent.com/nginxinc/kubernetes-ingress/v2.4.1/deployments/helm-chart/chart-icon.png home: https://github.com/nginxinc/kubernetes-ingress sources: - - https://github.com/nginxinc/kubernetes-ingress/tree/v2.3.1/deployments/helm-chart + - https://github.com/nginxinc/kubernetes-ingress/tree/v2.4.1/deployments/helm-chart keywords: - ingress - nginx diff --git a/deployments/helm-chart/README.md b/deployments/helm-chart/README.md index e1f3b7988f..fce988fce2 100644 --- a/deployments/helm-chart/README.md +++ b/deployments/helm-chart/README.md @@ -23,7 +23,7 @@ This step is required if you're installing the chart using its sources. Addition 1. Clone the Ingress Controller repo: ```console - $ git clone https://github.com/nginxinc/kubernetes-ingress --branch v2.3.1 + $ git clone https://github.com/nginxinc/kubernetes-ingress --branch v2.4.1 ``` **Note**: If you want to use the experimental repository (`edge`), remove the `--branch` flag and value. @@ -150,14 +150,16 @@ Parameter | Description | Default --- | --- | --- `controller.name` | The name of the Ingress Controller daemonset or deployment. | Autogenerated `controller.kind` | The kind of the Ingress Controller installation - deployment or daemonset. | deployment +`controller.annotations` | Allows for setting of `annotations` for deployment or daemonset. | {} `controller.nginxplus` | Deploys the Ingress Controller for NGINX Plus. | false `controller.nginxReloadTimeout` | The timeout in milliseconds which the Ingress Controller will wait for a successful NGINX reload after a change or at the initial start. | 60000 `controller.hostNetwork` | Enables the Ingress Controller pods to use the host's network namespace. | false +`controller.dnsPolicy` | DNS policy for the Ingress Controller pods. | ClusterFirst `controller.nginxDebug` | Enables debugging for NGINX. Uses the `nginx-debug` binary. Requires `error-log-level: debug` in the ConfigMap via `controller.config.entries`. | false `controller.logLevel` | The log level of the Ingress Controller. | 1 `controller.image.digest ` | The image digest of the Ingress Controller. | None `controller.image.repository` | The image repository of the Ingress Controller. | nginx/nginx-ingress -`controller.image.tag` | The tag of the Ingress Controller image. | 2.3.1 +`controller.image.tag` | The tag of the Ingress Controller image. | 2.4.1 `controller.image.pullPolicy` | The pull policy for the Ingress Controller image. | IfNotPresent `controller.lifecycle` | The lifecycle of the Ingress Controller pods. | {} `controller.customConfigMap` | The name of the custom ConfigMap used by the Ingress Controller. If set, then the default config is ignored. | "" @@ -184,7 +186,8 @@ Parameter | Description | Default `controller.replicaCount` | The number of replicas of the Ingress Controller deployment. | 1 `controller.ingressClass` | A class of the Ingress Controller. An IngressClass resource with the name equal to the class must be deployed. Otherwise, the Ingress Controller will fail to start. The Ingress Controller only processes resources that belong to its class - i.e. have the "ingressClassName" field resource equal to the class. The Ingress Controller processes all the VirtualServer/VirtualServerRoute/TransportServer resources that do not have the "ingressClassName" field for all versions of kubernetes. | nginx `controller.setAsDefaultIngress` | New Ingresses without an `"ingressClassName"` field specified will be assigned the class specified in `controller.ingressClass`. | false -`controller.watchNamespace` | Comma separated list of namespaces the Ingress Controller should watch for resources. By default the Ingress Controller watches all namespaces. | "" +`controller.watchNamespace` | Comma separated list of namespaces the Ingress Controller should watch for resources. By default the Ingress Controller watches all namespaces. Please note that if configuring multiple namespaces using the Helm cli `--set` option, the string needs to wrapped in double quotes and the commas escaped using a backslash - e.g. `--set controller.watchNamespace="default\,nginx-ingress"`. | "" +`controller.watchSecretNamespace` | Comma separated list of namespaces the Ingress Controller should watch for resources of type Secret. If this arg is not configured, the Ingress Controller watches the same namespaces for all resources. See `watch-namespace`. Please note that if configuring multiple namespaces using the Helm cli `--set` option, the string needs to wrapped in double quotes and the commas escaped using a backslash - e.g. `--set controller.watchSecretNamespace="default\,nginx-ingress"`. | "" `controller.enableCustomResources` | Enable the custom resources. | true `controller.enablePreviewPolicies` | Enable preview policies. This parameter is deprecated. To enable OIDC Policies please use `controller.enableOIDC` instead. | false `controller.enableOIDC` | Enable OIDC policies. | false @@ -218,6 +221,7 @@ Parameter | Description | Default `controller.service.httpsPort.port` | The HTTPS port of the Ingress Controller service. | 443 `controller.service.httpsPort.nodePort` | The custom NodePort for the HTTPS port. Requires `controller.service.type` set to `NodePort`. | "" `controller.service.httpsPort.targetPort` | The target port of the HTTPS port of the Ingress Controller service. | 443 +`controller.serviceAccount.annotations` | The annotations of the Ingress Controller service account. | {} `controller.serviceAccount.name` | The name of the service account of the Ingress Controller pods. Used for RBAC. | Autogenerated `controller.serviceAccount.imagePullSecretName` | The name of the secret containing docker registry credentials. Secret must exist in the same namespace as the helm release. | "" `controller.serviceMonitor.name` | The name of the serviceMonitor. | Autogenerated @@ -244,6 +248,12 @@ Parameter | Description | Default `controller.readyStatus.initialDelaySeconds` | The number of seconds after the Ingress Controller pod has started before readiness probes are initiated. | 0 `controller.enableLatencyMetrics` | Enable collection of latency metrics for upstreams. Requires `prometheus.create`. | false `controller.minReadySeconds` | Specifies the minimum number of seconds for which a newly created Pod should be ready without any of its containers crashing, for it to be considered available. [docs](https://kubernetes.io/docs/concepts/workloads/controllers/deployment/#min-ready-seconds) | 0 +`controller.autoscaling.enabled` | Enables HorizontalPodAutoscaling. | false +`controller.autoscaling.annotations` | The annotations of the Ingress Controller HorizontalPodAutoscaler. | {} +`controller.autoscaling.minReplicas` | Minimum number of replicas for the HPA. | 1 +`controller.autoscaling.maxReplicas` | Maximum number of replicas for the HPA. | 3 +`controller.autoscaling.targetCPUUtilizationPercentage` | The target CPU utilization percentage. | 50 +`controller.autoscaling.targetMemoryUtilizationPercentage` | The target memory utilization percentage. | 50 `controller.strategy` | Specifies the strategy used to replace old Pods by new ones. [docs](https://kubernetes.io/docs/concepts/workloads/controllers/deployment/#strategy) | {} `controller.disableIPV6` | Disable IPV6 listeners explicitly for nodes that do not support the IPV6 stack. | false `rbac.create` | Configures RBAC. | true diff --git a/deployments/helm-chart/crds/appprotect.f5.com_aplogconfs.yaml b/deployments/helm-chart/crds/appprotect.f5.com_aplogconfs.yaml index bf29492895..53b7fb40d7 100644 --- a/deployments/helm-chart/crds/appprotect.f5.com_aplogconfs.yaml +++ b/deployments/helm-chart/crds/appprotect.f5.com_aplogconfs.yaml @@ -2,7 +2,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.4.0 + controller-gen.kubebuilder.io/version: v0.10.0 creationTimestamp: null name: aplogconfs.appprotect.f5.com spec: diff --git a/deployments/helm-chart/crds/appprotect.f5.com_appolicies.yaml b/deployments/helm-chart/crds/appprotect.f5.com_appolicies.yaml index ac4c6c31ef..8c494414cb 100644 --- a/deployments/helm-chart/crds/appprotect.f5.com_appolicies.yaml +++ b/deployments/helm-chart/crds/appprotect.f5.com_appolicies.yaml @@ -2,7 +2,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.4.0 + controller-gen.kubebuilder.io/version: v0.10.0 creationTimestamp: null name: appolicies.appprotect.f5.com spec: @@ -334,6 +334,8 @@ spec: type: object settings: properties: + caseSensitiveHttpHeaders: + type: boolean isEnabled: type: boolean type: object diff --git a/deployments/helm-chart/crds/appprotect.f5.com_apusersigs.yaml b/deployments/helm-chart/crds/appprotect.f5.com_apusersigs.yaml index 044eeb4563..34eb0784f4 100644 --- a/deployments/helm-chart/crds/appprotect.f5.com_apusersigs.yaml +++ b/deployments/helm-chart/crds/appprotect.f5.com_apusersigs.yaml @@ -2,7 +2,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.4.0 + controller-gen.kubebuilder.io/version: v0.10.0 creationTimestamp: null name: apusersigs.appprotect.f5.com spec: diff --git a/deployments/helm-chart/crds/appprotectdos.f5.com_apdoslogconfs.yaml b/deployments/helm-chart/crds/appprotectdos.f5.com_apdoslogconfs.yaml index f6e0f7110e..e23e87184b 100644 --- a/deployments/helm-chart/crds/appprotectdos.f5.com_apdoslogconfs.yaml +++ b/deployments/helm-chart/crds/appprotectdos.f5.com_apdoslogconfs.yaml @@ -38,13 +38,11 @@ spec: - splunk - arcsight - user-defined - default: splunk type: string format_string: type: string max_message_size: pattern: ^([1-9]|[1-5][0-9]|6[0-4])k$ - default: 5k type: string type: object filter: diff --git a/deployments/helm-chart/templates/NOTES.txt b/deployments/helm-chart/templates/NOTES.txt index c61fbd1a23..c5f4cdf405 100644 --- a/deployments/helm-chart/templates/NOTES.txt +++ b/deployments/helm-chart/templates/NOTES.txt @@ -1 +1 @@ -The NGINX Ingress Controller has been installed. \ No newline at end of file +The NGINX Ingress Controller has been installed. diff --git a/deployments/helm-chart/templates/controller-daemonset.yaml b/deployments/helm-chart/templates/controller-daemonset.yaml index f097814afd..7b311fa2d8 100644 --- a/deployments/helm-chart/templates/controller-daemonset.yaml +++ b/deployments/helm-chart/templates/controller-daemonset.yaml @@ -6,6 +6,9 @@ metadata: namespace: {{ .Release.Namespace }} labels: {{- include "nginx-ingress.labels" . | nindent 4 }} +{{- if .Values.controller.annotations }} + annotations: {{ toYaml .Values.controller.annotations | nindent 4 }} +{{- end }} spec: selector: matchLabels: @@ -68,6 +71,7 @@ spec: priorityClassName: {{ .Values.controller.priorityClassName }} {{- end }} hostNetwork: {{ .Values.controller.hostNetwork }} + dnsPolicy: {{ .Values.controller.dnsPolicy }} containers: - name: {{ include "nginx-ingress.name" . }} image: {{ include "nginx-ingress.image" . }} @@ -159,6 +163,9 @@ spec: - -ingress-class={{ .Values.controller.ingressClass }} {{- if .Values.controller.watchNamespace }} - -watch-namespace={{ .Values.controller.watchNamespace }} +{{- end }} +{{- if .Values.controller.watchSecretNamespace }} + - -watch-secret-namespace={{ .Values.controller.watchSecretNamespace }} {{- end }} - -health-status={{ .Values.controller.healthStatus }} - -health-status-uri={{ .Values.controller.healthStatusURI }} @@ -216,7 +223,6 @@ spec: {{- if .Values.controller.initContainers }} initContainers: {{ toYaml .Values.controller.initContainers | nindent 8 }} {{- end }} -{{- end }} {{- if .Values.controller.strategy }} updateStrategy: {{ toYaml .Values.controller.strategy | indent 4 }} @@ -224,3 +230,4 @@ spec: {{- if .Values.controller.minReadySeconds }} minReadySeconds: {{ .Values.controller.minReadySeconds }} {{- end }} +{{- end }} diff --git a/deployments/helm-chart/templates/controller-deployment.yaml b/deployments/helm-chart/templates/controller-deployment.yaml index e8b20d4252..9ec53bf972 100644 --- a/deployments/helm-chart/templates/controller-deployment.yaml +++ b/deployments/helm-chart/templates/controller-deployment.yaml @@ -6,6 +6,9 @@ metadata: namespace: {{ .Release.Namespace }} labels: {{- include "nginx-ingress.labels" . | nindent 4 }} +{{- if .Values.controller.annotations }} + annotations: {{ toYaml .Values.controller.annotations | nindent 4 }} +{{- end }} spec: replicas: {{ .Values.controller.replicaCount }} selector: @@ -73,6 +76,7 @@ spec: automountServiceAccountToken: true terminationGracePeriodSeconds: {{ .Values.controller.terminationGracePeriodSeconds }} hostNetwork: {{ .Values.controller.hostNetwork }} + dnsPolicy: {{ .Values.controller.dnsPolicy }} containers: - image: {{ include "nginx-ingress.image" . }} name: {{ include "nginx-ingress.name" . }} @@ -162,6 +166,9 @@ spec: - -ingress-class={{ .Values.controller.ingressClass }} {{- if .Values.controller.watchNamespace }} - -watch-namespace={{ .Values.controller.watchNamespace }} +{{- end }} +{{- if .Values.controller.watchSecretNamespace }} + - -watch-secret-namespace={{ .Values.controller.watchSecretNamespace }} {{- end }} - -health-status={{ .Values.controller.healthStatus }} - -health-status-uri={{ .Values.controller.healthStatusURI }} @@ -219,7 +226,6 @@ spec: {{- if .Values.controller.initContainers }} initContainers: {{ toYaml .Values.controller.initContainers | nindent 8 }} {{- end }} -{{- end }} {{- if .Values.controller.strategy }} strategy: {{ toYaml .Values.controller.strategy | indent 4 }} @@ -227,3 +233,4 @@ spec: {{- if .Values.controller.minReadySeconds }} minReadySeconds: {{ .Values.controller.minReadySeconds }} {{- end }} +{{- end }} diff --git a/deployments/helm-chart/templates/controller-hpa.yaml b/deployments/helm-chart/templates/controller-hpa.yaml new file mode 100644 index 0000000000..1d705f15d1 --- /dev/null +++ b/deployments/helm-chart/templates/controller-hpa.yaml @@ -0,0 +1,37 @@ +{{- if and .Values.controller.autoscaling.enabled (eq .Values.controller.kind "deployment") (semverCompare ">=1.23.0" .Capabilities.KubeVersion.Version) -}} +apiVersion: autoscaling/v2 +kind: HorizontalPodAutoscaler +metadata: + name: {{ include "nginx-ingress.serviceName" . }} + namespace: {{ .Release.Namespace }} + labels: + {{- include "nginx-ingress.labels" . | nindent 4 }} +{{- if .Values.controller.autoscaling.annotations }} + annotations: +{{ toYaml .Values.controller.autoscaling.annotations | indent 4 }} +{{- end }} +spec: + scaleTargetRef: + apiVersion: apps/v1 + kind: Deployment + name: {{ default (include "nginx-ingress.name" .) .Values.controller.name }} + minReplicas: {{ .Values.controller.autoscaling.minReplicas }} + maxReplicas: {{ .Values.controller.autoscaling.maxReplicas }} + metrics: + {{- if .Values.controller.autoscaling.targetCPUUtilizationPercentage }} + - type: Resource + resource: + name: cpu + target: + type: Utilization + averageUtilization: {{ .Values.controller.autoscaling.targetCPUUtilizationPercentage }} + {{- end }} + {{- if .Values.controller.autoscaling.targetMemoryUtilizationPercentage }} + - type: Resource + resource: + name: memory + target: + type: Utilization + averageUtilization: {{ .Values.controller.autoscaling.targetMemoryUtilizationPercentage }} + {{- end }} +{{- end }} diff --git a/deployments/helm-chart/templates/controller-serviceaccount.yaml b/deployments/helm-chart/templates/controller-serviceaccount.yaml index c03c6a793b..e1a3b51a06 100644 --- a/deployments/helm-chart/templates/controller-serviceaccount.yaml +++ b/deployments/helm-chart/templates/controller-serviceaccount.yaml @@ -2,6 +2,9 @@ apiVersion: v1 kind: ServiceAccount metadata: +{{- if .Values.controller.serviceAccount.annotations }} + annotations: {{- toYaml .Values.controller.serviceAccount.annotations | nindent 4 }} +{{- end }} name: {{ include "nginx-ingress.serviceAccountName" . }} namespace: {{ .Release.Namespace }} labels: diff --git a/deployments/helm-chart/templates/rbac.yaml b/deployments/helm-chart/templates/rbac.yaml index 55329394e2..ad95710a86 100644 --- a/deployments/helm-chart/templates/rbac.yaml +++ b/deployments/helm-chart/templates/rbac.yaml @@ -7,14 +7,14 @@ metadata: {{- include "nginx-ingress.labels" . | nindent 4 }} rules: {{- if .Values.controller.appprotect.enable }} -- apiGroups: +- apiGroups: - appprotect.f5.com - resources: + resources: - appolicies - aplogconfs - apusersigs - verbs: - - get + verbs: + - get - watch - list {{- end }} @@ -66,6 +66,14 @@ rules: verbs: - list - watch +- apiGroups: + - "" + resources: + - namespaces + verbs: + - get + - list + - watch - apiGroups: - "" resources: @@ -74,6 +82,16 @@ rules: - create - patch - list +- apiGroups: + - coordination.k8s.io + resources: + - leases + verbs: + - get + - list + - watch + - update + - create - apiGroups: - networking.k8s.io resources: diff --git a/deployments/helm-chart/values-icp.yaml b/deployments/helm-chart/values-icp.yaml index f50a2ff984..1d0a6e7012 100644 --- a/deployments/helm-chart/values-icp.yaml +++ b/deployments/helm-chart/values-icp.yaml @@ -3,7 +3,7 @@ controller: nginxplus: true image: repository: mycluster.icp:8500/kube-system/nginx-plus-ingress - tag: "2.3.1" + tag: "2.4.1" nodeSelector: beta.kubernetes.io/arch: "amd64" proxy: true diff --git a/deployments/helm-chart/values-nsm.yaml b/deployments/helm-chart/values-nsm.yaml index 73e7b93166..153a3aeb86 100644 --- a/deployments/helm-chart/values-nsm.yaml +++ b/deployments/helm-chart/values-nsm.yaml @@ -2,7 +2,7 @@ controller: nginxplus: true image: repository: nginx-plus-ingress - tag: "2.3.1" + tag: "2.4.1" enableLatencyMetrics: true nginxServiceMesh: enable: true diff --git a/deployments/helm-chart/values-plus.yaml b/deployments/helm-chart/values-plus.yaml index cb202bb3d3..479854940d 100644 --- a/deployments/helm-chart/values-plus.yaml +++ b/deployments/helm-chart/values-plus.yaml @@ -2,4 +2,4 @@ controller: nginxplus: true image: repository: nginx-plus-ingress - tag: "2.3.1" + tag: "2.4.1" diff --git a/deployments/helm-chart/values.schema.json b/deployments/helm-chart/values.schema.json new file mode 100644 index 0000000000..09163df0fe --- /dev/null +++ b/deployments/helm-chart/values.schema.json @@ -0,0 +1,1595 @@ +{ + "$schema": "https://json-schema.org/draft/2019-09/schema", + "type": "object", + "default": {}, + "title": "Root Schema", + "required": [ + "controller", + "rbac", + "prometheus", + "nginxServiceMesh" + ], + "properties": { + "controller": { + "type": "object", + "default": {}, + "title": "The Ingress Controller Helm Schema", + "required": [ + "kind", + "image" + ], + "properties": { + "name": { + "type": "string", + "default": "", + "title": "The name of the Ingress Controller", + "examples": [ + "nginx-ingress" + ] + }, + "kind": { + "type": "string", + "default": "", + "title": "The kind of the Ingress Controller", + "enum": [ + "deployment", + "daemonset" + ], + "examples": [ + "deployment", + "daemonset" + ] + }, + "nginxplus": { + "type": "boolean", + "default": false, + "title": "Deploys the Ingress Controller for NGINX Plus", + "examples": [ + false, + true + ] + }, + "nginxReloadTimeout": { + "type": "integer", + "default": 0, + "title": "Timeout in milliseconds which the Ingress Controller will wait for a successful NGINX reload after a change or at the initial start", + "examples": [ + 60000 + ] + }, + "appprotect": { + "type": "object", + "default": {}, + "title": "The App Protect WAF Schema", + "required": [ + "enable" + ], + "properties": { + "enable": { + "type": "boolean", + "default": false, + "title": "Enable the App Protect WAF module in the Ingress Controller", + "examples": [ + false, + true + ] + }, + "logLevel": { + "type": "string", + "default": "", + "title": "The logLevel for App Protect WAF", + "enum": [ + "fatal", + "error", + "warn", + "info", + "debug", + "trace" + ], + "examples": [ + "fatal", + "error", + "warn", + "info", + "debug", + "trace" + ] + } + }, + "examples": [ + { + "enable": true, + "logLevel": "fatal" + } + ] + }, + "appprotectdos": { + "type": "object", + "default": {}, + "title": "The App Protect DoS Schema", + "required": [ + "enable" + ], + "properties": { + "enable": { + "type": "boolean", + "default": false, + "title": "Enable the App Protect DoS module in the Ingress Controller", + "examples": [ + false, + true + ] + }, + "debug": { + "type": "boolean", + "default": false, + "title": "debugging for App Protect DoS", + "examples": [ + false, + true + ] + }, + "maxWorkers": { + "type": "integer", + "default": 0, + "title": "Max number of nginx processes to support", + "examples": [ + 0 + ] + }, + "maxDaemons": { + "type": "integer", + "default": 0, + "title": "Max number of ADMD instances", + "examples": [ + 0 + ] + }, + "memory": { + "type": "integer", + "default": 0, + "title": "RAM memory size to consume in MB", + "examples": [ + 0 + ] + } + }, + "examples": [ + { + "enable": true, + "debug": false, + "maxWorkers": 0, + "maxDaemons": 0, + "memory": 0 + } + ] + }, + "hostNetwork": { + "type": "boolean", + "default": false, + "title": "The hostNetwork Schema", + "examples": [ + false, + true + ] + }, + "nginxDebug": { + "type": "boolean", + "default": false, + "title": "Enables debugging for NGINX", + "examples": [ + false, + true + ] + }, + "logLevel": { + "type": "integer", + "default": 1, + "title": "The logLevel of the Ingress Controller", + "enum": [ + 0, + 1, + 2, + 3 + ], + "examples": [ + 1 + ] + }, + "customPorts": { + "type": "array", + "default": [], + "title": "The customPorts to expose on the NGINX ingress controller pod", + "items": { + "type": "object", + "$ref": "https://raw.githubusercontent.com/yannh/kubernetes-json-schema/master/v1.25.2/_definitions.json#/definitions/io.k8s.api.core.v1.ContainerPort" + }, + "examples": [ + [ + { + "name": "http", + "containerPort": 80, + "protocol": "TCP" + }, + { + "name": "https", + "containerPort": 443, + "protocol": "TCP" + } + ] + ] + }, + "image": { + "type": "object", + "default": {}, + "title": "The image Schema", + "required": [ + "repository", + "tag" + ], + "properties": { + "repository": { + "type": "string", + "default": "nginx/nginx-ingress", + "title": "The repository of the Ingress Controller", + "examples": [ + "nginx/nginx-ingress" + ] + }, + "tag": { + "type": "string", + "default": "2.3.1", + "title": "The tag of the Ingress Controller image", + "examples": [ + "2.3.1" + ] + }, + "digest": { + "type": "string", + "default": "", + "title": "The digest of the Ingress Controller image", + "examples": [ + "sha256:2710c264e8eaeb663cee63db37b75a1ac1709f63a130fb091c843a6c3a4dc572" + ] + }, + "pullPolicy": { + "type": "string", + "default": "IfNotPresent", + "title": "The pullPolicy for the Ingress Controller image", + "allOf": [ + { + "$ref": "https://raw.githubusercontent.com/yannh/kubernetes-json-schema/master/v1.25.2/_definitions.json#/definitions/io.k8s.api.core.v1.Container/properties/imagePullPolicy" + }, + { + "enum": [ + "Always", + "IfNotPresent", + "Never" + ] + } + ], + "examples": [ + "Always", + "IfNotPresent", + "Never" + ] + } + }, + "examples": [ + { + "repository": "nginx/nginx-ingress", + "tag": "2.3.1", + "pullPolicy": "IfNotPresent" + } + ] + }, + "lifecycle": { + "type": "object", + "default": {}, + "title": "The lifecycle Schema", + "$ref": "https://raw.githubusercontent.com/yannh/kubernetes-json-schema/master/v1.25.2/_definitions.json#/definitions/io.k8s.api.core.v1.Lifecycle" + }, + "customConfigMap": { + "type": "string", + "default": "", + "title": "The customConfigMap Schema", + "examples": [ + "" + ] + }, + "config": { + "type": "object", + "default": {}, + "title": "The config Schema", + "required": [], + "properties": { + "name": { + "type": "string", + "default": "", + "title": "The name Schema", + "examples": [ + "" + ] + }, + "annotations": { + "type": "object", + "default": {}, + "title": "The annotations Schema", + "$ref": "https://raw.githubusercontent.com/yannh/kubernetes-json-schema/master/v1.25.2/_definitions.json#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta/properties/annotations" + }, + "entries": { + "type": "object", + "default": {}, + "title": "The entries Schema", + "required": [], + "properties": {}, + "examples": [ + {} + ] + } + }, + "examples": [ + { + "name": "", + "annotations": {}, + "entries": {} + } + ] + }, + "defaultTLS": { + "type": "object", + "default": {}, + "title": "The defaultTLS Schema", + "required": [], + "properties": { + "cert": { + "type": "string", + "default": "", + "title": "The cert Schema", + "examples": [] + }, + "key": { + "type": "string", + "default": "", + "title": "The key Schema", + "examples": [] + }, + "secret": { + "type": "string", + "default": "", + "title": "The secret Schema", + "examples": [ + "" + ] + } + }, + "examples": [] + }, + "wildcardTLS": { + "type": "object", + "default": {}, + "title": "The wildcardTLS Schema", + "required": [], + "properties": { + "cert": { + "type": "string", + "default": "", + "title": "The cert Schema", + "examples": [ + "" + ] + }, + "key": { + "type": "string", + "default": "", + "title": "The key Schema", + "examples": [ + "" + ] + }, + "secret": { + "type": "string", + "default": "", + "title": "The secret Schema", + "examples": [ + "" + ] + } + }, + "examples": [] + }, + "nodeSelector": { + "type": "object", + "default": {}, + "title": "The nodeSelector Schema", + "$ref": "https://raw.githubusercontent.com/yannh/kubernetes-json-schema/master/v1.25.2/_definitions.json#/definitions/io.k8s.api.core.v1.NodeSelector" + }, + "terminationGracePeriodSeconds": { + "type": "integer", + "default": 30, + "title": "The terminationGracePeriodSeconds Schema", + "$ref": "https://raw.githubusercontent.com/yannh/kubernetes-json-schema/master/v1.25.2/_definitions.json#/definitions/io.k8s.api.core.v1.PodSpec/properties/terminationGracePeriodSeconds" + }, + "resources": { + "type": "object", + "default": {}, + "title": "The resources Schema", + "$ref": "https://raw.githubusercontent.com/yannh/kubernetes-json-schema/master/v1.25.2/_definitions.json#/definitions/io.k8s.api.core.v1.ResourceRequirements" + }, + "tolerations": { + "type": "array", + "default": [], + "title": "The tolerations Schema", + "items": { + "type": "object", + "$ref": "https://raw.githubusercontent.com/yannh/kubernetes-json-schema/master/v1.25.2/_definitions.json#/definitions/io.k8s.api.core.v1.Toleration" + } + }, + "affinity": { + "type": "object", + "default": {}, + "title": "The affinity Schema", + "$ref": "https://raw.githubusercontent.com/yannh/kubernetes-json-schema/master/v1.25.2/_definitions.json#/definitions/io.k8s.api.core.v1.Affinity" + }, + "topologySpreadConstraints": { + "type": "object", + "default": {}, + "title": "The topologySpreadConstraints Schema", + "$ref": "https://raw.githubusercontent.com/yannh/kubernetes-json-schema/master/v1.25.2/_definitions.json#/definitions/io.k8s.api.core.v1.TopologySpreadConstraint" + }, + "volumes": { + "type": "array", + "default": [], + "title": "The volumes Schema", + "items": { + "type": "object", + "$ref": "https://raw.githubusercontent.com/yannh/kubernetes-json-schema/master/v1.25.2/_definitions.json#/definitions/io.k8s.api.core.v1.Volume" + } + }, + "volumeMounts": { + "type": "array", + "default": [], + "title": "The volumeMounts Schema", + "items": { + "type": "object", + "$ref": "https://raw.githubusercontent.com/yannh/kubernetes-json-schema/master/v1.25.2/_definitions.json#/definitions/io.k8s.api.core.v1.VolumeMount" + } + }, + "initContainers": { + "type": "array", + "default": [], + "title": "The initContainers Schema", + "items": { + "type": "object", + "$ref": "https://raw.githubusercontent.com/yannh/kubernetes-json-schema/master/v1.25.2/_definitions.json#/definitions/io.k8s.api.core.v1.Container" + } + }, + "minReadySeconds": { + "type": "integer", + "default": 0, + "title": "The minReadySeconds Schema", + "$ref": "https://raw.githubusercontent.com/yannh/kubernetes-json-schema/master/v1.25.2/_definitions.json#/definitions/io.k8s.api.apps.v1.DeploymentSpec/properties/minReadySeconds" + }, + "strategy": { + "type": "object", + "default": {}, + "title": "The strategy Schema", + "allOf": [ + { + "$ref": "https://raw.githubusercontent.com/yannh/kubernetes-json-schema/master/v1.25.2/_definitions.json#/definitions/io.k8s.api.apps.v1.DeploymentStrategy" + }, + { + "properties": { + "type": { + "type": "string", + "enum": [ + "Recreate", + "RollingUpdate" + ] + } + } + } + ] + }, + "extraContainers": { + "type": "array", + "default": [], + "title": "The extraContainers Schema", + "items": { + "type": "object", + "$ref": "https://raw.githubusercontent.com/yannh/kubernetes-json-schema/master/v1.25.2/_definitions.json#/definitions/io.k8s.api.core.v1.Container" + } + }, + "replicaCount": { + "type": "integer", + "default": 1, + "title": "The replicaCount", + "examples": [ + 1 + ] + }, + "ingressClass": { + "type": "string", + "default": "", + "title": "The ingressClass", + "examples": [ + "nginx" + ] + }, + "setAsDefaultIngress": { + "type": "boolean", + "default": false, + "title": "The setAsDefaultIngress", + "examples": [ + false + ] + }, + "watchNamespace": { + "type": "string", + "default": "", + "title": "The watchNamespace", + "examples": [ + "" + ] + }, + "enableCustomResources": { + "type": "boolean", + "default": false, + "title": "The enableCustomResources", + "examples": [ + true + ] + }, + "enablePreviewPolicies": { + "type": "boolean", + "default": false, + "title": "The enablePreviewPolicies", + "examples": [ + false + ] + }, + "enableOIDC": { + "type": "boolean", + "default": false, + "title": "The enableOIDC", + "examples": [ + false + ] + }, + "includeYear": { + "type": "boolean", + "default": false, + "title": "The includeYear", + "examples": [ + false + ] + }, + "enableTLSPassthrough": { + "type": "boolean", + "default": false, + "title": "The enableTLSPassthrough", + "examples": [ + false + ] + }, + "enableCertManager": { + "type": "boolean", + "default": false, + "title": "The enableCertManager", + "examples": [ + false + ] + }, + "enableExternalDNS": { + "type": "boolean", + "default": false, + "title": "The enableExternalDNS", + "examples": [ + false + ] + }, + "globalConfiguration": { + "type": "object", + "default": {}, + "title": "The globalConfiguration Schema", + "required": [ + "create", + "spec" + ], + "properties": { + "create": { + "type": "boolean", + "default": false, + "title": "The create Schema", + "examples": [ + false + ] + }, + "spec": { + "type": "object", + "default": {}, + "title": "The spec Schema", + "required": [], + "properties": { + "listeners": { + "type": "array", + "default": [], + "title": "The listeners Schema", + "items": { + "type": "object", + "default": {}, + "properties": { + "port": { + "type": "integer", + "default": 0, + "title": "The port", + "examples": [ + 5353 + ] + }, + "protocol": { + "type": "string", + "default": "", + "title": "The protocol", + "examples": [ + "TCP" + ] + }, + "name": { + "type": "string", + "default": "", + "title": "The name", + "examples": [ + "dns-tcp" + ] + } + } + } + } + }, + "examples": [ + {} + ] + } + }, + "examples": [ + { + "create": false, + "spec": {} + } + ] + }, + "enableSnippets": { + "type": "boolean", + "default": false, + "title": "The enableSnippets", + "examples": [ + false + ] + }, + "healthStatus": { + "type": "boolean", + "default": false, + "title": "The healthStatus", + "examples": [ + false + ] + }, + "healthStatusURI": { + "type": "string", + "format": "uri-reference", + "default": "/nginx-health", + "title": "The healthStatusURI Schema", + "examples": [ + "/nginx-health" + ] + }, + "nginxStatus": { + "type": "object", + "default": {}, + "title": "The nginxStatus Schema", + "required": [], + "properties": { + "enable": { + "type": "boolean", + "default": false, + "title": "The enable", + "examples": [ + true + ] + }, + "port": { + "type": "integer", + "default": 8080, + "title": "The port", + "examples": [ + 8080 + ] + }, + "allowCidrs": { + "type": "string", + "default": "127.0.0.1", + "title": "The allowCidrs", + "examples": [ + "127.0.0.1" + ] + } + }, + "examples": [ + { + "enable": true, + "port": 8080, + "allowCidrs": "127.0.0.1" + } + ] + }, + "service": { + "type": "object", + "default": {}, + "title": "The service Schema", + "required": [], + "properties": { + "create": { + "type": "boolean", + "default": false, + "title": "The create", + "examples": [ + true + ] + }, + "type": { + "type": "string", + "default": "", + "title": "The type", + "$ref": "https://raw.githubusercontent.com/yannh/kubernetes-json-schema/master/v1.25.2/_definitions.json#/definitions/io.k8s.api.core.v1.ServiceSpec/properties/type" + }, + "externalTrafficPolicy": { + "type": "string", + "default": "", + "title": "The externalTrafficPolicy", + "$ref": "https://raw.githubusercontent.com/yannh/kubernetes-json-schema/master/v1.25.2/_definitions.json#/definitions/io.k8s.api.core.v1.ServiceSpec/properties/externalTrafficPolicy" + }, + "annotations": { + "type": "object", + "default": {}, + "title": "The annotations", + "$ref": "https://raw.githubusercontent.com/yannh/kubernetes-json-schema/master/v1.25.2/_definitions.json#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta/properties/annotations" + }, + "extraLabels": { + "type": "object", + "default": {}, + "title": "The extraLabels", + "required": [], + "properties": {}, + "examples": [ + {} + ] + }, + "loadBalancerIP": { + "type": "string", + "default": "", + "title": "The loadBalancerIP", + "$ref": "https://raw.githubusercontent.com/yannh/kubernetes-json-schema/master/v1.25.2/_definitions.json#/definitions/io.k8s.api.core.v1.ServiceSpec/properties/loadBalancerIP" + }, + "externalIPs": { + "type": "array", + "default": [], + "title": "The externalIPs", + "$ref": "https://raw.githubusercontent.com/yannh/kubernetes-json-schema/master/v1.25.2/_definitions.json#/definitions/io.k8s.api.core.v1.ServiceSpec/properties/externalIPs" + }, + "loadBalancerSourceRanges": { + "type": "array", + "default": [], + "title": "The loadBalancerSourceRanges", + "items": {}, + "examples": [ + [] + ] + }, + "name": { + "type": "string", + "default": "", + "title": "The name", + "examples": [ + "" + ] + }, + "allocateLoadBalancerNodePorts": { + "type": "boolean", + "default": false, + "title": "The allocateLoadBalancerNodePorts Schema", + "ref": "https://raw.githubusercontent.com/yannh/kubernetes-json-schema/master/v1.25.2/_definitions.json#/definitions/io.k8s.api.core.v1.ServiceSpec/properties/allocateLoadBalancerNodePorts" + }, + "ipFamilyPolicy": { + "type": "string", + "default": "", + "title": "The ipFamilyPolicy Schema", + "$ref": "https://raw.githubusercontent.com/yannh/kubernetes-json-schema/master/v1.25.2/_definitions.json#/definitions/io.k8s.api.core.v1.ServiceSpec/properties/ipFamilyPolicy", + "examples": [ + "" + ] + }, + "ipFamilies": { + "type": "array", + "default": [], + "title": "The ipFamilies Schema", + "ref": "https://raw.githubusercontent.com/yannh/kubernetes-json-schema/master/v1.25.2/_definitions.json#/definitions/io.k8s.api.core.v1.ServiceSpec/properties/ipFamilies" + }, + "httpPort": { + "type": "object", + "default": {}, + "title": "The httpPort", + "required": [], + "properties": { + "enable": { + "type": "boolean", + "default": false, + "title": "The enable", + "examples": [ + true + ] + }, + "port": { + "type": "integer", + "default": 0, + "title": "The port", + "examples": [ + 80 + ] + }, + "nodePort": { + "type": "integer", + "default": 0, + "title": "The nodePort", + "examples": [ + 443 + ] + }, + "targetPort": { + "type": "integer", + "default": 0, + "title": "The targetPort", + "examples": [ + 80 + ] + } + }, + "examples": [ + { + "enable": true, + "port": 80, + "nodePort": "", + "targetPort": 80 + } + ] + }, + "httpsPort": { + "type": "object", + "default": {}, + "title": "The httpsPort", + "required": [], + "properties": { + "enable": { + "type": "boolean", + "default": false, + "title": "The enable", + "examples": [ + true + ] + }, + "port": { + "type": "integer", + "default": 0, + "title": "The port", + "examples": [ + 443 + ] + }, + "nodePort": { + "type": "integer", + "default": 0, + "title": "The nodePort", + "examples": [ + 443 + ] + }, + "targetPort": { + "type": "integer", + "default": 0, + "title": "The targetPort", + "examples": [ + 443 + ] + } + }, + "examples": [ + { + "enable": true, + "port": 443, + "nodePort": "", + "targetPort": 443 + } + ] + }, + "customPorts": { + "type": "array", + "default": [], + "title": "The customPorts", + "items": { + "type": "object", + "ref": "https://raw.githubusercontent.com/yannh/kubernetes-json-schema/master/v1.25.2/_definitions.json#/definitions/io.k8s.api.core.v1.ServicePort" + } + } + }, + "examples": [ + { + "create": true, + "type": "LoadBalancer", + "externalTrafficPolicy": "Local", + "annotations": {}, + "extraLabels": {}, + "loadBalancerIP": "", + "externalIPs": [], + "loadBalancerSourceRanges": [], + "name": "", + "allocateLoadBalancerNodePorts": false, + "ipFamilyPolicy": "", + "ipFamilies": [], + "httpPort": { + "enable": true, + "port": 80, + "targetPort": 80 + }, + "httpsPort": { + "enable": true, + "port": 443, + "targetPort": 443 + }, + "customPorts": [] + } + ] + }, + "serviceAccount": { + "type": "object", + "default": {}, + "title": "The serviceAccount Schema", + "required": [], + "properties": { + "name": { + "type": "string", + "default": "", + "title": "The name Schema", + "examples": [ + "" + ] + }, + "imagePullSecretName": { + "type": "string", + "default": "", + "title": "The imagePullSecretName", + "examples": [ + "" + ] + } + }, + "examples": [ + { + "name": "", + "imagePullSecretName": "" + } + ] + }, + "serviceMonitor": { + "type": "object", + "default": {}, + "title": "The serviceMonitor Schema", + "required": [], + "properties": { + "create": { + "type": "boolean", + "default": false, + "title": "The create", + "examples": [ + false + ] + }, + "name": { + "type": "string", + "default": "", + "title": "The name", + "examples": [ + "" + ] + }, + "labels": { + "type": "object", + "default": {}, + "title": "The labels Schema", + "$ref": "https://raw.githubusercontent.com/yannh/kubernetes-json-schema/master/v1.25.2/_definitions.json#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta/properties/labels" + }, + "selectorMatchLabels": { + "type": "object", + "default": {}, + "title": "The selectorMatchLabels Schema", + "$ref": "https://raw.githubusercontent.com/yannh/kubernetes-json-schema/master/v1.25.2/_definitions.json#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.LabelSelector/properties/matchLabels" + }, + "endpoints": { + "type": "array", + "default": [], + "title": "The endpoints", + "required": [], + "items": {} + } + }, + "examples": [ + { + "create": false, + "name": "", + "labels": {}, + "selectorMatchLabels": {}, + "endpoints": [] + } + ] + }, + "reportIngressStatus": { + "type": "object", + "default": {}, + "title": "The reportIngressStatus Schema", + "required": [ + "enable" + ], + "properties": { + "enable": { + "type": "boolean", + "default": false, + "title": "The enable", + "examples": [ + true + ] + }, + "externalService": { + "type": "string", + "default": "", + "title": "The externalService", + "examples": [ + "" + ] + }, + "ingressLink": { + "type": "string", + "default": "", + "title": "The ingressLink", + "examples": [ + "" + ] + }, + "enableLeaderElection": { + "type": "boolean", + "default": false, + "title": "The enableLeaderElection", + "examples": [ + true + ] + }, + "leaderElectionLockName": { + "type": "string", + "default": "", + "title": "The leaderElectionLockName", + "examples": [ + "" + ] + }, + "annotations": { + "type": "object", + "default": {}, + "title": "The annotations Schema", + "$ref": "https://raw.githubusercontent.com/yannh/kubernetes-json-schema/master/v1.25.2/_definitions.json#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta/properties/annotations" + } + }, + "examples": [ + { + "enable": true, + "externalService": "", + "ingressLink": "", + "enableLeaderElection": true, + "leaderElectionLockName": "", + "annotations": {} + } + ] + }, + "pod": { + "type": "object", + "default": {}, + "title": "The pod Schema", + "required": [], + "properties": { + "annotations": { + "type": "object", + "default": {}, + "title": "The annotations Schema", + "$ref": "https://raw.githubusercontent.com/yannh/kubernetes-json-schema/master/v1.25.2/_definitions.json#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta/properties/annotations" + }, + "extraLabels": { + "type": "object", + "default": {}, + "title": "The extraLabels Schema", + "$ref": "https://raw.githubusercontent.com/yannh/kubernetes-json-schema/master/v1.25.2/_definitions.json#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta/properties/labels" + } + }, + "examples": [ + { + "annotations": {}, + "extraLabels": {} + } + ] + }, + "priorityClassName": { + "type": "null", + "default": null, + "title": "The priorityClassName", + "examples": [ + null + ] + }, + "readyStatus": { + "type": "object", + "default": {}, + "title": "The readyStatus", + "required": [], + "properties": { + "enable": { + "type": "boolean", + "default": false, + "title": "The enable", + "examples": [ + true + ] + }, + "port": { + "type": "integer", + "default": 0, + "title": "The port", + "examples": [ + 8081 + ] + }, + "initialDelaySeconds": { + "type": "integer", + "default": 0, + "$ref": "https://raw.githubusercontent.com/yannh/kubernetes-json-schema/master/v1.25.2/_definitions.json#/definitions/io.k8s.api.core.v1.Probe/properties/initialDelaySeconds" + } + }, + "examples": [ + { + "enable": true, + "port": 8081, + "initialDelaySeconds": 0 + } + ] + }, + "enableLatencyMetrics": { + "type": "boolean", + "default": false, + "title": "The enableLatencyMetrics", + "examples": [ + false + ] + }, + "disableIPV6": { + "type": "boolean", + "default": false, + "title": "The disableIPV6", + "examples": [ + false + ] + } + }, + "examples": [ + { + "name": "", + "kind": "deployment", + "nginxplus": false, + "nginxReloadTimeout": 60000, + "appprotect": { + "enable": false, + "logLevel": "fatal" + }, + "appprotectdos": { + "enable": false, + "debug": false, + "maxWorkers": 0, + "maxDaemons": 0, + "memory": 0 + }, + "hostNetwork": false, + "nginxDebug": false, + "logLevel": 1, + "customPorts": [], + "image": { + "repository": "nginx/nginx-ingress", + "tag": "2.3.1", + "digest": "", + "pullPolicy": "IfNotPresent" + }, + "lifecycle": {}, + "customConfigMap": "", + "config": { + "name": "", + "annotations": {}, + "entries": {} + }, + "defaultTLS": { + "cert": "", + "key": "", + "secret": "" + }, + "wildcardTLS": { + "cert": "", + "key": "", + "secret": "" + }, + "nodeSelector": {}, + "terminationGracePeriodSeconds": 30, + "resources": { + "requests": { + "cpu": "100m", + "memory": "128Mi" + } + }, + "tolerations": [], + "affinity": {}, + "topologySpreadConstraints": {}, + "volumes": [], + "volumeMounts": [], + "initContainers": [], + "minReadySeconds": 0, + "strategy": {}, + "extraContainers": [], + "replicaCount": 1, + "ingressClass": "nginx", + "setAsDefaultIngress": false, + "watchNamespace": "", + "enableCustomResources": true, + "enablePreviewPolicies": false, + "enableOIDC": false, + "includeYear": false, + "enableTLSPassthrough": false, + "enableCertManager": false, + "enableExternalDNS": false, + "globalConfiguration": { + "create": false, + "spec": {} + }, + "enableSnippets": false, + "healthStatus": false, + "healthStatusURI": "/nginx-health", + "nginxStatus": { + "enable": true, + "port": 8080, + "allowCidrs": "127.0.0.1" + }, + "service": { + "create": true, + "type": "LoadBalancer", + "externalTrafficPolicy": "Local", + "annotations": {}, + "extraLabels": {}, + "loadBalancerIP": "", + "externalIPs": [], + "loadBalancerSourceRanges": [], + "name": "", + "allocateLoadBalancerNodePorts": false, + "ipFamilyPolicy": "", + "ipFamilies": [], + "httpPort": { + "enable": true, + "port": 80, + "targetPort": 80 + }, + "httpsPort": { + "enable": true, + "port": 443, + "targetPort": 443 + }, + "customPorts": [] + }, + "serviceAccount": { + "name": "", + "imagePullSecretName": "" + }, + "serviceMonitor": { + "create": false, + "name": "", + "labels": {}, + "selectorMatchLabels": {}, + "endpoints": {} + }, + "reportIngressStatus": { + "enable": true, + "externalService": "", + "ingressLink": "", + "enableLeaderElection": true, + "leaderElectionLockName": "", + "annotations": {} + }, + "pod": { + "annotations": {}, + "extraLabels": {} + }, + "priorityClassName": null, + "readyStatus": { + "enable": true, + "port": 8081, + "initialDelaySeconds": 0 + }, + "enableLatencyMetrics": false, + "disableIPV6": false + } + ] + }, + "rbac": { + "type": "object", + "default": {}, + "title": "The rbac Schema", + "required": [ + "create" + ], + "properties": { + "create": { + "type": "boolean", + "default": false, + "title": "The create Schema", + "examples": [ + true + ] + } + }, + "examples": [ + { + "create": true + } + ] + }, + "prometheus": { + "type": "object", + "default": {}, + "title": "The prometheus Schema", + "required": [ + "create" + ], + "properties": { + "create": { + "type": "boolean", + "default": false, + "title": "The create", + "examples": [ + true + ] + }, + "port": { + "type": "integer", + "default": 9113, + "title": "The port", + "examples": [ + 9113 + ] + }, + "secret": { + "type": "string", + "default": "", + "title": "The secret", + "examples": [ + "" + ] + }, + "scheme": { + "type": "string", + "default": "http", + "title": "The scheme", + "examples": [ + "http" + ] + } + }, + "examples": [ + { + "create": true, + "port": 9113, + "secret": "", + "scheme": "http" + } + ] + }, + "nginxServiceMesh": { + "type": "object", + "default": {}, + "title": "The nginxServiceMesh Schema", + "required": [ + "enable" + ], + "properties": { + "enable": { + "type": "boolean", + "default": false, + "title": "The enable", + "examples": [ + false + ] + }, + "enableEgress": { + "type": "boolean", + "default": false, + "title": "The enableEgress", + "examples": [ + false + ] + } + }, + "examples": [ + { + "enable": false, + "enableEgress": false + } + ] + } + }, + "examples": [ + { + "controller": { + "name": "", + "kind": "deployment", + "nginxplus": false, + "nginxReloadTimeout": 60000, + "appprotect": { + "enable": false, + "logLevel": "fatal" + }, + "appprotectdos": { + "enable": false, + "debug": false, + "maxWorkers": 0, + "maxDaemons": 0, + "memory": 0 + }, + "hostNetwork": false, + "nginxDebug": false, + "logLevel": 1, + "customPorts": [], + "image": { + "repository": "nginx/nginx-ingress", + "tag": "2.3.1", + "digest": "", + "pullPolicy": "IfNotPresent" + }, + "lifecycle": {}, + "customConfigMap": "", + "config": { + "name": "", + "annotations": {}, + "entries": {} + }, + "defaultTLS": { + "cert": "", + "key": "", + "secret": "" + }, + "wildcardTLS": { + "cert": "", + "key": "", + "secret": "" + }, + "nodeSelector": {}, + "terminationGracePeriodSeconds": 30, + "resources": { + "requests": { + "cpu": "100m", + "memory": "128Mi" + } + }, + "tolerations": [], + "affinity": {}, + "topologySpreadConstraints": {}, + "volumes": [], + "volumeMounts": [], + "initContainers": [], + "minReadySeconds": 0, + "strategy": {}, + "extraContainers": [], + "replicaCount": 1, + "ingressClass": "nginx", + "setAsDefaultIngress": false, + "watchNamespace": "", + "enableCustomResources": true, + "enablePreviewPolicies": false, + "enableOIDC": false, + "includeYear": false, + "enableTLSPassthrough": false, + "enableCertManager": false, + "enableExternalDNS": false, + "globalConfiguration": { + "create": false, + "spec": {} + }, + "enableSnippets": false, + "healthStatus": false, + "healthStatusURI": "/nginx-health", + "nginxStatus": { + "enable": true, + "port": 8080, + "allowCidrs": "127.0.0.1" + }, + "service": { + "create": true, + "type": "LoadBalancer", + "externalTrafficPolicy": "Local", + "annotations": {}, + "extraLabels": {}, + "loadBalancerIP": "", + "externalIPs": [], + "loadBalancerSourceRanges": [], + "name": "", + "allocateLoadBalancerNodePorts": false, + "ipFamilyPolicy": "", + "ipFamilies": [], + "httpPort": { + "enable": true, + "port": 80, + "nodePort": "", + "targetPort": 80 + }, + "httpsPort": { + "enable": true, + "port": 443, + "nodePort": "", + "targetPort": 443 + }, + "customPorts": [] + }, + "serviceAccount": { + "name": "", + "imagePullSecretName": "" + }, + "serviceMonitor": { + "create": false, + "name": "", + "labels": {}, + "selectorMatchLabels": {}, + "endpoints": {} + }, + "reportIngressStatus": { + "enable": true, + "externalService": "", + "ingressLink": "", + "enableLeaderElection": true, + "leaderElectionLockName": "", + "annotations": {} + }, + "pod": { + "annotations": {}, + "extraLabels": {} + }, + "priorityClassName": null, + "readyStatus": { + "enable": true, + "port": 8081, + "initialDelaySeconds": 0 + }, + "enableLatencyMetrics": false, + "disableIPV6": false + }, + "rbac": { + "create": true + }, + "prometheus": { + "create": true, + "port": 9113, + "secret": "", + "scheme": "http" + }, + "nginxServiceMesh": { + "enable": false, + "enableEgress": false + } + } + ] +} diff --git a/deployments/helm-chart/values.yaml b/deployments/helm-chart/values.yaml index 3ff90c4636..1a0dd650f9 100644 --- a/deployments/helm-chart/values.yaml +++ b/deployments/helm-chart/values.yaml @@ -6,6 +6,9 @@ controller: ## The kind of the Ingress Controller installation - deployment or daemonset. kind: deployment + ## Annotations for deployments and daemonsets + annotations: {} + ## Deploys the Ingress Controller for NGINX Plus. nginxplus: false @@ -19,11 +22,11 @@ controller: ## Sets log level for App Protect WAF. Allowed values: fatal, error, warn, info, debug, trace # logLevel: fatal - ## Support for App Protect Dos + ## Support for App Protect DoS appprotectdos: - ## Enable the App Protect Dos module in the Ingress Controller. + ## Enable the App Protect DoS module in the Ingress Controller. enable: false - ## Enable debugging for App Protect Dos. + ## Enable debugging for App Protect DoS. debug: false ## Max number of nginx processes to support. maxWorkers: 0 @@ -35,6 +38,9 @@ controller: ## Enables the Ingress Controller pods to use the host's network namespace. hostNetwork: false + ## DNS policy for the Ingress Controller pods + dnsPolicy: ClusterFirst + ## Enables debugging for NGINX. Uses the nginx-debug binary. Requires error-log-level: debug in the ConfigMap via `controller.config.entries`. nginxDebug: false @@ -49,7 +55,7 @@ controller: repository: nginx/nginx-ingress ## The tag of the Ingress Controller image. - tag: "2.3.1" + tag: "2.4.1" ## The digest of the Ingress Controller image. ## If digest is specified it has precedence over tag and will be used instead @@ -90,7 +96,7 @@ controller: ## Used as an alternative to specifying a certificate and key using `controller.defaultTLS.cert` and `controller.defaultTLS.key` parameters. ## Note: Alternatively, omitting the default server secret completely will configure NGINX to reject TLS connections to the default server. ## Format: / - secret: + secret: "" wildcardTLS: ## The base64-encoded TLS certificate for every Ingress/VirtualServer host that has TLS enabled but no secret specified. @@ -105,14 +111,29 @@ controller: ## The value must follow the following format: `/`. ## Used as an alternative to specifying a certificate and key using `controller.wildcardTLS.cert` and `controller.wildcardTLS.key` parameters. ## Format: / - secret: + secret: "" ## The node selector for pod assignment for the Ingress Controller pods. - nodeSelector: {} + # nodeSelector: {} ## The termination grace period of the Ingress Controller pod. terminationGracePeriodSeconds: 30 + ## HorizontalPodAutoscaling (HPA) + autoscaling: + ## Enables HorizontalPodAutoscaling. + enabled: false + ## The annotations of the Ingress Controller HorizontalPodAutoscaler. + annotations: {} + ## Minimum number of replicas for the HPA. + minReplicas: 1 + ## Maximum number of replicas for the HPA. + maxReplicas: 3 + ## The target cpu utilization percentage. + targetCPUUtilizationPercentage: 50 + ## The target memory utilization percentage. + targetMemoryUtilizationPercentage: 50 + ## The resources of the Ingress Controller pods. resources: requests: @@ -130,7 +151,7 @@ controller: affinity: {} ## The topology spread constraints of the Ingress controller pods. - topologySpreadConstraints: {} + # topologySpreadConstraints: {} ## The volumes of the Ingress Controller pods. volumes: [] @@ -180,6 +201,9 @@ controller: ## Comma separated list of namespaces to watch for Ingress resources. By default the Ingress Controller watches all namespaces. watchNamespace: "" + ## Comma separated list of namespaces to watch for Secret resources. By default the Ingress Controller watches all namespaces. + watchSecretNamespace: "" + ## Enable the custom resources. enableCustomResources: true @@ -284,7 +308,7 @@ controller: port: 80 ## The custom NodePort for the HTTP port. Requires controller.service.type set to NodePort. - nodePort: "" + # nodePort: 80 ## The HTTP port on the POD where the Ingress Controller service is running. targetPort: 80 @@ -297,7 +321,7 @@ controller: port: 443 ## The custom NodePort for the HTTPS port. Requires controller.service.type set to NodePort. - nodePort: "" + # nodePort: 443 ## The HTTPS port on the POD where the Ingress Controller service is running. targetPort: 443 @@ -306,6 +330,9 @@ controller: customPorts: [] serviceAccount: + ## The annotations of the service account of the Ingress Controller pods. + annotations: {} + ## The name of the service account of the Ingress Controller pods. Used for RBAC. ## Autogenerated if not set or set to "". # name: nginx-ingress @@ -330,7 +357,7 @@ controller: selectorMatchLabels: {} ## A list of endpoints allowed as part of this ServiceMonitor. - endpoints: {} + endpoints: [] reportIngressStatus: ## Updates the address field in the status of Ingress resources with an external address of the Ingress Controller. diff --git a/deployments/rbac/ap-rbac.yaml b/deployments/rbac/ap-rbac.yaml index 781ca4784f..87d673884c 100644 --- a/deployments/rbac/ap-rbac.yaml +++ b/deployments/rbac/ap-rbac.yaml @@ -3,15 +3,15 @@ apiVersion: rbac.authorization.k8s.io/v1 metadata: name: nginx-ingress-app-protect rules: -- apiGroups: +- apiGroups: - appprotect.f5.com - resources: + resources: - appolicies - aplogconfs - apusersigs - verbs: - - "get" - - "watch" + verbs: + - "get" + - "watch" - "list" --- kind: ClusterRoleBinding diff --git a/deployments/service/appprotect-dos-arb-svc.yaml b/deployments/service/appprotect-dos-arb-svc.yaml index b7632351fd..1b8031afc3 100644 --- a/deployments/service/appprotect-dos-arb-svc.yaml +++ b/deployments/service/appprotect-dos-arb-svc.yaml @@ -11,4 +11,4 @@ spec: port: 3000 protocol: TCP targetPort: 3000 - clusterIP: None \ No newline at end of file + clusterIP: None diff --git a/deployments/service/nodeport.yaml b/deployments/service/nodeport.yaml index 1ff655bd7f..f263b66388 100644 --- a/deployments/service/nodeport.yaml +++ b/deployments/service/nodeport.yaml @@ -4,7 +4,7 @@ metadata: name: nginx-ingress namespace: nginx-ingress spec: - type: NodePort + type: NodePort ports: - port: 80 targetPort: 80 diff --git a/docs/Makefile b/docs/Makefile index f26bedeac1..92d688ffec 100644 --- a/docs/Makefile +++ b/docs/Makefile @@ -22,7 +22,7 @@ hugo-mod: build-production: hugo --gc -e production - + build-staging: hugo --gc -e staging @@ -37,4 +37,4 @@ netlify: netlify deploy -d public replace-theme: - go mod edit -replace "$(THEME_MODULE)"="$(THEME_PATH)" \ No newline at end of file + go mod edit -replace "$(THEME_MODULE)"="$(THEME_PATH)" diff --git a/docs/_vendor/gitlab.com/f5/nginx/controller/poc/f5-hugo/layouts/partials/meta.html b/docs/_vendor/gitlab.com/f5/nginx/controller/poc/f5-hugo/layouts/partials/meta.html index 679e718229..9fd1bf7d99 100644 --- a/docs/_vendor/gitlab.com/f5/nginx/controller/poc/f5-hugo/layouts/partials/meta.html +++ b/docs/_vendor/gitlab.com/f5/nginx/controller/poc/f5-hugo/layouts/partials/meta.html @@ -47,7 +47,7 @@ https://kit.fontawesome.com/ https://*.netlify.app https://gist.github.com - https://www.googletagmanager.com/gtm.js + https://mktg.tags.f5.com/ https://tag.demandbase.com/pscSDsz4.min.js https://cdn.f5.com https://munchkin.brightfunnel.com/js/build/bf-munchkin.min.js diff --git a/docs/_vendor/gitlab.com/f5/nginx/controller/poc/f5-hugo/layouts/partials/sidebar.html b/docs/_vendor/gitlab.com/f5/nginx/controller/poc/f5-hugo/layouts/partials/sidebar.html index 1b18646c1e..023ab60a71 100644 --- a/docs/_vendor/gitlab.com/f5/nginx/controller/poc/f5-hugo/layouts/partials/sidebar.html +++ b/docs/_vendor/gitlab.com/f5/nginx/controller/poc/f5-hugo/layouts/partials/sidebar.html @@ -18,13 +18,13 @@

-
+
{{ range .Sections }} -
+
{{ range .Sections }} -
+
{{ range .Pages }}